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

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


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

    // Get the current user.
    User user = userService.getCurrentUser();

    System.out.printf(
        "User with ID \"%d\", name \"%s\", email \"%s\", and role \"%s\" is the current user.\n",
        user.getId(), user.getName(), user.getEmail(), user.getRoleName());
  }
View Full Code Here


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

    // Create a user.
    User traffickerUser = new User();
    traffickerUser.setEmail(emailAddress);
    traffickerUser.setName(name);
    traffickerUser.setPreferredLocale("en_US");

    // Set the system defined ID of the trafficker role.
    // To determine what other roles exist, run GetAllRoles.java.
    traffickerUser.setRoleId(-7L);

    // Create the user on the server.
    User[] users = userService.createUsers(new User[] {traffickerUser});

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

    // Default for total result set size.
    int totalResultSetSize = 0;

    do {
      // Get users by statement.
      UserPage page = userService.getUsersByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (User user : page.getResults()) {
          System.out.printf("%d) User with ID \"%d\" and name \"%s\" was found.\n", i++,
              user.getId(), user.getName());
        }
      }
View Full Code Here

    // Default for total result set size.
    int totalResultSetSize = 0;

    do {
      // Get users by statement.
      UserPage page = userService.getUsersByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (User user : page.getResults()) {
          System.out.printf("%d) User with ID \"%d\" and name \"%s\" was found.\n", i++,
              user.getId(), user.getName());
        }
      }
View Full Code Here

*/
public class GetAllUsers {

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

    // Create a statement to get all users.
    StatementBuilder statementBuilder = new StatementBuilder()
        .orderBy("id ASC")
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT);

    // Default for total result set size.
    int totalResultSetSize = 0;

    do {
      // Get users by statement.
      UserPage page = userService.getUsersByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (User user : page.getResults()) {
View Full Code Here

  private static final String EMAIL_ADDRESS = "INSERT_EMAIL_ADDRESS_HERE";

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

    // Create a statement to select users by email address.
    StatementBuilder statementBuilder = new StatementBuilder()
        .where("email = :email")
        .orderBy("id ASC")
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT)
        .withBindVariableValue("email", emailAddress);

    // Default for total result set size.
    int totalResultSetSize = 0;

    do {
      // Get users by statement.
      UserPage page = userService.getUsersByStatement(statementBuilder.toStatement());

      if (page.getResults() != null) {
        totalResultSetSize = page.getTotalResultSetSize();
        int i = page.getStartIndex();
        for (User user : page.getResults()) {
View Full Code Here

*/
public class GetAllRoles {

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

    // Get all roles.
    Role[] roles = userService.getAllRoles();

    int i = 0;
    for (Role role : roles) {
      System.out.printf("%d) Role with ID \"%d\" and name \"%s\" was found.\n", i++, role.getId(),
          role.getName());
View Full Code Here

*/
public class GetCurrentUser {

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

    // Get the current user.
    User user = userService.getCurrentUser();

    System.out.printf(
        "User with ID \"%d\", name \"%s\", email \"%s\", and role \"%s\" is the current user.\n",
        user.getId(), user.getName(), user.getEmail(), user.getRoleName());
  }
View Full Code Here

  private static final String NAME = "INSERT_NAME_HERE";

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

    // Create a user.
    User traffickerUser = new User();
    traffickerUser.setEmail(emailAddress);
    traffickerUser.setName(name);
    traffickerUser.setPreferredLocale("en_US");

    // Set the system defined ID of the trafficker role.
    // To determine what other roles exist, run GetAllRoles.java.
    traffickerUser.setRoleId(-7L);

    // Create the user on the server.
    User[] users = userService.createUsers(new User[] {traffickerUser});

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

    // Get the UserTeamAssociationService.
    UserTeamAssociationServiceInterface userTeamAssociationService =
        dfpServices.get(session, UserTeamAssociationServiceInterface.class);

    // Create a user team association.
    UserTeamAssociation userTeamAssociation = new UserTeamAssociation();
    userTeamAssociation.setUserId(userId);
    userTeamAssociation.setTeamId(teamId);

    // Create the user team association on the server.
    UserTeamAssociation[] userTeamAssociations =
        userTeamAssociationService.createUserTeamAssociations(
            new UserTeamAssociation[] {userTeamAssociation});
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.axis.v201302.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.