Examples of mutate()


Examples of com.google.api.adwords.v201309.cm.BudgetServiceInterface.mutate()

    operation.setOperator(Operator.ADD);

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

    // Make the mutate request.
    BudgetReturnValue result = budgetService.mutate(operations);
    Budget newBudget = result.getValue(0);

    System.out.printf("Budget with name '%s', ID %d was created.\n", newBudget.getName(),
        newBudget.getBudgetId());
View Full Code Here

Examples of com.google.api.adwords.v201309.cm.CampaignCriterionServiceInterface.mutate()

    campaignCriterion.setBidModifier(1.5);
    operation.setOperand(campaignCriterion);
    operation.setOperator(Operator.SET);

    CampaignCriterionReturnValue result =
        campaignCriterionService.mutate(new CampaignCriterionOperation[] {operation});

    // Display campaign criteria.
    if (result != null && result.getValue() != null) {
      for (CampaignCriterion campaignCriterionResult : result.getValue()) {
        System.out.printf("Campaign criterion with campaign id '%s', criterion id '%s', "
View Full Code Here

Examples of com.google.api.adwords.v201309.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.adwords.v201309.cm.CampaignServiceInterface.mutate()

      operation.setOperator(Operator.SET);

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

      // Update campaign.
      CampaignReturnValue result = campaignService.mutate(operations);

      // Display campaigns.
      if (result != null && result.getValue() != null) {
        for (Campaign campaignResult : result.getValue()) {
          System.out.println("Campaign with name \"" + campaignResult.getName() + "\", id \""
View Full Code Here

Examples of com.google.api.adwords.v201309.cm.ConversionTrackerServiceInterface.mutate()

    ConversionTrackerOperation uploadConversionOperation = new ConversionTrackerOperation();
    uploadConversionOperation.setOperator(Operator.ADD);
    uploadConversionOperation.setOperand(uploadConversion);

    ConversionTrackerReturnValue conversionTrackerReturnValue = conversionTrackerService.mutate(
        new ConversionTrackerOperation[] {uploadConversionOperation});

    UploadConversion newUploadConversion =
        (UploadConversion) conversionTrackerReturnValue.getValue(0);
View Full Code Here

Examples of com.google.api.adwords.v201309.cm.ExperimentServiceInterface.mutate()

      operation.setOperator(Operator.SET);

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

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

      // Display experiments.
      if (result.getValue() != null) {
        for(Experiment experimentResult : result.getValue()) {
          System.out.println("Experiment with name \"" + experimentResult.getName()
View Full Code Here

Examples of com.google.api.adwords.v201309.cm.FeedItemServiceInterface.mutate()

        newSiteLinkFeedItemAddOperation(siteLinksData, "About Us", "http://www.example.com/about");

    FeedItemOperation[] operations =
        new FeedItemOperation[] {home, stores, onSale, support, products, aboutUs};

    FeedItemReturnValue result = feedItemService.mutate(operations);
    for (FeedItem item : result.getValue()) {
      System.out.printf("FeedItem with feedItemId %d was added.\n", item.getFeedItemId());
      siteLinksData.siteLinkFeedItemIds.add(item.getFeedItemId());
    }
  }
View Full Code Here

Examples of com.google.api.adwords.v201309.cm.FeedMappingServiceInterface.mutate()

    operation.setOperand(feedMapping);
    operation.setOperator(Operator.ADD);

    // Save the field mapping.
    FeedMappingReturnValue result =
        feedMappingService.mutate(new FeedMappingOperation[] {operation});
    for (FeedMapping savedFeedMapping : result.getValue()) {
      System.out.printf(
          "Feed mapping with id %d and placeholderType %d was saved for feed with id %d.\n",
          savedFeedMapping.getFeedMappingId(), savedFeedMapping.getPlaceholderType(),
          savedFeedMapping.getFeedId());
View Full Code Here

Examples of com.google.api.adwords.v201309.cm.FeedServiceInterface.mutate()

    FeedOperation operation = new FeedOperation();
    operation.setOperand(siteLinksFeed);
    operation.setOperator(Operator.ADD);

    // Add the feed.
    FeedReturnValue result = feedService.mutate(new FeedOperation[] {operation});

    Feed savedFeed = result.getValue()[0];
    siteLinksData.siteLinksFeedId = savedFeed.getId();
    FeedAttribute[] savedAttributes = savedFeed.getAttributes();
    siteLinksData.linkTextFeedAttributeId = savedAttributes[0].getId();
View Full Code Here

Examples of com.google.api.adwords.v201309.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
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.