Package com.google.api.ads.dfp.axis.v201306

Examples of com.google.api.ads.dfp.axis.v201306.Date


*/
public class CreateTeams {

  public static void runExample(DfpServices dfpServices, DfpSession session) throws Exception {
    // Get the TeamService.
    TeamServiceInterface teamService =
        dfpServices.get(session, TeamServiceInterface.class);

    // Create a read/write team.
    Team readWriteTeam = new Team();
    readWriteTeam.setName("Read/write team #" + new Random().nextInt(Integer.MAX_VALUE));
    readWriteTeam.setTeamAccessType(TeamAccessType.READ_WRITE);
    readWriteTeam.setHasAllCompanies(false);
    readWriteTeam.setHasAllInventory(false);

    // Create a read-only team.
    Team readOnlyTeam = new Team();
    readOnlyTeam.setName("Read-only team #" + new Random().nextInt(Integer.MAX_VALUE));
    readOnlyTeam.setTeamAccessType(TeamAccessType.READ_ONLY);
    readOnlyTeam.setHasAllCompanies(false);
    readOnlyTeam.setHasAllInventory(false);

    // Create the teams on the server.
    Team[] teams = teamService.createTeams(new Team[] {readWriteTeam, readOnlyTeam});

    for (Team createdTeam : teams) {
      System.out.printf("A team with ID \"%d\" and name \"%s\" was created.\n",
          createdTeam.getId(), createdTeam.getName());
    }
View Full Code Here


      // Create action.
      com.google.api.ads.dfp.axis.v201306.DeactivateCustomFields action =
          new com.google.api.ads.dfp.axis.v201306.DeactivateCustomFields();

      // Perform action.
      UpdateResult result = customFieldService.performCustomFieldAction(
          action, statementBuilder.toStatement());

      if (result != null && result.getNumChanges() > 0) {
        System.out.printf("Number of custom fields deactivated: %d\n", result.getNumChanges());
      } else {
        System.out.println("No custom fields were deactivated.");
      }
    }
  }
View Full Code Here

      // Create action.
      com.google.api.ads.dfp.axis.v201306.DeactivateLabels action =
          new com.google.api.ads.dfp.axis.v201306.DeactivateLabels();

      // Perform action.
      UpdateResult result = labelService.performLabelAction(
          action, statementBuilder.toStatement());

      if (result != null && result.getNumChanges() > 0) {
        System.out.printf("Number of labels deactivated: %d\n", result.getNumChanges());
      } else {
        System.out.println("No labels were deactivated.");
      }
    }
  }
View Full Code Here

      // Create action.
      com.google.api.ads.dfp.axis.v201306.DeactivatePlacements action =
          new com.google.api.ads.dfp.axis.v201306.DeactivatePlacements();

      // Perform action.
      UpdateResult result =
          placementService.performPlacementAction(action, statementBuilder.toStatement());

      if (result != null && result.getNumChanges() > 0) {
        System.out.printf("Number of placements deactivated: %d\n", result.getNumChanges());
      } else {
        System.out.println("No placements were deactivated.");
      }
    }
  }
View Full Code Here

      throws Exception {
    // Get the UserService.
    UserServiceInterface userService = dfpServices.get(session, UserServiceInterface.class);

    // Get the user.
    User user = userService.getUser(userId);

    // Set the role of the user to a salesperson.
    // To determine what other roles exist, run GetAllRoles.java.
    user.setRoleId(-5L);

    // Update the user on the server.
    User[] users = userService.updateUsers(new User[] {user});

    for (User updatedUser : users) {
View Full Code Here

  private static final String USER_ID = "INSERT_USER_ID_HERE";

  public static void runExample(DfpServices dfpServices, DfpSession session, long userId)
      throws Exception {
    // Get the UserService.
    UserServiceInterface userService = dfpServices.get(session, UserServiceInterface.class);

    // Get the user.
    User user = userService.getUser(userId);

    // Set the role of the user to a salesperson.
    // To determine what other roles exist, run GetAllRoles.java.
    user.setRoleId(-5L);

    // Update the user on the server.
    User[] users = userService.updateUsers(new User[] {user});

    for (User updatedUser : users) {
      System.out.printf("User with ID \"%d\" and name \"%s\" was updated.\n",
          updatedUser.getId(), updatedUser.getName());
    }
View Full Code Here

    numberValue3 = new NumberValue();
    numberValue3.setValue("-1");

    dateTime1 = new DateTime();
    date1 = new Date();
    date1.setYear(2012);
    date1.setMonth(12);
    date1.setDay(2);
    dateTime1.setDate(date1);
    dateTime1.setHour(12);
View Full Code Here

    numberValue3 = new NumberValue();
    numberValue3.setValue("-1");

    dateTime1 = new DateTime();
    date1 = new Date();
    date1.setYear(2012);
    date1.setMonth(12);
    date1.setDay(2);
    dateTime1.setDate(date1);
    dateTime1.setHour(12);
View Full Code Here

    numberValue3 = new NumberValue();
    numberValue3.setValue("-1");

    dateTime1 = new DateTime();
    Date date1 = new Date();
    date1.setYear(2012);
    date1.setMonth(12);
    date1.setDay(2);
    dateTime1.setDate(date1);
    dateTime1.setHour(12);
    dateTime1.setMinute(45);
    dateTime1.setSecond(0);
    dateTime1.setTimeZoneID(TIME_ZONE_ID1);
View Full Code Here

    numberValue3 = new NumberValue();
    numberValue3.setValue("-1");

    dateTime1 = new DateTime();
    Date date1 = new Date();
    date1.setYear(2012);
    date1.setMonth(12);
    date1.setDay(2);
    dateTime1.setDate(date1);
    dateTime1.setHour(12);
    dateTime1.setMinute(45);
    dateTime1.setSecond(0);
    dateTime1.setTimeZoneID(TIME_ZONE_ID1);
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.axis.v201306.Date

Copyright © 2018 www.massapicom. 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.