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

Examples of com.google.api.ads.dfp.v201306.Location


    return b.toString();
  }

    public Location provideLocation(Location location, int index, int repetition) {
        if (location.getField() < 0)
            return new Location(location)
                .withField(index)
                .withFieldRepetition(repetition);
        if (location.getComponent() < 0)
            return new Location(location)
                .withComponent(index);
        return new Location(location)
            .withSubcomponent(index);
    }
View Full Code Here


    GeoTargeting geoTargeting = new GeoTargeting();

    // Include the US, Quebec, Canada, and the B3P Canada postal code.
    // To determine what other geographic criteria exists,
    // run GetGeoTargets.java.
    Location countryLocation = new Location();
    countryLocation.setId(2840L);

    Location regionLocation = new Location();
    regionLocation.setId(20133L);

    Location postalCodeLocation = new Location();
    postalCodeLocation.setId(9000093L);

    geoTargeting.setTargetedLocations(new Location[] {countryLocation, regionLocation,
        postalCodeLocation});

    // Exclude Chicago and the New York metro area.
    // To determine what other geographic criteria exists, run
    // GetGeoTargets.java.
    Location cityLocation = new Location();
    cityLocation.setId(1016367L);

    Location metroLocation = new Location();
    metroLocation.setId(200501L);
    geoTargeting.setExcludedLocations(new Location[] {cityLocation, metroLocation});

    // Exclude domains that are not under the network's control.
    UserDomainTargeting userDomainTargeting = new UserDomainTargeting();
    userDomainTargeting.setDomains(new String[] {"usa.gov"});
View Full Code Here

    GeoTargeting geoTargeting = new GeoTargeting();

    // Include the US, Quebec, Canada, and the B3P Canada postal code.
    // To determine what other geographic criteria exists,
    // run GetGeoTargets.java.
    Location countryLocation = new Location();
    countryLocation.setId(2840L);

    Location regionLocation = new Location();
    regionLocation.setId(20133L);

    Location postalCodeLocation = new Location();
    postalCodeLocation.setId(9000093L);

    geoTargeting.setTargetedLocations(new Location[] {countryLocation, regionLocation,
        postalCodeLocation});

    // Exclude Chicago and the New York metro area.
    // To determine what other geographic criteria exists, run
    // GetGeoTargets.java.
    Location cityLocation = new Location();
    cityLocation.setId(1016367L);

    Location metroLocation = new Location();
    metroLocation.setId(200501L);
    geoTargeting.setExcludedLocations(new Location[] {cityLocation, metroLocation});

    // Exclude domains that are not under the network's control.
    UserDomainTargeting userDomainTargeting = new UserDomainTargeting();
    userDomainTargeting.setDomains(new String[] {"usa.gov"});
View Full Code Here

    GeoTargeting geoTargeting = new GeoTargeting();

    // Include the US, Quebec, Canada, and the B3P Canada postal code.
    // To determine what other geographic criteria exists,
    // run GetGeoTargets.java.
    Location countryLocation = new Location();
    countryLocation.setId(2840L);

    Location regionLocation = new Location();
    regionLocation.setId(20133L);

    Location postalCodeLocation = new Location();
    postalCodeLocation.setId(9000093L);

    geoTargeting.setTargetedLocations(new Location[] {countryLocation, regionLocation,
        postalCodeLocation});

    // Exclude Chicago and the New York metro area.
    // To determine what other geographic criteria exists, run
    // GetGeoTargets.java.
    Location cityLocation = new Location();
    cityLocation.setId(1016367L);

    Location metroLocation = new Location();
    metroLocation.setId(200501L);
    geoTargeting.setExcludedLocations(new Location[] {cityLocation, metroLocation});

    // Exclude domains that are not under the network's control.
    UserDomainTargeting userDomainTargeting = new UserDomainTargeting();
    userDomainTargeting.setDomains(new String[] {"usa.gov"});
View Full Code Here

    GeoTargeting geoTargeting = new GeoTargeting();

    // Include the US, Quebec, Canada, and the B3P Canada postal code.
    // To determine what other geographic criteria exists,
    // run GetGeoTargets.java.
    Location countryLocation = new Location();
    countryLocation.setId(2840L);

    Location regionLocation = new Location();
    regionLocation.setId(20133L);

    Location postalCodeLocation = new Location();
    postalCodeLocation.setId(9000093L);

    geoTargeting.setTargetedLocations(new Location[] {countryLocation, regionLocation,
        postalCodeLocation});

    // Exclude Chicago and the New York metro area.
    // To determine what other geographic criteria exists, run
    // GetGeoTargets.java.
    Location cityLocation = new Location();
    cityLocation.setId(1016367L);

    Location metroLocation = new Location();
    metroLocation.setId(200501L);
    geoTargeting.setExcludedLocations(new Location[] {cityLocation, metroLocation});

    // Exclude domains that are not under the network's control.
    UserDomainTargeting userDomainTargeting = new UserDomainTargeting();
    userDomainTargeting.setDomains(new String[] {"usa.gov"});
