idx int64 0 41.2k | question stringlengths 74 4.04k | target stringlengths 7 750 |
|---|---|---|
39,600 | public com . google . api . ads . adwords . axis . v201809 . cm . CallConversionType getCallConversionType ( ) { return callConversionType ; } | Gets the callConversionType value for this CallFeedItem . |
39,601 | private static ProductPartitionTreeImpl createNonEmptyAdGroupTree ( Long adGroupId , ListMultimap < Long , AdGroupCriterion > parentIdMap ) { Preconditions . checkNotNull ( adGroupId , "Null ad group ID" ) ; Preconditions . checkArgument ( ! parentIdMap . isEmpty ( ) , "parentIdMap passed for ad group ID %s is empty" , adGroupId ) ; Preconditions . checkArgument ( parentIdMap . containsKey ( null ) , "No root criterion found in the list of ad group criteria for ad group ID %s" , adGroupId ) ; AdGroupCriterion rootCriterion = Iterables . getOnlyElement ( parentIdMap . get ( null ) ) ; Preconditions . checkState ( rootCriterion instanceof BiddableAdGroupCriterion , "Root criterion for ad group ID %s is not a BiddableAdGroupCriterion" , adGroupId ) ; BiddableAdGroupCriterion biddableRootCriterion = ( BiddableAdGroupCriterion ) rootCriterion ; BiddingStrategyConfiguration biddingStrategyConfig = biddableRootCriterion . getBiddingStrategyConfiguration ( ) ; Preconditions . checkState ( biddingStrategyConfig != null , "Null bidding strategy config on the root node of ad group ID %s" , adGroupId ) ; ProductPartitionNode rootNode = new ProductPartitionNode ( null , ( ProductDimension ) null , rootCriterion . getCriterion ( ) . getId ( ) , new ProductDimensionComparator ( ) ) ; Money rootNodeBid = getBid ( biddableRootCriterion ) ; if ( rootNodeBid != null ) { rootNode = rootNode . asBiddableUnit ( ) . setBid ( rootNodeBid . getMicroAmount ( ) ) ; } rootNode = rootNode . setTrackingUrlTemplate ( biddableRootCriterion . getTrackingUrlTemplate ( ) ) ; rootNode = copyCustomParametersToNode ( biddableRootCriterion , rootNode ) ; addChildNodes ( rootNode , parentIdMap ) ; return new ProductPartitionTreeImpl ( adGroupId , biddingStrategyConfig , rootNode ) ; } | Returns a new tree based on a non - empty collection of ad group criteria . All parameters required . |
39,602 | private static ProductPartitionTreeImpl createEmptyAdGroupTree ( Long adGroupId , BiddingStrategyConfiguration biddingStrategyConfig ) { Preconditions . checkNotNull ( adGroupId , "Null ad group ID" ) ; Preconditions . checkNotNull ( biddingStrategyConfig , "Null bidding strategy configuration" ) ; ProductPartitionNode rootNode = new ProductPartitionNode ( null , null , - 1L , new ProductDimensionComparator ( ) ) ; return new ProductPartitionTreeImpl ( adGroupId , biddingStrategyConfig , rootNode ) ; } | Returns a new empty tree . |
39,603 | private OperationPair createSetBidOperation ( ProductPartitionNode node ) { Preconditions . checkNotNull ( node . getProductPartitionId ( ) , "Node for SET operation has no partition ID: %s" , node ) ; Preconditions . checkArgument ( node . getProductPartitionId ( ) . longValue ( ) >= 0L , "Node for SET operation has a negative partition ID: %s" , node ) ; AdGroupCriterionOperation setOp = new AdGroupCriterionOperation ( ) ; setOp . setOperator ( Operator . SET ) ; setOp . setOperand ( ProductPartitionNodeAdapter . createCriterionForSetBiddableUnit ( node , adGroupId , getBiddingStrategyConfiguration ( ) ) ) ; return new OperationPair ( node , setOp ) ; } | Returns a SET operation for the specified node . |
39,604 | private List < OperationPair > createAddOperations ( ProductPartitionNode node ) { AdGroupCriterionOperation addOp = new AdGroupCriterionOperation ( ) ; addOp . setOperator ( Operator . ADD ) ; node . setProductPartitionId ( idGenerator . next ( ) ) ; addOp . setOperand ( ProductPartitionNodeAdapter . createCriterionForAdd ( node , adGroupId , getBiddingStrategyConfiguration ( ) ) ) ; List < OperationPair > operationsList = Lists . newArrayList ( ) ; operationsList . add ( new OperationPair ( node , addOp ) ) ; for ( ProductPartitionNode child : node . getChildren ( ) ) { operationsList . addAll ( createAddOperations ( child ) ) ; } return operationsList ; } | Creates ADD operations for the node and ALL of its children and adds them to the provided operations list . |
39,605 | private OperationPair createRemoveOperation ( ProductPartitionNode node ) { Preconditions . checkNotNull ( node . getProductPartitionId ( ) , "Node for REMOVE operation has no partition ID: %s" , node ) ; Preconditions . checkArgument ( node . getProductPartitionId ( ) . longValue ( ) >= 0L , "Node for REMOVE operation has a negative partition ID: %s" , node ) ; AdGroupCriterionOperation removeOp = new AdGroupCriterionOperation ( ) ; removeOp . setOperator ( Operator . REMOVE ) ; removeOp . setOperand ( ProductPartitionNodeAdapter . createCriterionForRemove ( node , adGroupId ) ) ; return new OperationPair ( node , removeOp ) ; } | Returns a REMOVE operation for the specified node . |
39,606 | private static Money getBid ( BiddableAdGroupCriterion biddableCriterion ) { BiddingStrategyConfiguration biddingConfig = biddableCriterion . getBiddingStrategyConfiguration ( ) ; Money cpcBidAmount = null ; if ( biddingConfig . getBids ( ) != null ) { for ( Bids bid : biddingConfig . getBids ( ) ) { if ( bid instanceof CpcBid ) { CpcBid cpcBid = ( CpcBid ) bid ; if ( BidSource . CRITERION . equals ( cpcBid . getCpcBidSource ( ) ) ) { cpcBidAmount = cpcBid . getBid ( ) ; break ; } } } } return cpcBidAmount ; } | Returns the criterion - level bid or null if no such bid exists . |
39,607 | public com . google . api . ads . admanager . axis . v201902 . ScalableType getScalableType ( ) { return scalableType ; } | Gets the scalableType value for this VideoMetadata . |
39,608 | public void setDeliveryType ( com . google . api . ads . admanager . axis . v201902 . VideoDeliveryType deliveryType ) { this . deliveryType = deliveryType ; } | Sets the deliveryType value for this VideoMetadata . |
39,609 | public com . google . api . ads . admanager . axis . v201811 . DateTime getStartTime ( ) { return startTime ; } | Gets the startTime value for this ForecastBreakdown . |
39,610 | public void setStartTime ( com . google . api . ads . admanager . axis . v201811 . DateTime startTime ) { this . startTime = startTime ; } | Sets the startTime value for this ForecastBreakdown . |
39,611 | public com . google . api . ads . admanager . axis . v201811 . TargetingCriteriaBreakdown [ ] getTargetingCriteriaBreakdowns ( ) { return targetingCriteriaBreakdowns ; } | Gets the targetingCriteriaBreakdowns value for this AvailabilityForecast . |
39,612 | public com . google . api . ads . admanager . axis . v201811 . ContendingLineItem [ ] getContendingLineItems ( ) { return contendingLineItems ; } | Gets the contendingLineItems value for this AvailabilityForecast . |
39,613 | public com . google . api . ads . admanager . axis . v201811 . AlternativeUnitTypeForecast [ ] getAlternativeUnitTypeForecasts ( ) { return alternativeUnitTypeForecasts ; } | Gets the alternativeUnitTypeForecasts value for this AvailabilityForecast . |
39,614 | public com . google . api . ads . admanager . axis . v201811 . GrpDemographicBreakdown [ ] getDemographicBreakdowns ( ) { return demographicBreakdowns ; } | Gets the demographicBreakdowns value for this AvailabilityForecast . |
39,615 | public com . google . api . ads . admanager . axis . v201902 . CompanySettings getSettings ( ) { return settings ; } | Gets the settings value for this Company . |
39,616 | public void setSettings ( com . google . api . ads . admanager . axis . v201902 . CompanySettings settings ) { this . settings = settings ; } | Sets the settings value for this Company . |
39,617 | public void setViewabilityProvider ( com . google . api . ads . admanager . axis . v201902 . ViewabilityProvider viewabilityProvider ) { this . viewabilityProvider = viewabilityProvider ; } | Sets the viewabilityProvider value for this Company . |
39,618 | public com . google . api . ads . admanager . axis . v201902 . RefreshType getRefreshType ( ) { return refreshType ; } | Gets the refreshType value for this MasterPlaylistSettings . |
39,619 | public void setRefreshType ( com . google . api . ads . admanager . axis . v201902 . RefreshType refreshType ) { this . refreshType = refreshType ; } | Sets the refreshType value for this MasterPlaylistSettings . |
39,620 | private void captureSoapXml ( SOAPMessageContext context ) { SOAPMessage message = context . getMessage ( ) ; if ( ( Boolean ) context . get ( MessageContext . MESSAGE_OUTBOUND_PROPERTY ) ) { requestInfoXPathSet . parseMessage ( lastRequestInfo , message ) ; } else { responseInfoXPathSet . parseMessage ( lastResponseInfo , message ) ; } } | Captures the raw XML message behind a SOAP interaction . |
39,621 | public void addHeader ( String namespace , String headerName , SOAPElement headerValue ) { this . soapHeaders . add ( headerValue ) ; } | Adds a header to the list of SOAP request headers . |
39,622 | public com . google . api . ads . adwords . axis . v201809 . cm . PromotionExtensionDiscountModifier getDiscountModifier ( ) { return discountModifier ; } | Gets the discountModifier value for this PromotionFeedItem . |
39,623 | public void setMoneyAmountOff ( com . google . api . ads . adwords . axis . v201809 . cm . MoneyWithCurrency moneyAmountOff ) { this . moneyAmountOff = moneyAmountOff ; } | Sets the moneyAmountOff value for this PromotionFeedItem . |
39,624 | public com . google . api . ads . adwords . axis . v201809 . cm . MoneyWithCurrency getOrdersOverAmount ( ) { return ordersOverAmount ; } | Gets the ordersOverAmount value for this PromotionFeedItem . |
39,625 | public com . google . api . ads . adwords . axis . v201809 . cm . PromotionExtensionOccasion getOccasion ( ) { return occasion ; } | Gets the occasion value for this PromotionFeedItem . |
39,626 | public com . google . api . ads . adwords . axis . v201809 . cm . CustomParameters getPromotionUrlCustomParameters ( ) { return promotionUrlCustomParameters ; } | Gets the promotionUrlCustomParameters value for this PromotionFeedItem . |
39,627 | public com . google . api . ads . adwords . axis . v201809 . cm . AttributeFieldMapping [ ] getAttributeFieldMappings ( ) { return attributeFieldMappings ; } | Gets the attributeFieldMappings value for this FeedMapping . |
39,628 | public com . google . api . ads . admanager . axis . v201808 . Money getNetBillableRevenueOverride ( ) { return netBillableRevenueOverride ; } | Gets the netBillableRevenueOverride value for this BillableRevenueOverrides . |
39,629 | public com . google . api . ads . admanager . axis . v201808 . Money getGrossBillableRevenueOverride ( ) { return grossBillableRevenueOverride ; } | Gets the grossBillableRevenueOverride value for this BillableRevenueOverrides . |
39,630 | public void setBillableRevenueOverride ( com . google . api . ads . admanager . axis . v201808 . Money billableRevenueOverride ) { this . billableRevenueOverride = billableRevenueOverride ; } | Sets the billableRevenueOverride value for this BillableRevenueOverrides . |
39,631 | public void setBuiltInCreativePlaceholders ( com . google . api . ads . admanager . axis . v201805 . CreativePlaceholder [ ] builtInCreativePlaceholders ) { this . builtInCreativePlaceholders = builtInCreativePlaceholders ; } | Sets the builtInCreativePlaceholders value for this ProposalLineItemConstraints . |
39,632 | public com . google . api . ads . admanager . axis . v201805 . DeliveryRateType getBuiltInDeliveryRateType ( ) { return builtInDeliveryRateType ; } | Gets the builtInDeliveryRateType value for this ProposalLineItemConstraints . |
39,633 | public void setBuiltInDeliveryRateType ( com . google . api . ads . admanager . axis . v201805 . DeliveryRateType builtInDeliveryRateType ) { this . builtInDeliveryRateType = builtInDeliveryRateType ; } | Sets the builtInDeliveryRateType value for this ProposalLineItemConstraints . |
39,634 | public void setBuiltInCreativeRotationType ( com . google . api . ads . admanager . axis . v201805 . CreativeRotationType builtInCreativeRotationType ) { this . builtInCreativeRotationType = builtInCreativeRotationType ; } | Sets the builtInCreativeRotationType value for this ProposalLineItemConstraints . |
39,635 | public com . google . api . ads . admanager . axis . v201805 . CompanionDeliveryOption getBuiltInCompanionDeliveryOption ( ) { return builtInCompanionDeliveryOption ; } | Gets the builtInCompanionDeliveryOption value for this ProposalLineItemConstraints . |
39,636 | public com . google . api . ads . admanager . axis . v201805 . FrequencyCap [ ] getBuiltInFrequencyCaps ( ) { return builtInFrequencyCaps ; } | Gets the builtInFrequencyCaps value for this ProposalLineItemConstraints . |
39,637 | public void setProductBuiltInTargeting ( com . google . api . ads . admanager . axis . v201805 . Targeting productBuiltInTargeting ) { this . productBuiltInTargeting = productBuiltInTargeting ; } | Sets the productBuiltInTargeting value for this ProposalLineItemConstraints . |
39,638 | public com . google . api . ads . admanager . axis . v201808 . GeoTargeting getGeoSegment ( ) { return geoSegment ; } | Gets the geoSegment value for this ProductSegmentation . |
39,639 | public com . google . api . ads . admanager . axis . v201808 . CustomCriteria [ ] getCustomTargetingSegment ( ) { return customTargetingSegment ; } | Gets the customTargetingSegment value for this ProductSegmentation . |
39,640 | public void setUserDomainSegment ( com . google . api . ads . admanager . axis . v201808 . UserDomainTargeting userDomainSegment ) { this . userDomainSegment = userDomainSegment ; } | Sets the userDomainSegment value for this ProductSegmentation . |
39,641 | public com . google . api . ads . admanager . axis . v201808 . BrowserTargeting getBrowserSegment ( ) { return browserSegment ; } | Gets the browserSegment value for this ProductSegmentation . |
39,642 | public com . google . api . ads . admanager . axis . v201808 . BrowserLanguageTargeting getBrowserLanguageSegment ( ) { return browserLanguageSegment ; } | Gets the browserLanguageSegment value for this ProductSegmentation . |
39,643 | public void setOperatingSystemSegment ( com . google . api . ads . admanager . axis . v201808 . OperatingSystemTargeting operatingSystemSegment ) { this . operatingSystemSegment = operatingSystemSegment ; } | Sets the operatingSystemSegment value for this ProductSegmentation . |
39,644 | public com . google . api . ads . admanager . axis . v201808 . MobileCarrierTargeting getMobileCarrierSegment ( ) { return mobileCarrierSegment ; } | Gets the mobileCarrierSegment value for this ProductSegmentation . |
39,645 | public com . google . api . ads . admanager . axis . v201808 . DeviceCapabilityTargeting getDeviceCapabilitySegment ( ) { return deviceCapabilitySegment ; } | Gets the deviceCapabilitySegment value for this ProductSegmentation . |
39,646 | public void setDeviceCategorySegment ( com . google . api . ads . admanager . axis . v201808 . DeviceCategoryTargeting deviceCategorySegment ) { this . deviceCategorySegment = deviceCategorySegment ; } | Sets the deviceCategorySegment value for this ProductSegmentation . |
39,647 | public com . google . api . ads . admanager . axis . v201808 . MobileDeviceTargeting getMobileDeviceSegment ( ) { return mobileDeviceSegment ; } | Gets the mobileDeviceSegment value for this ProductSegmentation . |
39,648 | public void setMobileDeviceSegment ( com . google . api . ads . admanager . axis . v201808 . MobileDeviceTargeting mobileDeviceSegment ) { this . mobileDeviceSegment = mobileDeviceSegment ; } | Sets the mobileDeviceSegment value for this ProductSegmentation . |
39,649 | public com . google . api . ads . admanager . axis . v201808 . MobileDeviceSubmodelTargeting getMobileDeviceSubmodelSegment ( ) { return mobileDeviceSubmodelSegment ; } | Gets the mobileDeviceSubmodelSegment value for this ProductSegmentation . |
39,650 | public void setSizeSegment ( com . google . api . ads . admanager . axis . v201808 . CreativePlaceholder [ ] sizeSegment ) { this . sizeSegment = sizeSegment ; } | Sets the sizeSegment value for this ProductSegmentation . |
39,651 | public com . google . api . ads . admanager . axis . v201808 . MobileApplicationTargeting getMobileApplicationSegment ( ) { return mobileApplicationSegment ; } | Gets the mobileApplicationSegment value for this ProductSegmentation . |
39,652 | public void setVideoPositionSegment ( com . google . api . ads . admanager . axis . v201808 . VideoPositionTargeting videoPositionSegment ) { this . videoPositionSegment = videoPositionSegment ; } | Sets the videoPositionSegment value for this ProductSegmentation . |
39,653 | public com . google . api . ads . admanager . axis . v201805 . ReportQueryAdUnitView getAdUnitView ( ) { return adUnitView ; } | Gets the adUnitView value for this ReportQuery . |
39,654 | public com . google . api . ads . admanager . axis . v201805 . Date getEndDate ( ) { return endDate ; } | Gets the endDate value for this ReportQuery . |
39,655 | public com . google . api . ads . admanager . axis . v201805 . Statement getStatement ( ) { return statement ; } | Gets the statement value for this ReportQuery . |
39,656 | public void setCmsSources ( com . google . api . ads . admanager . axis . v201811 . CmsContent [ ] cmsSources ) { this . cmsSources = cmsSources ; } | Sets the cmsSources value for this Content . |
39,657 | private static Map < Long , SiteLinkFromFeed > getSiteLinksFromFeed ( AdWordsServicesInterface adWordsServices , AdWordsSession session , Feed feed ) throws RemoteException { Multimap < Long , Integer > feedMappings = getFeedMapping ( adWordsServices , session , feed , PLACEHOLDER_SITELINKS ) ; Map < Long , SiteLinkFromFeed > feedItems = Maps . newHashMap ( ) ; for ( FeedItem feedItem : getFeedItems ( adWordsServices , session , feed ) ) { SiteLinkFromFeed siteLinkFromFeed = new SiteLinkFromFeed ( ) ; for ( FeedItemAttributeValue attributeValue : feedItem . getAttributeValues ( ) ) { if ( ! feedMappings . containsKey ( attributeValue . getFeedAttributeId ( ) ) ) { continue ; } for ( Integer fieldId : feedMappings . get ( attributeValue . getFeedAttributeId ( ) ) ) { switch ( fieldId ) { case PLACEHOLDER_FIELD_SITELINK_LINK_TEXT : siteLinkFromFeed . text = attributeValue . getStringValue ( ) ; break ; case PLACEHOLDER_FIELD_SITELINK_URL : siteLinkFromFeed . url = attributeValue . getStringValue ( ) ; break ; case PLACEHOLDER_FIELD_FINAL_URLS : siteLinkFromFeed . finalUrls = attributeValue . getStringValues ( ) ; break ; case PLACEHOLDER_FIELD_FINAL_MOBILE_URLS : siteLinkFromFeed . finalMobileUrls = attributeValue . getStringValues ( ) ; break ; case PLACEHOLDER_FIELD_TRACKING_URL_TEMPLATE : siteLinkFromFeed . trackingUrlTemplate = attributeValue . getStringValue ( ) ; break ; case PLACEHOLDER_FIELD_LINE_2_TEXT : siteLinkFromFeed . line2 = attributeValue . getStringValue ( ) ; break ; case PLACEHOLDER_FIELD_LINE_3_TEXT : siteLinkFromFeed . line3 = attributeValue . getStringValue ( ) ; break ; default : break ; } } } feedItems . put ( feedItem . getFeedItemId ( ) , siteLinkFromFeed ) ; } return feedItems ; } | Gets the site links from a feed . |
39,658 | private static Multimap < Long , Integer > getFeedMapping ( AdWordsServicesInterface adWordsServices , AdWordsSession session , Feed feed , long placeholderType ) throws RemoteException { FeedMappingServiceInterface feedMappingService = adWordsServices . get ( session , FeedMappingServiceInterface . class ) ; String query = String . format ( "SELECT FeedMappingId, AttributeFieldMappings WHERE FeedId = %d and PlaceholderType = %d " + "AND Status = 'ENABLED'" , feed . getId ( ) , placeholderType ) ; Multimap < Long , Integer > attributeMappings = HashMultimap . create ( ) ; int offset = 0 ; FeedMappingPage feedMappingPage ; do { String pageQuery = String . format ( query + " LIMIT %d, %d" , offset , PAGE_SIZE ) ; feedMappingPage = feedMappingService . query ( pageQuery ) ; if ( feedMappingPage . getEntries ( ) != null ) { for ( FeedMapping feedMapping : feedMappingPage . getEntries ( ) ) { for ( AttributeFieldMapping attributeMapping : feedMapping . getAttributeFieldMappings ( ) ) { attributeMappings . put ( attributeMapping . getFeedAttributeId ( ) , attributeMapping . getFieldId ( ) ) ; } } } offset += PAGE_SIZE ; } while ( offset < feedMappingPage . getTotalNumEntries ( ) ) ; return attributeMappings ; } | Gets the feed mapping for a feed . |
39,659 | private static List < Feed > getFeeds ( AdWordsServicesInterface adWordsServices , AdWordsSession session ) throws RemoteException { FeedServiceInterface feedService = adWordsServices . get ( session , FeedServiceInterface . class ) ; String query = "SELECT Id, Name, Attributes WHERE Origin = 'USER' AND FeedStatus = 'ENABLED'" ; List < Feed > feeds = new ArrayList < > ( ) ; int offset = 0 ; FeedPage feedPage ; do { String pageQuery = String . format ( query + " LIMIT %d, %d" , offset , PAGE_SIZE ) ; feedPage = feedService . query ( pageQuery ) ; if ( feedPage . getEntries ( ) != null ) { feeds . addAll ( Arrays . asList ( feedPage . getEntries ( ) ) ) ; } offset += PAGE_SIZE ; } while ( offset < feedPage . getTotalNumEntries ( ) ) ; return feeds ; } | Returns a list of all enabled feeds . |
39,660 | private static List < FeedItem > getFeedItems ( AdWordsServicesInterface adWordsServices , AdWordsSession session , Feed feed ) throws RemoteException { FeedItemServiceInterface feedItemService = adWordsServices . get ( session , FeedItemServiceInterface . class ) ; String query = String . format ( "SELECT FeedItemId, AttributeValues WHERE Status = 'ENABLED' AND FeedId = %d" , feed . getId ( ) ) ; List < FeedItem > feedItems = new ArrayList < > ( ) ; int offset = 0 ; FeedItemPage feedItemPage ; do { String pageQuery = String . format ( query + " LIMIT %d, %d" , offset , PAGE_SIZE ) ; feedItemPage = feedItemService . query ( pageQuery ) ; if ( feedItemPage . getEntries ( ) != null ) { feedItems . addAll ( Arrays . asList ( feedItemPage . getEntries ( ) ) ) ; } offset += PAGE_SIZE ; } while ( offset < feedItemPage . getTotalNumEntries ( ) ) ; return feedItems ; } | Returns the feed items for a feed . |
39,661 | private static void deleteOldFeedItems ( AdWordsServicesInterface adWordsServices , AdWordsSession session , Set < Long > feedItemIds , Feed feed ) throws RemoteException { FeedItemServiceInterface feedItemService = adWordsServices . get ( session , FeedItemServiceInterface . class ) ; if ( feedItemIds . isEmpty ( ) ) { return ; } List < FeedItemOperation > operations = new ArrayList < > ( ) ; for ( Long feedItemId : feedItemIds ) { FeedItemOperation operation = new FeedItemOperation ( ) ; FeedItem feedItem = new FeedItem ( ) ; feedItem . setFeedId ( feed . getId ( ) ) ; feedItem . setFeedItemId ( feedItemId ) ; operation . setOperand ( feedItem ) ; operation . setOperator ( Operator . REMOVE ) ; operations . add ( operation ) ; } feedItemService . mutate ( operations . toArray ( new FeedItemOperation [ operations . size ( ) ] ) ) ; } | Deletes the old feed items for which extension settings have been created . |
39,662 | private static void createExtensionSetting ( AdWordsServicesInterface adWordsServices , AdWordsSession session , Map < Long , SiteLinkFromFeed > feedItems , CampaignFeed campaignFeed , Set < Long > feedItemIds , ExtensionSettingPlatform platformRestrictions ) throws RemoteException { CampaignExtensionSettingServiceInterface campaignExtensionSettingService = adWordsServices . get ( session , CampaignExtensionSettingServiceInterface . class ) ; CampaignExtensionSetting campaignExtensionSetting = new CampaignExtensionSetting ( ) ; campaignExtensionSetting . setCampaignId ( campaignFeed . getCampaignId ( ) ) ; campaignExtensionSetting . setExtensionType ( FeedType . SITELINK ) ; ExtensionSetting extensionSetting = new ExtensionSetting ( ) ; List < ExtensionFeedItem > extensionFeedItems = new ArrayList < > ( ) ; for ( Long feedItemId : feedItemIds ) { SiteLinkFromFeed siteLinkFromFeed = feedItems . get ( feedItemId ) ; SitelinkFeedItem siteLinkFeedItem = new SitelinkFeedItem ( ) ; siteLinkFeedItem . setSitelinkText ( siteLinkFromFeed . text ) ; if ( siteLinkFromFeed . finalUrls != null && siteLinkFromFeed . finalUrls . length > 0 ) { siteLinkFeedItem . setSitelinkFinalUrls ( new UrlList ( siteLinkFromFeed . finalUrls ) ) ; if ( siteLinkFromFeed . finalMobileUrls != null && siteLinkFromFeed . finalMobileUrls . length > 0 ) { siteLinkFeedItem . setSitelinkFinalMobileUrls ( new UrlList ( siteLinkFromFeed . finalMobileUrls ) ) ; } siteLinkFeedItem . setSitelinkTrackingUrlTemplate ( siteLinkFromFeed . trackingUrlTemplate ) ; } else { siteLinkFeedItem . setSitelinkUrl ( siteLinkFromFeed . url ) ; } siteLinkFeedItem . setSitelinkLine2 ( siteLinkFromFeed . line2 ) ; siteLinkFeedItem . setSitelinkLine3 ( siteLinkFromFeed . line3 ) ; extensionFeedItems . add ( siteLinkFeedItem ) ; } extensionSetting . setExtensions ( extensionFeedItems . toArray ( new ExtensionFeedItem [ extensionFeedItems . size ( ) ] ) ) ; extensionSetting . setPlatformRestrictions ( platformRestrictions ) ; campaignExtensionSetting . setExtensionSetting ( extensionSetting ) ; CampaignExtensionSettingOperation operation = new CampaignExtensionSettingOperation ( ) ; operation . setOperand ( campaignExtensionSetting ) ; operation . setOperator ( Operator . ADD ) ; campaignExtensionSettingService . mutate ( new CampaignExtensionSettingOperation [ ] { operation } ) ; } | Creates the extension setting for a list of feed items . |
39,663 | private static CampaignFeed deleteCampaignFeed ( AdWordsServicesInterface adWordsServices , AdWordsSession session , CampaignFeed campaignFeed ) throws RemoteException { CampaignFeedServiceInterface campaignFeedService = adWordsServices . get ( session , CampaignFeedServiceInterface . class ) ; CampaignFeedOperation operation = new CampaignFeedOperation ( ) ; operation . setOperand ( campaignFeed ) ; operation . setOperator ( Operator . REMOVE ) ; return campaignFeedService . mutate ( new CampaignFeedOperation [ ] { operation } ) . getValue ( 0 ) ; } | Deletes a campaign feed . |
39,664 | private static ExtensionSettingPlatform getPlatformRestictionsForCampaign ( CampaignFeed campaignFeed ) { String platformRestrictions = ExtensionSettingPlatform . NONE . getValue ( ) ; if ( FunctionOperator . AND . equals ( campaignFeed . getMatchingFunction ( ) . getOperator ( ) ) ) { for ( FunctionArgumentOperand argument : campaignFeed . getMatchingFunction ( ) . getLhsOperand ( ) ) { if ( argument instanceof FunctionOperand ) { FunctionOperand operand = ( FunctionOperand ) argument ; if ( FunctionOperator . EQUALS . equals ( operand . getValue ( ) . getOperator ( ) ) && ( operand . getValue ( ) . getLhsOperand ( 0 ) instanceof RequestContextOperand ) ) { RequestContextOperand requestContextOperand = ( RequestContextOperand ) operand . getValue ( ) . getLhsOperand ( 0 ) ; if ( RequestContextOperandContextType . DEVICE_PLATFORM . equals ( requestContextOperand . getContextType ( ) ) ) { platformRestrictions = ( ( ConstantOperand ) operand . getValue ( ) . getRhsOperand ( 0 ) ) . getStringValue ( ) ; } } } } } return ExtensionSettingPlatform . fromString ( platformRestrictions . toUpperCase ( ) ) ; } | Gets the platform restrictions for sitelinks in a campaign . |
39,665 | private static Set < Long > getFeedItemIdsForCampaign ( CampaignFeed campaignFeed ) throws RemoteException { Set < Long > feedItemIds = Sets . newHashSet ( ) ; FunctionOperator functionOperator = campaignFeed . getMatchingFunction ( ) . getOperator ( ) ; if ( FunctionOperator . IN . equals ( functionOperator ) ) { feedItemIds . addAll ( getFeedItemIdsFromArgument ( campaignFeed . getMatchingFunction ( ) ) ) ; } else if ( FunctionOperator . AND . equals ( functionOperator ) ) { Arrays . stream ( campaignFeed . getMatchingFunction ( ) . getLhsOperand ( ) ) . filter ( FunctionOperand . class :: isInstance ) . map ( argument -> ( FunctionOperand ) argument ) . filter ( operand -> FunctionOperator . IN . equals ( operand . getValue ( ) . getOperator ( ) ) ) . forEach ( operand -> feedItemIds . addAll ( getFeedItemIdsFromArgument ( operand . getValue ( ) ) ) ) ; } else { } return feedItemIds ; } | Returns the list of feed item IDs that are used by a campaign through a given campaign feed . |
39,666 | private static List < CampaignFeed > getCampaignFeeds ( AdWordsServicesInterface adWordsServices , AdWordsSession session , Feed feed , int placeholderType ) throws RemoteException { CampaignFeedServiceInterface campaignFeedService = adWordsServices . get ( session , CampaignFeedServiceInterface . class ) ; String query = String . format ( "SELECT CampaignId, MatchingFunction, PlaceholderTypes WHERE Status = 'ENABLED' " + "AND FeedId = %d AND PlaceholderTypes CONTAINS_ANY [%d]" , feed . getId ( ) , placeholderType ) ; List < CampaignFeed > campaignFeeds = new ArrayList < > ( ) ; int offset = 0 ; CampaignFeedPage campaignFeedPage ; do { String pageQuery = String . format ( query + " LIMIT %d, %d" , offset , PAGE_SIZE ) ; campaignFeedPage = campaignFeedService . query ( pageQuery ) ; if ( campaignFeedPage . getEntries ( ) != null ) { campaignFeeds . addAll ( Arrays . asList ( campaignFeedPage . getEntries ( ) ) ) ; } offset += PAGE_SIZE ; } while ( offset < campaignFeedPage . getTotalNumEntries ( ) ) ; return campaignFeeds ; } | Returns the campaign feeds that use a particular feed for a particular placeholder type . |
39,667 | public com . google . api . ads . adwords . axis . v201809 . cm . Money getBidFloor ( ) { return bidFloor ; } | Gets the bidFloor value for this TargetRoasBiddingScheme . |
39,668 | public com . google . api . ads . adwords . axis . v201809 . cm . LevelOfDetail getLevelOfDetail ( ) { return levelOfDetail ; } | Gets the levelOfDetail value for this DimensionProperties . |
39,669 | public com . google . api . ads . adwords . axis . v201809 . cm . PageFeed getPageFeed ( ) { return pageFeed ; } | Gets the pageFeed value for this DynamicSearchAdsSetting . |
39,670 | public void setFlashAssetSize ( com . google . api . ads . admanager . axis . v201811 . Size flashAssetSize ) { this . flashAssetSize = flashAssetSize ; } | Sets the flashAssetSize value for this FlashRedirectOverlayCreative . |
39,671 | public com . google . api . ads . admanager . axis . v201805 . OriginForwardingType getOriginForwardingType ( ) { return originForwardingType ; } | Gets the originForwardingType value for this SecurityPolicySettings . |
39,672 | public void setOriginForwardingType ( com . google . api . ads . admanager . axis . v201805 . OriginForwardingType originForwardingType ) { this . originForwardingType = originForwardingType ; } | Sets the originForwardingType value for this SecurityPolicySettings . |
39,673 | public com . google . api . ads . admanager . axis . v201902 . CreativePolicyViolation [ ] getPolicyViolations ( ) { return policyViolations ; } | Gets the policyViolations value for this Creative . |
39,674 | public Map < String , String > extract ( InputStream xml , String [ ] fields ) { Map < String , String > parsedFields = Maps . newHashMap ( ) ; try { DocumentBuilder documentBuilder = documentBuilderSupplier . get ( ) ; if ( documentBuilder == null ) { logger . warn ( "Could not create DocumentBuilder" ) ; return parsedFields ; } Document doc = documentBuilder . parse ( xml ) ; for ( String field : fields ) { try { String value = extract ( doc , field ) ; if ( value != null ) { parsedFields . put ( field , value ) ; } } catch ( XPathExpressionException e ) { logger . warn ( "Invalid XPath: " + field , e ) ; } } } catch ( SAXException e ) { logger . warn ( "Couldn't process XML into a Document" , e ) ; } catch ( IOException e ) { logger . warn ( "Problem reading input stream" , e ) ; } return parsedFields ; } | Locates the target fields in the specified XML and uses a wildcard XPath to identify the first matching node and return it in a map . |
39,675 | public com . google . api . ads . adwords . axis . v201809 . cm . RichMediaAdRichMediaAdType getRichMediaAdType ( ) { return richMediaAdType ; } | Gets the richMediaAdType value for this RichMediaAd . |
39,676 | public com . google . api . ads . adwords . axis . v201809 . rm . CustomAffinityType getType ( ) { return type ; } | Gets the type value for this CustomAffinity . |
39,677 | public com . google . api . ads . adwords . axis . v201809 . cm . AdRotationMode getAdRotationMode ( ) { return adRotationMode ; } | Gets the adRotationMode value for this AdGroupAdRotationMode . |
39,678 | public com . google . api . ads . adwords . axis . v201809 . cm . PredicateOperator getOperator ( ) { return operator ; } | Gets the operator value for this Predicate . |
39,679 | public com . google . api . ads . adwords . axis . v201809 . cm . ShoppingProductChannel getChannel ( ) { return channel ; } | Gets the channel value for this ProductChannel . |
39,680 | public com . google . api . ads . admanager . axis . v201902 . AdSenseSettingsAdType getAdType ( ) { return adType ; } | Gets the adType value for this AdSenseSettings . |
39,681 | public void setFontFamily ( com . google . api . ads . admanager . axis . v201902 . AdSenseSettingsFontFamily fontFamily ) { this . fontFamily = fontFamily ; } | Sets the fontFamily value for this AdSenseSettings . |
39,682 | public com . google . api . ads . admanager . axis . v201902 . AdSenseSettingsFontSize getFontSize ( ) { return fontSize ; } | Gets the fontSize value for this AdSenseSettings . |
39,683 | public void setFontSize ( com . google . api . ads . admanager . axis . v201902 . AdSenseSettingsFontSize fontSize ) { this . fontSize = fontSize ; } | Sets the fontSize value for this AdSenseSettings . |
39,684 | public com . google . api . ads . adwords . axis . v201809 . o . MonthlySearchVolume [ ] getValue ( ) { return value ; } | Gets the value value for this MonthlySearchVolumeAttribute . |
39,685 | public com . google . api . ads . adwords . axis . v201809 . cm . AppConversionAppPlatform getAppPlatform ( ) { return appPlatform ; } | Gets the appPlatform value for this AppConversion . |
39,686 | public com . google . api . ads . adwords . axis . v201809 . cm . AppConversionAppConversionType getAppConversionType ( ) { return appConversionType ; } | Gets the appConversionType value for this AppConversion . |
39,687 | public com . google . api . ads . admanager . axis . v201805 . SecurityPolicySettings getSecurityPolicy ( ) { return securityPolicy ; } | Gets the securityPolicy value for this MediaLocationSettings . |
39,688 | public void setSecurityPolicy ( com . google . api . ads . admanager . axis . v201805 . SecurityPolicySettings securityPolicy ) { this . securityPolicy = securityPolicy ; } | Sets the securityPolicy value for this MediaLocationSettings . |
39,689 | public com . google . api . ads . adwords . axis . v201809 . rm . UserListLogicalRule [ ] getRules ( ) { return rules ; } | Gets the rules value for this LogicalUserList . |
39,690 | public com . google . api . ads . admanager . axis . v201902 . GrpTargetGender getTargetGender ( ) { return targetGender ; } | Gets the targetGender value for this GrpSettings . |
39,691 | public void setTimeUnit ( com . google . api . ads . admanager . axis . v201808 . TimeUnit timeUnit ) { this . timeUnit = timeUnit ; } | Sets the timeUnit value for this FrequencyCap . |
39,692 | public com . google . api . ads . admanager . axis . v201808 . ViewabilityProvider getViewabilityProvider ( ) { return viewabilityProvider ; } | Gets the viewabilityProvider value for this Company . |
39,693 | public com . google . api . ads . admanager . axis . v201808 . Technology [ ] getTargetedDeviceCategories ( ) { return targetedDeviceCategories ; } | Gets the targetedDeviceCategories value for this DeviceCategoryTargeting . |
39,694 | public void setTargetedDeviceCategories ( com . google . api . ads . admanager . axis . v201808 . Technology [ ] targetedDeviceCategories ) { this . targetedDeviceCategories = targetedDeviceCategories ; } | Sets the targetedDeviceCategories value for this DeviceCategoryTargeting . |
39,695 | public com . google . api . ads . admanager . axis . v201808 . Technology [ ] getExcludedDeviceCategories ( ) { return excludedDeviceCategories ; } | Gets the excludedDeviceCategories value for this DeviceCategoryTargeting . |
39,696 | public com . google . api . ads . admanager . axis . v201811 . BreakdownForecast getForecast ( ) { return forecast ; } | Gets the forecast value for this ForecastBreakdownEntry . |
39,697 | public void setForecast ( com . google . api . ads . admanager . axis . v201811 . BreakdownForecast forecast ) { this . forecast = forecast ; } | Sets the forecast value for this ForecastBreakdownEntry . |
39,698 | public void setVideoPosition ( com . google . api . ads . admanager . axis . v201808 . VideoPosition videoPosition ) { this . videoPosition = videoPosition ; } | Sets the videoPosition value for this VideoPositionTarget . |
39,699 | public com . google . api . ads . admanager . axis . v201808 . VideoBumperType getVideoBumperType ( ) { return videoBumperType ; } | Gets the videoBumperType value for this VideoPositionTarget . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.