Skip to content

Commit e4a6de2

Browse files
committed
---
yaml --- r: 6875 b: refs/heads/tswast-patch-1 c: c010bc8 h: refs/heads/master i: 6873: e45e20f 6871: 323fb86
1 parent 35b45e1 commit e4a6de2

42 files changed

Lines changed: 1515 additions & 1713 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: d3abf25b6d4b42d278ac2057eddfcf808d0e8830
60+
refs/heads/tswast-patch-1: c010bc897e59f096e77128a06f65f3450aaef6da
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ BaseTableInfo info = bigquery.getTable(tableId);
141141
if (info == null) {
142142
System.out.println("Creating table " + tableId);
143143
Field integerField = Field.of("fieldName", Field.Type.integer());
144-
bigquery.create(TableInfo.of(tableId, Schema.of(integerField)));
144+
Schema schema = Schema.of(integerField);
145+
bigquery.create(TableInfo.of(tableId, DefaultTableType.of(schema)));
145146
} else {
146147
System.out.println("Loading data into table " + tableId);
147148
LoadJobConfiguration configuration = LoadJobConfiguration.of(tableId, "gs://bucket/path");
@@ -210,22 +211,20 @@ Google Cloud Resource Manager (Alpha)
210211
Here is a code snippet showing a simple usage example. Note that you must supply Google SDK credentials for this service, not other forms of authentication listed in the [Authentication section](#authentication).
211212

212213
```java
213-
import com.google.gcloud.resourcemanager.Project;
214+
import com.google.gcloud.resourcemanager.ProjectInfo;
214215
import com.google.gcloud.resourcemanager.ResourceManager;
215216
import com.google.gcloud.resourcemanager.ResourceManagerOptions;
216217

217218
import java.util.Iterator;
218219

219220
ResourceManager resourceManager = ResourceManagerOptions.defaultInstance().service();
220-
Project myProject = resourceManager.get("some-project-id"); // Use an existing project's ID
221-
Project newProject = myProject.toBuilder()
222-
.addLabel("launch-status", "in-development")
223-
.build()
224-
.replace();
225-
System.out.println("Updated the labels of project " + newProject.projectId()
226-
+ " to be " + newProject.labels());
221+
ProjectInfo myProject = resourceManager.get("some-project-id"); // Use an existing project's ID
222+
ProjectInfo newProjectInfo = resourceManager.replace(myProject.toBuilder()
223+
.addLabel("launch-status", "in-development").build());
224+
System.out.println("Updated the labels of project " + newProjectInfo.projectId()
225+
+ " to be " + newProjectInfo.labels());
227226
// List all the projects you have permission to view.
228-
Iterator<Project> projectIterator = resourceManager.list().iterateAll();
227+
Iterator<ProjectInfo> projectIterator = resourceManager.list().iterateAll();
229228
System.out.println("Projects I can view:");
230229
while (projectIterator.hasNext()) {
231230
System.out.println(projectIterator.next().projectId());

branches/tswast-patch-1/RELEASING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ As mentioned before, there is an optional version argument. By default, the scr
2626

2727
6. Create and merge in another PR to reflect the updated project version. For an example of what this PR should look like, see [#227](https://github.com/GoogleCloudPlatform/gcloud-java/pull/227).
2828

29-
7. Be sure to update App Engine documentation and [java-docs-samples](https://github.com/GoogleCloudPlatform/java-docs-samples) code as necessary. See directions [here](https://docs.google.com/a/google.com/document/d/1SS3xNn2v0qW7EadGUPBUAPIQAH5VY6WSFmT17ZjjUVE/edit?usp=sharing).
30-
3129
### To push a snapshot version
3230

3331
Pushing a snapshot is completely automated. If "-SNAPSHOT" is included in the version denoted by the base directory's pom.xml, then an updated artifact will be pushed to the snapshot repository when Travis CI successfully completes a non-PR build.

branches/tswast-patch-1/gcloud-java-bigquery/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ are created from a BigQuery SQL query. In this code snippet we show how to creat
111111
with only one string field. Add the following imports at the top of your file:
112112

113113
```java
114-
import com.google.gcloud.bigquery.BaseTableInfo;
114+
import com.google.gcloud.bigquery.DefaultTableType;
115115
import com.google.gcloud.bigquery.Field;
116116
import com.google.gcloud.bigquery.Schema;
117117
import com.google.gcloud.bigquery.TableId;
@@ -126,7 +126,8 @@ Field stringField = Field.of("StringField", Field.Type.string());
126126
// Table schema definition
127127
Schema schema = Schema.of(stringField);
128128
// Create a table
129-
TableInfo createdTableInfo = bigquery.create(TableInfo.of(tableId, schema));
129+
DefaultTableType tableType = DefaultTableType.of(schema);
130+
TableInfo createdTableInfo = bigquery.create(TableInfo.of(tableId, tableType));
130131
```
131132

132133
#### Loading data into a table
@@ -204,10 +205,10 @@ the code from the main method to your application's servlet class and change the
204205
display on your webpage.
205206

206207
```java
207-
import com.google.gcloud.bigquery.BaseTableInfo;
208208
import com.google.gcloud.bigquery.BigQuery;
209209
import com.google.gcloud.bigquery.BigQueryOptions;
210210
import com.google.gcloud.bigquery.DatasetInfo;
211+
import com.google.gcloud.bigquery.DefaultTableType;
211212
import com.google.gcloud.bigquery.Field;
212213
import com.google.gcloud.bigquery.FieldValue;
213214
import com.google.gcloud.bigquery.InsertAllRequest;
@@ -240,7 +241,8 @@ public class GcloudBigQueryExample {
240241
// Table schema definition
241242
Schema schema = Schema.of(stringField);
242243
// Create a table
243-
TableInfo createdTableInfo = bigquery.create(TableInfo.of(tableId, schema));
244+
DefaultTableType tableType = DefaultTableType.of(schema);
245+
TableInfo createdTableInfo = bigquery.create(TableInfo.of(tableId, tableType));
244246

245247
// Define rows to insert
246248
Map<String, Object> firstRow = new HashMap<>();

0 commit comments

Comments
 (0)