Skip to content
Merged
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
159 changes: 148 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,25 @@ Java idiomatic client for [Google Cloud Platform][cloud-platform] services.

This client supports the following Google Cloud Platform services at a [Beta](#versioning) quality level:

- [Google Cloud BigQuery](#google-cloud-bigquery-beta) (Beta)
- [BigQuery](#google-cloud-bigquery-beta) (Beta)
- [Stackdriver Logging](#stackdriver-logging-beta) (Beta - Not working on App Engine Standard)
- [Google Cloud Datastore](#google-cloud-datastore-beta) (Beta)
- [Google Cloud Storage](#google-cloud-storage-beta) (Beta)
- [Cloud Datastore](#google-cloud-datastore-beta) (Beta)
- [Cloud Storage](#google-cloud-storage-beta) (Beta)
- [Cloud Spanner](#cloud-spanner-beta) (Beta)
- [Google Cloud Translation](#google-translation-beta) (Beta)
- Cloud Vision (Beta)
- Cloud Natural Language (Beta)
- [Cloud Translation](#google-translation-beta) (Beta)

This client supports the following Google Cloud Platform services at an [Alpha](#versioning) quality level:

- [Google Cloud Compute](#google-cloud-compute-alpha) (Alpha)
- [Google Cloud DNS](#google-cloud-dns-alpha) (Alpha)
- [Google Cloud Pub/Sub](#google-cloud-pubsub-alpha) (Alpha - Not working on App Engine Standard)
- [Google Cloud Resource Manager](#google-cloud-resource-manager-alpha) (Alpha)
- [Cloud Compute](#google-cloud-compute-alpha) (Alpha)
- [Cloud DNS](#google-cloud-dns-alpha) (Alpha)
- [Stackdriver Error Reporting](#stackdriver-error-reporting-alpha) (Alpha)
- [Stackdriver Monitoring](#stackdriver-monitoring-alpha) (Alpha)
- [Cloud Natural Language](#google-cloud-language-alpha) (Alpha)
- [Cloud Pub/Sub](#google-cloud-pubsub-alpha) (Alpha - Not working on App Engine Standard)
- [Cloud Resource Manager](#google-cloud-resource-manager-alpha) (Alpha)
- [Cloud Speech](#google-cloud-speech-alpha) (Alpha)
- [Cloud Trace](#google-cloud-trace-alpha) (Alpha)
- [Cloud Vision](#google-cloud-vision-alpha) (Alpha)

> Note: This client is a work-in-progress, and may occasionally
> make backwards-incompatible changes.
Expand Down Expand Up @@ -573,9 +577,57 @@ ChangeRequestInfo changeRequest = changeBuilder.build();
zone.applyChangeRequest(changeRequest);
```

Google Cloud Pub/Sub (Alpha)
Stackdriver Error Reporting (Alpha)
----------------------
- [API Documentation][errorreporting-api]
- [Official Documentation][cloud-errorreporting-docs]

### Preview

Here is a code snippet showing a simple usage example of ErrorGroupServiceClient.
Note that you must [supply credentials](#authentication) and a project ID if running this snippet elsewhere.
```java
try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
GroupName groupName = GroupName.create("[PROJECT]", "[GROUP]");
ErrorGroup response = errorGroupServiceClient.getGroup(groupName);
}
```

Google Cloud Language (Alpha)
----------------------
- [API Documentation][language-api]
- [Official Documentation][cloud-language-docs]

### Preview

Here is a code snippet showing a simple usage example of LanguageServiceClient. The example assumes that either default application
credentials or a valid api key are available. (See [Authentication section](#authentication) for more information)
```java
try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) {
Document document = Document.newBuilder().build();
AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document);
}
```

Stackdriver Monitoring (Alpha)
----------------------
- [API Documentation][monitoring-api]
- [Official Documentation][cloud-monitoring-docs]

### Preview

Here is a code snippet showing a simple usage example of MetricServiceClient.
Note that you must [supply credentials](#authentication) and a project ID if running this snippet elsewhere.
```java
try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) {
MonitoredResourceDescriptorName name =
MonitoredResourceDescriptorName.create("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
MonitoredResourceDescriptor response = metricServiceClient.getMonitoredResourceDescriptor(name);
}
```

Google Cloud Pub/Sub (Alpha)
----------------------
- [API Documentation][pubsub-api]
- [Official Documentation][cloud-pubsub-docs]

Expand Down Expand Up @@ -683,6 +735,73 @@ Translation translation = translate.translate(
System.out.printf("Hola %s%n", translation.getTranslatedText());
```

Google Cloud Speech (Alpha)
----------------

- [API Documentation][speech-api]
- [Official Documentation][cloud-speech-docs]

### Preview

Here is a code snippet showing a simple usage example of SpeechClient. The example assumes that either default application
credentials or a valid api key are available. (See [Authentication section](#authentication) for more information)
Note that you must provide a uri to a FLAC audio file to run this.

```java
try (SpeechClient speechClient = SpeechClient.create()) {
RecognitionConfig.AudioEncoding encoding = RecognitionConfig.AudioEncoding.FLAC;
int sampleRateHertz = 44100;
String languageCode = "en-US";
RecognitionConfig config = RecognitionConfig.newBuilder()
.setEncoding(encoding)
.setSampleRateHertz(sampleRateHertz)
.setLanguageCode(languageCode)
.build();
String uri = "gs://bucket_name/file_name.flac";
RecognitionAudio audio = RecognitionAudio.newBuilder()
.setUri(uri)
.build();
RecognizeResponse response = speechClient.recognize(config, audio);
}
```

Google Cloud Trace (Alpha)
----------------

- [API Documentation][trace-api]
- [Official Documentation][cloud-trace-docs]

### Preview

Here is a code snippet showing a simple usage example of TraceServiceClient. The example assumes that either default application
credentials or a valid api key are available.
Note that you must [supply credentials](#authentication) and a project ID if running this snippet elsewhere.
```java
try (TraceServiceClient traceServiceClient = TraceServiceClient.create()) {
String projectId = "";
Traces traces = Traces.newBuilder().build();
traceServiceClient.patchTraces(projectId, traces);
}
```

Google Cloud Vision (Alpha)
----------------

- [API Documentation][vision-api]
- [Official Documentation][cloud-vision-docs]

### Preview

Here is a code snippet showing a simple usage example of ImageAnnotatorClient.
The example assumes that either default application credentials or a valid api key
are available. (See [Authentication section](#authentication) for more information)
```java
try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
List<AnnotateImageRequest> requests = new ArrayList<>();
BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
}
```

Troubleshooting
---------------

Expand Down Expand Up @@ -749,6 +868,24 @@ Apache 2.0 - See [LICENSE] for more information.
[cloud-dns-docs]: https://cloud.google.com/dns/docs
[cloud-dns-activation]: https://console.cloud.google.com/start/api?id=dns

[errorreporting-api]: https://googlecloudplatform.github.io/google-cloud-java/apidocs/index.html?com/google/cloud/errorreporting/spi/v1beta1/package-summary.html
[cloud-errorreporting-docs]: https://cloud.google.com/error-reporting/docs

[language-api]: https://googlecloudplatform.github.io/google-cloud-java/apidocs/index.html?com/google/cloud/language/spi/v1/package-summary.html
[cloud-language-docs]: https://cloud.google.com/language/docs

[monitoring-api]: https://googlecloudplatform.github.io/google-cloud-java/apidocs/index.html?com/google/cloud/monitoring/spi/v3/package-summary.html
[cloud-monitoring-docs]: https://cloud.google.com/monitoring/docs

[speech-api]: http://googlecloudplatform.github.io/google-cloud-java/0.15.0/apidocs/?com/google/cloud/speech/spi/v1/package-summary.html
[cloud-speech-docs]: https://cloud.google.com/speech/docs

[trace-api]: http://googlecloudplatform.github.io/google-cloud-java/0.15.0/apidocs/?com/google/cloud/trace/spi/v1/package-summary.html
[cloud-trace-docs]: https://cloud.google.com/trace/docs

[vision-api]: http://googlecloudplatform.github.io/google-cloud-java/0.15.0/apidocs/?com/google/cloud/vision/spi/v1/package-summary.html
[cloud-vision-docs]: https://cloud.google.com/vision/docs

[logging-api]: https://googlecloudplatform.github.io/google-cloud-java/apidocs/index.html?com/google/cloud/logging/package-summary.html
[stackdriver-logging-docs]: https://cloud.google.com/logging/docs
[stackdriver-logging-activation]: https://console.cloud.google.com/start/api?id=logging
Expand Down