Package com.google.api.ads.dfa.axis.v1_19

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


    // Get size.
    SizeSearchCriteria sizeSearchCriteria = new SizeSearchCriteria();
    sizeSearchCriteria.setHeight(height);
    sizeSearchCriteria.setWidth(width);
    SizeRecordSet sizeRecordSet = sizeService.getSizes(sizeSearchCriteria);

    // Display size ID.
    if (sizeRecordSet.getRecords().length > 0) {
      for (Size size: sizeRecordSet.getRecords()) {
        System.out.printf("Size ID for \"%sx%s\" is \"%s\".%n", width, height, size.getId());
      }
    } else {
      System.out.println("No sizes found for your criteria.");
    }
View Full Code Here


  private static final String HEIGHT = "INSERT_HEIGHT_HERE";

  public static void runExample(
      DfaServices dfaServices, DfaSession session, int width, int height) throws Exception {
    // Request the size service from the service client factory.
    SizeRemote sizeService = dfaServices.get(session, SizeRemote.class);

    // Get size.
    SizeSearchCriteria sizeSearchCriteria = new SizeSearchCriteria();
    sizeSearchCriteria.setHeight(height);
    sizeSearchCriteria.setWidth(width);
    SizeRecordSet sizeRecordSet = sizeService.getSizes(sizeSearchCriteria);

    // Display size ID.
    if (sizeRecordSet.getRecords().length > 0) {
      for (Size size: sizeRecordSet.getRecords()) {
        System.out.printf("Size ID for \"%sx%s\" is \"%s\".%n", width, height, size.getId());
View Full Code Here

      DfaServices dfaServices, DfaSession session, int width, int height) throws Exception {
    // Request the size service from the service client factory.
    SizeRemote sizeService = dfaServices.get(session, SizeRemote.class);

    // Get size.
    SizeSearchCriteria sizeSearchCriteria = new SizeSearchCriteria();
    sizeSearchCriteria.setHeight(height);
    sizeSearchCriteria.setWidth(width);
    SizeRecordSet sizeRecordSet = sizeService.getSizes(sizeSearchCriteria);

    // Display size ID.
    if (sizeRecordSet.getRecords().length > 0) {
      for (Size size: sizeRecordSet.getRecords()) {
View Full Code Here

    SpotlightActivityGroupSearchCriteria activityGroupSearchCriteria =
        new SpotlightActivityGroupSearchCriteria();
    activityGroupSearchCriteria.setAdvertiserId(advertiserId);

    // Get activity group.
    SpotlightActivityGroupRecordSet spotlightActivityGroupRecordSet =
        service.getSpotlightActivityGroups(activityGroupSearchCriteria);

    // Display activity group names and IDs.
    if (spotlightActivityGroupRecordSet.getRecords() != null) {
      for (SpotlightActivityGroup result : spotlightActivityGroupRecordSet.getRecords()) {
        System.out.println("Activity group with name \"" + result.getName()
            + "\" and ID \"" + result.getId() + "\" was found.");
      }
    } else {
      System.out.print("No activity groups found for your criteria.");
View Full Code Here

    // Request the service.
    SpotlightRemote service = dfaServices.get(session, SpotlightRemote.class);

    // Set activity group search criteria structure and
    // use advertiser ID as search criteria.
    SpotlightActivityGroupSearchCriteria activityGroupSearchCriteria =
        new SpotlightActivityGroupSearchCriteria();
    activityGroupSearchCriteria.setAdvertiserId(advertiserId);

    // Get activity group.
    SpotlightActivityGroupRecordSet spotlightActivityGroupRecordSet =
        service.getSpotlightActivityGroups(activityGroupSearchCriteria);
View Full Code Here

*/
public class GetCountries {

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

    // Set search criteria.
    CountrySearchCriteria countrySearchCriteria = new CountrySearchCriteria ();
    countrySearchCriteria.setSecure(false);

    // Get countries.
    Country[] countries = service.getCountriesByCriteria(countrySearchCriteria);

    // Display country names, codes and secure server support information.
    for (Country result : countries) {
      System.out.println("Country name \"" + result.getName()
          + "\", country code \"" + result.getCountryCode() + "\", supports a secure server? \""
View Full Code Here

  private static final String ADVERTISER_ID = "INSERT_ADVERTISER_ID_HERE";

  public static void runExample(
      DfaServices dfaServices, DfaSession session, long advertiserId) throws Exception {
    // Request the service.
    SpotlightRemote service = dfaServices.get(session, SpotlightRemote.class);

    // Set activity group search criteria structure and
    // use advertiser ID as search criteria.
    SpotlightActivityGroupSearchCriteria activityGroupSearchCriteria =
        new SpotlightActivityGroupSearchCriteria();
    activityGroupSearchCriteria.setAdvertiserId(advertiserId);

    // Get activity group.
    SpotlightActivityGroupRecordSet spotlightActivityGroupRecordSet =
        service.getSpotlightActivityGroups(activityGroupSearchCriteria);

    // Display activity group names and IDs.
    if (spotlightActivityGroupRecordSet.getRecords() != null) {
      for (SpotlightActivityGroup result : spotlightActivityGroupRecordSet.getRecords()) {
        System.out.println("Activity group with name \"" + result.getName()
View Full Code Here

      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.
View Full Code Here

  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

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

TOP

Related Classes of com.google.api.ads.dfa.axis.v1_19.UserProfile

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.