View Full Code Here

      // Create geographical targeting.
      GeoTargeting geoTargeting = new GeoTargeting();

      // Include the US, Quebec, Canada, and the B3P Canada postal code.
      Location countryLocation = new Location();
      countryLocation.setId(2840L);

      Location regionLocation = new Location();
      regionLocation.setId(20123L);

      Location postalCodeLocation = new Location();
      postalCodeLocation.setId(9000093L);

      geoTargeting.setTargetedLocations(new Location[] {countryLocation, regionLocation,
          postalCodeLocation});

      // Exclude Chicago and the New York metro area.
      Location cityLocation = new Location();
      cityLocation.setId(1016367L);

      Location metroLocation = new Location();
      metroLocation.setId(200501L);
      geoTargeting.setExcludedLocations(new Location[] {cityLocation, metroLocation});

      // Exclude domains that are not under the network's control.
      UserDomainTargeting userDomainTargeting = new UserDomainTargeting();
      userDomainTargeting.setDomains(new String[] {"usa.gov"});
View Full Code Here

      // Create geographical targeting.
      GeoTargeting geoTargeting = new GeoTargeting();

      // Include the US, Quebec, Canada, and the B3P Canada postal code.
      Location countryLocation = new Location();
      countryLocation.setId(2840L);

      Location regionLocation = new Location();
      regionLocation.setId(20123L);

      Location postalCodeLocation = new Location();
      postalCodeLocation.setId(9000093L);

      geoTargeting.setTargetedLocations(new Location[] {countryLocation, regionLocation,
          postalCodeLocation});

      // Exclude Chicago and the New York metro area.
      Location cityLocation = new Location();
      cityLocation.setId(1016367L);

      Location metroLocation = new Location();
      metroLocation.setId(200501L);
      geoTargeting.setExcludedLocations(new Location[] {cityLocation, metroLocation});

      // Exclude domains that are not under the network's control.
      UserDomainTargeting userDomainTargeting = new UserDomainTargeting();
      userDomainTargeting.setDomains(new String[] {"usa.gov"});
View Full Code Here

      // Create geographical targeting.
      GeoTargeting geoTargeting = new GeoTargeting();

      // Include the US, Quebec, Canada, and the B3P Canada postal code.
      Location countryLocation = new Location();
      countryLocation.setId(2840L);

      Location regionLocation = new Location();
      regionLocation.setId(20123L);

      Location postalCodeLocation = new Location();
      postalCodeLocation.setId(9000093L);

      geoTargeting.setTargetedLocations(new Location[] {countryLocation, regionLocation,
          postalCodeLocation});

      // Exclude Chicago and the New York metro area.
      Location cityLocation = new Location();
      cityLocation.setId(1016367L);

      Location metroLocation = new Location();
      metroLocation.setId(200501L);
      geoTargeting.setExcludedLocations(new Location[] {cityLocation, metroLocation});

      // Exclude domains that are not under the network's control.
      UserDomainTargeting userDomainTargeting = new UserDomainTargeting();
      userDomainTargeting.setDomains(new String[] {"usa.gov"});
View Full Code Here

      return (Value) value;
    } else if (value == null) {
      return new TextValue(null, null);
    } else {
      if (value instanceof Boolean) {
        return new BooleanValue(null, (Boolean) value);
      } else if (value instanceof Double) {
        return new NumberValue(null, value.toString());
      } else if (value instanceof String) {
        return new TextValue(null, (String) value);
      } else if (value instanceof Long) {
View Full Code Here

      // Set the ID of the contact to update.
      Long contactId = Long.parseLong("INSERT_CONTACT_ID_HERE");

      // Get the contact.
      Contact contact = contactService.getContact(contactId);

      // Update the address of the contact.
      contact.setAddress("123 New Street, New York, NY, 10011");

      // Update the contact on the server.
      Contact[] contacts = contactService.updateContacts(new Contact[] {contact});

      for (Contact updatedContact : contacts) {
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.v201306.Location

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.