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

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


      // 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

    // Get the NetworkService.
    NetworkServiceInterface networkService =
        dfpServices.get(session, NetworkServiceInterface.class);

    // Make the test network.
    Network network = networkService.makeTestNetwork();

    System.out.printf(
        "Test network with network code \"%s\" and display name \"%s\" created.\n"
        + "You may now sign in at https://www.google.com/dfp/main?networkCode=%s\n",
        network.getNetworkCode(), network.getDisplayName(), network.getNetworkCode());
  }
View Full Code Here

    // Get the NetworkService.
    NetworkServiceInterface networkService =
        dfpServices.get(session, NetworkServiceInterface.class);

    // Get the current network.
    Network network = networkService.getCurrentNetwork();

    System.out.printf("Current network has network code \"%s\" and display name \"%s\".\n",
        network.getNetworkCode(), network.getDisplayName());
  }
View Full Code Here

    // Get the NetworkService.
    NetworkServiceInterface networkService =
        dfpServices.get(session, NetworkServiceInterface.class);

    // Gets the current network.
    Network network = networkService.getCurrentNetwork();

    System.out.printf("Current network has network code \"%s\" and display name \"%s\".\n",
        network.getNetworkCode(), network.getDisplayName());
  }
View Full Code Here

    // Get the NetworkService.
    NetworkServiceInterface networkService =
        dfpServices.get(session, NetworkServiceInterface.class);

    // Get the current network.
    Network network = networkService.getCurrentNetwork();

    System.out.printf("Current network has network code \"%s\" and display name \"%s\".\n",
        network.getNetworkCode(), network.getDisplayName());
  }
View Full Code Here

    // Get the NetworkService.
    NetworkServiceInterface networkService =
        dfpServices.get(session, NetworkServiceInterface.class);

    // Make the test network.
    Network network = networkService.makeTestNetwork();

    System.out.printf(
        "Test network with network code \"%s\" and display name \"%s\" created.\n"
        + "You may now sign in at https://www.google.com/dfp/main?networkCode=%s\n",
        network.getNetworkCode(), network.getDisplayName(), network.getNetworkCode());
  }
View Full Code Here

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201208.NETWORK_SERVICE);

      // Get the current network.
      Network network = networkService.getCurrentNetwork();

      System.out.println("Current network has network code \"" + network.getNetworkCode()
          + "\" and display name \"" + network.getDisplayName() + "\".");
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201208.NETWORK_SERVICE);

      // Make the test network.
      Network network = networkService.makeTestNetwork();

      System.out.println("Test network with network code \"" + network.getNetworkCode()
          + "\" and display name \"" + network.getDisplayName() + "\" created.\n"
          + "You may now sign in at http://www.google.com/dfp/main?networkCode="
          + network.getNetworkCode());
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

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

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.