Skip to content

Add example to BigQuery package-info, fix indentation in Storage and ResourceManager #513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,28 @@
* A client to Google Cloud BigQuery.
*
* <p>A simple usage example:
* <pre>{@code
* //TODO(mziccard): add code example
* }</pre>
* <pre> {@code
* BigQuery bigquery = BigQueryOptions.defaultInstance().service();
* TableId tableId = TableId.of("dataset", "table");
* BaseTableInfo info = bigquery.getTable(tableId);
* if (info == null) {
* System.out.println("Creating table " + tableId);
* Field integerField = Field.of("fieldName", Field.Type.integer());
* bigquery.create(TableInfo.of(tableId, Schema.of(integerField)));
* } else {
* System.out.println("Loading data into table " + tableId);
* LoadJobInfo loadJob = LoadJobInfo.of(tableId, "gs://bucket/path");
* loadJob = bigquery.create(loadJob);
* while (loadJob.status().state() != JobStatus.State.DONE) {
* Thread.sleep(1000L);
* loadJob = bigquery.getJob(loadJob.jobId());
* }
* if (loadJob.status().error() != null) {
* System.out.println("Job completed with errors");
* } else {
* System.out.println("Job succeeded");
* }
* }}</pre>
*
* @see <a href="https://cloud.google.com/bigquery/">Google Cloud BigQuery</a>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* A client to Google Cloud Resource Manager.
*
* <p>Here's a simple usage example for using gcloud-java-resourcemanager:
* <pre>{@code
* <pre> {@code
* ResourceManager resourceManager = ResourceManagerOptions.defaultInstance().service();
* String myProjectId = "my-globally-unique-project-id"; // Change to a unique project ID.
* ProjectInfo myProject = resourceManager.create(ProjectInfo.builder(myProjectId).build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* A client to Google Cloud Storage.
*
* <p>Here's a simple usage example for using gcloud-java from App/Compute Engine:
* <pre>{@code
* <pre> {@code
* Storage storage = StorageOptions.defaultInstance().service();
* BlobId blobId = BlobId.of("bucket", "blob_name");
* Blob blob = Blob.load(storage, blobId);
Expand Down