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

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


    // Get the InventoryService.
    InventoryServiceInterface inventoryService =
        dfpServices.get(session, InventoryServiceInterface.class);

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

    // Set the parent ad unit's ID for all children ad units to be fetched from.
    String parentAdUnitId = networkService.getCurrentNetwork().getEffectiveRootAdUnitId();

    // Create a statement to select ad units under the parent ad unit.
    StatementBuilder statementBuilder = new StatementBuilder()
        .where("parentId = :parentId")
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT)
View Full Code Here


    // Get the InventoryService.
    InventoryServiceInterface inventoryService =
        dfpServices.get(session, InventoryServiceInterface.class);

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

    // Get the effective root ad unit.
    AdUnit effectiveRootAdUnit =
        inventoryService.getAdUnit(
            networkService.getCurrentNetwork().getEffectiveRootAdUnitId());

    buildAndDisplayAdUnitTree(effectiveRootAdUnit, adUnits);
  }
View Full Code Here

*/
public class GetAllNetworks {

  public static void runExample(DfpServices dfpServices, DfpSession session) throws Exception {
    // Get the NetworkService.
    NetworkServiceInterface networkService =
        dfpServices.get(session, NetworkServiceInterface.class);

    // Get all networks that you have access to with the current login
    // credentials.
    Network[] networks = networkService.getAllNetworks();

    int i = 0;
    for (Network network : networks) {
      System.out.printf(
          "%s) Network with network code \"%s\" and display name \"%s\" was found.\n",
View Full Code Here

      if (value instanceof Boolean) {
        BooleanValue booleanValue = new BooleanValue();
        booleanValue.setValue((Boolean) value);
        return booleanValue;
      } else if (value instanceof Double || value instanceof Long || value instanceof Integer) {
        NumberValue numberValue = new NumberValue();
        numberValue.setValue(value.toString());
        return numberValue;
      } else if (value instanceof String) {
        TextValue textValue = new TextValue();
        textValue.setValue((String) value);
        return textValue;
View Full Code Here

    booleanValue2.setValue(true);

    booleanValue3 = new BooleanValue();
    booleanValue3.setValue(false);

    numberValue1 = new NumberValue();
    numberValue1.setValue("1");

    numberValue2 = new NumberValue();
    numberValue2.setValue("1.02");

    numberValue3 = new NumberValue();
    numberValue3.setValue("-1");

    dateTime1 = new DateTime();
    Date date1 = new Date();
    date1.setYear(2012);
View Full Code Here

 
  @Test
  public void testToString_null() {
    assertEquals("", Pql.toString(new TextValue()));
    assertEquals("", Pql.toString(new BooleanValue()));
    assertEquals("", Pql.toString(new NumberValue()));
    assertEquals("", Pql.toString(new DateTimeValue()));   
  }
View Full Code Here

   * @throws RemoteException if there was an error performing one of the SOAP
   *     calls
   * @throws InterruptedException if the thread was interrupted
   */
  public boolean waitForReportReady() throws RemoteException, InterruptedException {
    ReportJobStatus status = reportService.getReportJob(reportJobId).getReportJobStatus();
    while (status == ReportJobStatus.IN_PROGRESS) {
      Thread.sleep(SLEEP_TIMER);
      status = reportService.getReportJob(reportJobId).getReportJobStatus();
    }

View Full Code Here

   * @return the URL for the report download
   * @throws RemoteException if there was an error performing any Axis call
   * @throws IllegalStateException if the report is not ready to be downloaded
   */
  private String getDownloadUrl(ExportFormat exportFormat) throws RemoteException {
    ReportJobStatus status = reportService.getReportJob(reportJobId).getReportJobStatus();
    Preconditions.checkState(status == ReportJobStatus.COMPLETED, "Report " + reportJobId
        + " must be completed before downloading. It is currently: " + status);
    return reportService.getReportDownloadURL(reportJobId, exportFormat);
  }
View Full Code Here

    List<Row> combinedRows = Lists.newArrayList(first.getRows());
    if (second.getRows() != null) {
      Collections.addAll(combinedRows, second.getRows());
    }

    ResultSet combinedResultSet = new ResultSet();
    combinedResultSet.setColumnTypes(first.getColumnTypes());
    combinedResultSet.setRows(combinedRows.toArray(new Row[] {}));
    return combinedResultSet;
  }
View Full Code Here

    assertEquals(null, ((TextValue) Pql.createValue(null)).getValue());
  }

  @Test
  public void testGetColumnLabels() {
    ResultSet resultSet = new ResultSet();
    resultSet.setColumnTypes(new ColumnType[] {column1, column2, column3});
    assertEquals(Lists.newArrayList(new String[] {"column1", "column2", "column3"}),
        Pql.getColumnLabels(resultSet));
  }
View Full Code Here

TOP

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