@@ -12,29 +12,27 @@ Java idiomatic client for [Google Cloud Platform][cloud-platform] services.
1212- [ Homepage] ( https://googlecloudplatform.github.io/google-cloud-java/ )
1313- [ API Documentation] ( https://googlecloudplatform.github.io/google-cloud-java/apidocs )
1414
15- This client supports the following Google Cloud Platform services at a [ GA] ( #versioning ) quality level:
16- - [ Stackdriver Logging] ( #stackdriver-logging-ga ) (GA)
17- - [ Cloud Datastore] ( #google-cloud-datastore-ga ) (GA)
18- - [ Cloud Storage] ( #google-cloud-storage-ga ) (GA)
19-
2015This client supports the following Google Cloud Platform services at a [ Beta] ( #versioning ) quality level:
2116
2217- [ BigQuery] ( #google-cloud-bigquery-beta ) (Beta)
18+ - [ Stackdriver Logging] ( #stackdriver-logging-beta ) (Beta - Not working on App Engine Standard)
19+ - [ Cloud Datastore] ( #google-cloud-datastore-beta ) (Beta)
20+ - [ Cloud Storage] ( #google-cloud-storage-beta ) (Beta)
2321- [ Cloud Spanner] ( #cloud-spanner-beta ) (Beta)
2422- [ Cloud Translation] ( #google-translation-beta ) (Beta)
25- - [ Cloud Natural Language] ( #google-cloud-language-beta ) (Beta)
26- - [ Cloud Vision] ( #google-cloud-vision-beta ) (Beta)
2723
2824This client supports the following Google Cloud Platform services at an [ Alpha] ( #versioning ) quality level:
2925
3026- [ Cloud Compute] ( #google-cloud-compute-alpha ) (Alpha)
3127- [ Cloud DNS] ( #google-cloud-dns-alpha ) (Alpha)
3228- [ Stackdriver Error Reporting] ( #stackdriver-error-reporting-alpha ) (Alpha)
3329- [ Stackdriver Monitoring] ( #stackdriver-monitoring-alpha ) (Alpha)
34- - [ Cloud Pub/Sub] ( #google-cloud-pubsub-alpha ) (Alpha)
30+ - [ Cloud Natural Language] ( #google-cloud-language-alpha ) (Alpha)
31+ - [ Cloud Pub/Sub] ( #google-cloud-pubsub-alpha ) (Alpha - Not working on App Engine Standard)
3532- [ Cloud Resource Manager] ( #google-cloud-resource-manager-alpha ) (Alpha)
3633- [ Cloud Speech] ( #google-cloud-speech-alpha ) (Alpha)
3734- [ Cloud Trace] ( #google-cloud-trace-alpha ) (Alpha)
35+ - [ Cloud Vision] ( #google-cloud-vision-alpha ) (Alpha)
3836
3937> Note: This client is a work-in-progress, and may occasionally
4038> make backwards-incompatible changes.
@@ -52,16 +50,16 @@ If you are using Maven, add this to your pom.xml file
5250<dependency >
5351 <groupId >com.google.cloud</groupId >
5452 <artifactId >google-cloud</artifactId >
55- <version >0.17.1 -alpha</version >
53+ <version >0.17.0 -alpha</version >
5654</dependency >
5755```
5856If you are using Gradle, add this to your dependencies
5957``` Groovy
60- compile 'com.google.cloud:google-cloud:0.17.1 -alpha'
58+ compile 'com.google.cloud:google-cloud:0.17.0 -alpha'
6159```
6260If you are using SBT, add this to your dependencies
6361``` Scala
64- libraryDependencies += " com.google.cloud" % " google-cloud" % " 0.17.1 -alpha"
62+ libraryDependencies += " com.google.cloud" % " google-cloud" % " 0.17.0 -alpha"
6563```
6664
6765For running on Google App Engine, see [ more instructions here] ( ./APPENGINE.md ) .
@@ -185,7 +183,51 @@ Credentials in the following locations (in order):
1851834. Google Cloud Shell built-in credentials
1861845. Google Compute Engine built-in credentials
187185
188- Stackdriver Logging (GA)
186+ Google Cloud BigQuery (Beta)
187+ ----------------------
188+
189+ - [API Documentation][bigquery-api]
190+ - [Official Documentation][cloud-bigquery-docs]
191+
192+ # ### Preview
193+
194+ Here is a code snippet showing a simple usage example from within Compute/App Engine. Note that you
195+ must [supply credentials](# authentication) and a project ID if running this snippet elsewhere.
196+ Complete source code can be found at
197+ [CreateTableAndLoadData.java](./google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/CreateTableAndLoadData.java).
198+
199+ ` ` ` java
200+ import com.google.cloud.bigquery.BigQuery;
201+ import com.google.cloud.bigquery.BigQueryOptions;
202+ import com.google.cloud.bigquery.Field;
203+ import com.google.cloud.bigquery.FormatOptions;
204+ import com.google.cloud.bigquery.Job;
205+ import com.google.cloud.bigquery.Schema;
206+ import com.google.cloud.bigquery.StandardTableDefinition;
207+ import com.google.cloud.bigquery.Table;
208+ import com.google.cloud.bigquery.TableId;
209+ import com.google.cloud.bigquery.TableInfo;
210+
211+ BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService ();
212+ TableId tableId = TableId.of(" dataset" , " table" );
213+ Table table = bigquery.getTable(tableId);
214+ if (table == null) {
215+ System.out.println(" Creating table " + tableId);
216+ Field integerField = Field.of(" fieldName" , Field.Type.integer ());
217+ Schema schema = Schema.of(integerField);
218+ table = bigquery.create(TableInfo.of(tableId, StandardTableDefinition.of(schema)));
219+ }
220+ System.out.println(" Loading data into table " + tableId);
221+ Job loadJob = table.load(FormatOptions.csv (), " gs://bucket/path" );
222+ loadJob = loadJob.waitFor ();
223+ if (loadJob.getStatus().getError() ! = null) {
224+ System.out.println(" Job completed with errors" );
225+ } else {
226+ System.out.println(" Job succeeded" );
227+ }
228+ ` ` `
229+
230+ Stackdriver Logging (Beta)
189231----------------------
190232- [API Documentation][logging-api]
191233- [Official Documentation][stackdriver-logging-docs]
@@ -254,7 +296,7 @@ LoggingHandler.addHandler(logger, new LoggingHandler());
254296logger.warning(" test warning" );
255297` ` `
256298
257- Google Cloud Datastore (GA )
299+ Google Cloud Datastore (Beta )
258300----------------------
259301
260302- [API Documentation][datastore-api]
@@ -311,7 +353,7 @@ if (entity != null) {
311353}
312354` ` `
313355
314- Google Cloud Storage (GA )
356+ Google Cloud Storage (Beta )
315357----------------------
316358
317359- [API Documentation][storage-api]
@@ -365,51 +407,6 @@ if (blob != null) {
365407 channel.close ();
366408}
367409` ` `
368-
369- Google Cloud BigQuery (Beta)
370- ----------------------
371-
372- - [API Documentation][bigquery-api]
373- - [Official Documentation][cloud-bigquery-docs]
374-
375- # ### Preview
376-
377- Here is a code snippet showing a simple usage example from within Compute/App Engine. Note that you
378- must [supply credentials](# authentication) and a project ID if running this snippet elsewhere.
379- Complete source code can be found at
380- [CreateTableAndLoadData.java](./google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/CreateTableAndLoadData.java).
381-
382- ` ` ` java
383- import com.google.cloud.bigquery.BigQuery;
384- import com.google.cloud.bigquery.BigQueryOptions;
385- import com.google.cloud.bigquery.Field;
386- import com.google.cloud.bigquery.FormatOptions;
387- import com.google.cloud.bigquery.Job;
388- import com.google.cloud.bigquery.Schema;
389- import com.google.cloud.bigquery.StandardTableDefinition;
390- import com.google.cloud.bigquery.Table;
391- import com.google.cloud.bigquery.TableId;
392- import com.google.cloud.bigquery.TableInfo;
393-
394- BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService ();
395- TableId tableId = TableId.of(" dataset" , " table" );
396- Table table = bigquery.getTable(tableId);
397- if (table == null) {
398- System.out.println(" Creating table " + tableId);
399- Field integerField = Field.of(" fieldName" , Field.Type.integer ());
400- Schema schema = Schema.of(integerField);
401- table = bigquery.create(TableInfo.of(tableId, StandardTableDefinition.of(schema)));
402- }
403- System.out.println(" Loading data into table " + tableId);
404- Job loadJob = table.load(FormatOptions.csv (), " gs://bucket/path" );
405- loadJob = loadJob.waitFor ();
406- if (loadJob.getStatus().getError() ! = null) {
407- System.out.println(" Job completed with errors" );
408- } else {
409- System.out.println(" Job succeeded" );
410- }
411- ` ` `
412-
413410Cloud Spanner (Beta)
414411--------------------
415412
@@ -450,40 +447,6 @@ try {
450447}
451448` ` `
452449
453- Google Cloud Language (Beta)
454- ----------------------
455- - [API Documentation][language-api]
456- - [Official Documentation][cloud-language-docs]
457-
458- # ## Preview
459-
460- Here is a code snippet showing a simple usage example of LanguageServiceClient. The example assumes that either default application
461- credentials or a valid api key are available. (See [Authentication section](# authentication) for more information)
462- ` ` ` java
463- try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create ()) {
464- Document document = Document.newBuilder().build ();
465- AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document);
466- }
467- ` ` `
468-
469- Google Cloud Vision (Beta)
470- ----------------
471-
472- - [API Documentation][vision-api]
473- - [Official Documentation][cloud-vision-docs]
474-
475- # ## Preview
476-
477- Here is a code snippet showing a simple usage example of ImageAnnotatorClient.
478- The example assumes that either default application credentials or a valid api key
479- are available. (See [Authentication section](# authentication) for more information)
480- ` ` ` java
481- try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create ()) {
482- List< AnnotateImageRequest> requests = new ArrayList<> ();
483- BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
484- }
485- ` ` `
486-
487450Google Cloud Compute (Alpha)
488451----------------------
489452
@@ -630,6 +593,22 @@ Note that you must [supply credentials](#authentication) and a project ID if run
630593 }
631594` ` `
632595
596+ Google Cloud Language (Alpha)
597+ ----------------------
598+ - [API Documentation][language-api]
599+ - [Official Documentation][cloud-language-docs]
600+
601+ # ## Preview
602+
603+ Here is a code snippet showing a simple usage example of LanguageServiceClient. The example assumes that either default application
604+ credentials or a valid api key are available. (See [Authentication section](# authentication) for more information)
605+ ` ` ` java
606+ try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create ()) {
607+ Document document = Document.newBuilder().build ();
608+ AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document);
609+ }
610+ ` ` `
611+
633612Stackdriver Monitoring (Alpha)
634613----------------------
635614- [API Documentation][monitoring-api]
@@ -805,6 +784,24 @@ Note that you must [supply credentials](#authentication) and a project ID if run
805784 }
806785` ` `
807786
787+ Google Cloud Vision (Alpha)
788+ ----------------
789+
790+ - [API Documentation][vision-api]
791+ - [Official Documentation][cloud-vision-docs]
792+
793+ # ## Preview
794+
795+ Here is a code snippet showing a simple usage example of ImageAnnotatorClient.
796+ The example assumes that either default application credentials or a valid api key
797+ are available. (See [Authentication section](# authentication) for more information)
798+ ` ` ` java
799+ try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create ()) {
800+ List< AnnotateImageRequest> requests = new ArrayList<> ();
801+ BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
802+ }
803+ ` ` `
804+
808805Troubleshooting
809806---------------
810807
@@ -856,10 +853,6 @@ additional qualifications:
856853Please note it is currently under active development. Any release versioned 0.x.y is
857854subject to backwards incompatible changes at any time.
858855
859- **GA**: Libraries defined at a GA quality level are expected to be stable and all updates in the
860- libraries are guaranteed to be backwards-compatible. Any backwards-incompatible changes will lead
861- to the major version increment (1.x.y -> 2.0.0).
862-
863856**Beta**: Libraries defined at a Beta quality level are expected to be mostly stable and
864857we' re working towards their release candidate. We will address issues and requests with
865858a higher priority.
0 commit comments