private Builder(com.google.api.services.bigquery.model.JobStatistics statisticsPb) { super(statisticsPb); if (statisticsPb.getExtract() != null) { this.destinationUriFileCounts = statisticsPb.getExtract().getDestinationUriFileCounts(); } }
@Override public Dataset apply(DatasetList.Datasets datasetPb) { return new Dataset() .setDatasetReference(datasetPb.getDatasetReference()) .setFriendlyName(datasetPb.getFriendlyName()) .setId(datasetPb.getId()) .setKind(datasetPb.getKind()) .setLabels(datasetPb.getLabels()); } };
@Override public Table apply(TableList.Tables tablePb) { return new Table() .setFriendlyName(tablePb.getFriendlyName()) .setId(tablePb.getId()) .setKind(tablePb.getKind()) .setTableReference(tablePb.getTableReference()) .setType(tablePb.getType()); } }));
private static com.google.api.services.bigquery.model.Job newJobPb() { return new com.google.api.services.bigquery.model.Job() .setConfiguration( new com.google.api.services.bigquery.model.JobConfiguration() .setQuery(new JobConfigurationQuery().setQuery("FOO"))); }
TableReference toPb() { return new TableReference().setProjectId(project).setDatasetId(dataset).setTableId(table); }
@Override com.google.api.services.bigquery.model.JobConfiguration toPb() { JobConfigurationExtract extractConfigurationPb = new JobConfigurationExtract(); extractConfigurationPb.setDestinationUris(destinationUris); extractConfigurationPb.setSourceTable(sourceTable.toPb()); extractConfigurationPb.setPrintHeader(printHeader); extractConfigurationPb.setFieldDelimiter(fieldDelimiter); extractConfigurationPb.setDestinationFormat(format); extractConfigurationPb.setCompression(compression); return new com.google.api.services.bigquery.model.JobConfiguration() .setExtract(extractConfigurationPb); }
DatasetReference toPb() { return new DatasetReference().setProjectId(project).setDatasetId(dataset); }
private Builder(com.google.api.services.bigquery.model.JobConfiguration configurationPb) { this(); JobConfigurationExtract extractConfigurationPb = configurationPb.getExtract(); this.sourceTable = TableId.fromPb(extractConfigurationPb.getSourceTable()); this.destinationUris = extractConfigurationPb.getDestinationUris(); this.printHeader = extractConfigurationPb.getPrintHeader(); this.fieldDelimiter = extractConfigurationPb.getFieldDelimiter(); this.format = extractConfigurationPb.getDestinationFormat(); this.compression = extractConfigurationPb.getCompression(); }
com.google.api.services.bigquery.model.CsvOptions toPb() { com.google.api.services.bigquery.model.CsvOptions csvOptions = new com.google.api.services.bigquery.model.CsvOptions(); csvOptions.setAllowJaggedRows(allowJaggedRows); csvOptions.setAllowQuotedNewlines(allowQuotedNewLines); csvOptions.setEncoding(encoding); csvOptions.setFieldDelimiter(fieldDelimiter); csvOptions.setQuote(quote); csvOptions.setSkipLeadingRows(skipLeadingRows); return csvOptions; }
@Override com.google.api.services.bigquery.model.JobStatistics toPb() { JobStatistics3 loadStatisticsPb = new JobStatistics3(); loadStatisticsPb.setInputFileBytes(inputBytes); loadStatisticsPb.setInputFiles(inputFiles); loadStatisticsPb.setOutputBytes(outputBytes); loadStatisticsPb.setOutputRows(outputRows); loadStatisticsPb.setBadRecords(badRecords); return super.toPb().setLoad(loadStatisticsPb); }
private Builder(com.google.api.services.bigquery.model.JobStatistics statisticsPb) { super(statisticsPb); if (statisticsPb.getLoad() != null) { this.inputBytes = statisticsPb.getLoad().getInputFileBytes(); this.inputFiles = statisticsPb.getLoad().getInputFiles(); this.outputBytes = statisticsPb.getLoad().getOutputBytes(); this.outputRows = statisticsPb.getLoad().getOutputRows(); this.badRecords = statisticsPb.getLoad().getBadRecords(); } }
com.google.api.services.bigquery.model.JobStatistics toPb() { com.google.api.services.bigquery.model.JobStatistics statistics = new com.google.api.services.bigquery.model.JobStatistics(); statistics.setCreationTime(creationTime); statistics.setEndTime(endTime); statistics.setStartTime(startTime); return statistics; }
TableRow tr = new TableRow(this); TableLayout.LayoutParams tableRowParams= new TableLayout.LayoutParams (TableLayout.LayoutParams.FILL_PARENT,TableLayout.LayoutParams.WRAP_CONTENT); int leftMargin=10; int topMargin=2; int rightMargin=10; int bottomMargin=2; tableRowParams.setMargins(leftMargin, topMargin, rightMargin, bottomMargin); tr.setLayoutParams(tableRowParams);
ExplainQueryStep toPb() { return new ExplainQueryStep().setKind(name).setSubsteps(substeps); }
@Override com.google.api.services.bigquery.model.JobStatistics toPb() { com.google.api.services.bigquery.model.JobStatistics statisticsPb = super.toPb(); return statisticsPb.setExtract( new JobStatistics4().setDestinationUriFileCounts(destinationUriFileCounts)); }
protected Builder(com.google.api.services.bigquery.model.JobStatistics statisticsPb) { this.creationTime = statisticsPb.getCreationTime(); this.endTime = statisticsPb.getEndTime(); this.startTime = statisticsPb.getStartTime(); }
@Override Access toPb() { return new Access().setUserByEmail(email); } }
public com.google.api.services.bigquery.model.EncryptionConfiguration toPb() { com.google.api.services.bigquery.model.EncryptionConfiguration encryptionConfigurationPb = new com.google.api.services.bigquery.model.EncryptionConfiguration(); encryptionConfigurationPb.setKmsKeyName(kmsKeyName); return encryptionConfigurationPb; }
com.google.api.services.bigquery.model.GoogleSheetsOptions toPb() { com.google.api.services.bigquery.model.GoogleSheetsOptions options = new com.google.api.services.bigquery.model.GoogleSheetsOptions(); options.setSkipLeadingRows(skipLeadingRows); return options; }