Examples of mutate()


Examples of com.google.api.ads.adwords.axis.v201402.cm.CampaignFeedServiceInterface.mutate()

    CampaignFeedOperation operation = new CampaignFeedOperation();
    operation.setOperand(campaignFeed);
    operation.setOperator(Operator.ADD);
    CampaignFeedReturnValue result =
        campaignFeedService.mutate(new CampaignFeedOperation[] {operation});
    for (CampaignFeed savedCampaignFeed : result.getValue()) {
      System.out.printf("Campaign with ID %d was associated with feed with ID %d.\n",
          savedCampaignFeed.getCampaignId(), savedCampaignFeed.getFeedId());
    }
  }
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.CampaignServiceInterface.mutate()

    operation2.setOperator(Operator.ADD);

    CampaignOperation[] operations = new CampaignOperation[] {operation, operation2};

    // Add campaigns.
    CampaignReturnValue result = campaignService.mutate(operations);

    // Display campaigns.
    for (Campaign campaignResult : result.getValue()) {
      System.out.println("Campaign with name \"" + campaignResult.getName() + "\" and id \""
          + campaignResult.getId() + "\" was added.");
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.ConversionTrackerServiceInterface.mutate()

    operation.setOperand(adWordsConversionTracker);

    ConversionTrackerOperation[] operations = new ConversionTrackerOperation[] {operation};

    // Add conversion.
    ConversionTrackerReturnValue result = service.mutate(operations);

    // Display conversion.
    for (ConversionTracker conversionTracker : result.getValue()) {
      if (conversionTracker instanceof AdWordsConversionTracker) {
        AdWordsConversionTracker newAdWordsConversionTracker =
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.CustomerFeedServiceInterface.mutate()

    int numberOfAttempts = 0;
    do {
      numberOfAttempts++;
      try {
        CustomerFeedReturnValue customerFeedResult =
            customerFeedService.mutate(new CustomerFeedOperation[] {customerFeedOperation});
        addedCustomerFeed = customerFeedResult.getValue(0);
        System.out.printf("Attempt #%d to add the CustomerFeed was successful%n", numberOfAttempts);
      } catch (Exception e) {
        // Wait using exponential backoff policy
        long sleepSeconds = (long) Math.scalb(5, numberOfAttempts);
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.ExperimentServiceInterface.mutate()

    operation.setOperator(Operator.SET);

    ExperimentOperation[] operations = new ExperimentOperation[] {operation};

    // Promote experiment.
    ExperimentReturnValue result = experimentService.mutate(operations);

    // Display experiments.
    for (Experiment experimentResult : result.getValue()) {
      System.out.println("Experiment with name \"" + experimentResult.getName() + "\" and id \""
          + experimentResult.getId() + "\" was promoted.");
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.FeedItemServiceInterface.mutate()

      operation.setOperator(Operator.SET);
      operation.setOperand(feedItem);
      itemOperations.add(operation);
    }
    FeedItemReturnValue itemsUpdateReturnValue =
        feedItemService.mutate(itemOperations.toArray(new FeedItemOperation[0]));
    System.out.printf("Updated %d items%n", itemsUpdateReturnValue.getValue().length);
  }

  // See the Placeholder reference page for a list of all the placeholder types
  // and fields:
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.FeedMappingServiceInterface.mutate()

        .build();

    FeedMapping feedMapping = mappingService.get(selector).getEntries()[0];

    // Remove the existing mapping (FeedMapping is immutable).
    feedMapping = mappingService.mutate(new FeedMappingOperation[] {
        new FeedMappingOperation(Operator.REMOVE, null, feedMapping)}).getValue(0);

    // Create line 1 and line 2 attribute field mappings.
    AttributeFieldMapping line1FieldMapping = new AttributeFieldMapping();
    line1FieldMapping.setFeedAttributeId(line1FeedAttribute.getId());
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.FeedServiceInterface.mutate()

    FeedOperation feedOperation = new FeedOperation();
    feedOperation.setOperand(feed);
    feedOperation.setOperator(Operator.SET);

    FeedServiceInterface feedService = adWordsServices.get(session, FeedServiceInterface.class);
    FeedReturnValue mutateFeedResult = feedService.mutate(new FeedOperation[] {feedOperation});

    // Get the new attributes from the mutated feed.
    Feed mutatedFeed = mutateFeedResult.getValue()[0];
    line1Attribute = mutatedFeed.getAttributes(nextAttributeIndex);
    line2Attribute = mutatedFeed.getAttributes(nextAttributeIndex + 1);
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.MutateJobServiceInterface.mutate()

    BulkMutateJobPolicy policy = new BulkMutateJobPolicy();
    policy.setPrerequisiteJobIds(new long[] {});

    // Call mutate to create a new job.
    SimpleMutateJob response =
        mutateJobService.mutate(operations.toArray(new Operation[operations.size()]), policy);

    long jobId = response.getId();
    System.out.printf("Job with ID %d was successfully created.\n", jobId);

    // Create selector to retrieve job status and wait for it to complete.
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.OfflineConversionFeedServiceInterface.mutate()

    OfflineConversionFeedOperation offlineConversionOperation =
        new OfflineConversionFeedOperation();
    offlineConversionOperation.setOperator(Operator.ADD);
    offlineConversionOperation.setOperand(feed);

    OfflineConversionFeedReturnValue offlineConversionReturnValue = offlineConversionFeedService
        .mutate(new OfflineConversionFeedOperation[] {offlineConversionOperation});

    OfflineConversionFeed newFeed = offlineConversionReturnValue.getValue(0);

    System.out.printf(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.