Examples of SubnetworkRemote


Examples of com.google.api.ads.dfa.axis.v1_19.SubnetworkRemote

  private static final String PERMISSION_TWO = "INSERT_SECOND_PERMISSION_ID_HERE";

  public static void runExample(DfaServices dfaServices, DfaSession session, String subnetworkName,
      long networkId, long permissionOneId, long permissionTwoId) throws Exception {
    // Request the service.
    SubnetworkRemote service = dfaServices.get(session, SubnetworkRemote.class);

    // Create subnetwork structure.
    Subnetwork subnetwork = new Subnetwork();
    subnetwork.setId(0);
    subnetwork.setName(subnetworkName);
    subnetwork.setNetworkId(networkId);

    // Create an array of all permissions assigned to this subnetwork and add
    // it to the subnetwork structure. To get list of available permissions,
    // run GetAvailablePermissions.java.
    long[] permissions = new long[] {permissionOneId, permissionTwoId};
    subnetwork.setAvailablePermissions(permissions);

    // Create subnetwork.
    SubnetworkSaveResult subnetworkSaveResult = service.saveSubnetwork(subnetwork);

    // Display subnetwork ID.
    System.out.printf("Subnetwork with ID \"%s\" was created.%n", subnetworkSaveResult.getId());
  }
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_19.SubnetworkRemote

  private static final String SEARCH_STRING = "INSERT_SEARCH_CRITERIA_HERE";

  public static void runExample(
      DfaServices dfaServices, DfaSession session, String searchString) throws Exception {
    // Request the service.
    SubnetworkRemote service = dfaServices.get(session, SubnetworkRemote.class);

    // Set subnetwork search criteria.
    SubnetworkSearchCriteria searchCriteria = new SubnetworkSearchCriteria();
    searchCriteria.setPageSize(10);
    searchCriteria.setSearchString(searchString);

    // Get subnetworks.
    SubnetworkRecordSet subnetworks = service.getSubnetworks(searchCriteria);

    // Display subnetwork names, IDs, and subnetwork IDs.
    if (subnetworks.getRecords() != null) {
      for (Subnetwork result : subnetworks.getRecords()) {
        System.out.println("Subnetwork with name \"" + result.getName()
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_20.SubnetworkRemote

  private static final String PERMISSION_TWO = "INSERT_SECOND_PERMISSION_ID_HERE";

  public static void runExample(DfaServices dfaServices, DfaSession session, String subnetworkName,
      long networkId, long permissionOneId, long permissionTwoId) throws Exception {
    // Request the service.
    SubnetworkRemote service = dfaServices.get(session, SubnetworkRemote.class);

    // Create subnetwork structure.
    Subnetwork subnetwork = new Subnetwork();
    subnetwork.setId(0);
    subnetwork.setName(subnetworkName);
    subnetwork.setNetworkId(networkId);

    // Create an array of all permissions assigned to this subnetwork and add
    // it to the subnetwork structure. To get list of available permissions,
    // run GetAvailablePermissions.java.
    long[] permissions = new long[] {permissionOneId, permissionTwoId};
    subnetwork.setAvailablePermissions(permissions);

    // Create subnetwork.
    SubnetworkSaveResult subnetworkSaveResult = service.saveSubnetwork(subnetwork);

    // Display subnetwork ID.
    System.out.printf("Subnetwork with ID \"%s\" was created.%n", subnetworkSaveResult.getId());
  }
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_20.SubnetworkRemote

  private static final String SEARCH_STRING = "INSERT_SEARCH_CRITERIA_HERE";

  public static void runExample(
      DfaServices dfaServices, DfaSession session, String searchString) throws Exception {
    // Request the service.
    SubnetworkRemote service = dfaServices.get(session, SubnetworkRemote.class);

    // Set subnetwork search criteria.
    SubnetworkSearchCriteria searchCriteria = new SubnetworkSearchCriteria();
    searchCriteria.setPageSize(10);
    searchCriteria.setSearchString(searchString);

    // Get subnetworks.
    SubnetworkRecordSet subnetworks = service.getSubnetworks(searchCriteria);

    // Display subnetwork names, IDs, and subnetwork IDs.
    if (subnetworks.getRecords() != null) {
      for (Subnetwork result : subnetworks.getRecords()) {
        System.out.println("Subnetwork with name \"" + result.getName()
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.