Skip to content

Commit 069bb14

Browse files
committed
Merge branch 'master' into regen
2 parents ca388f3 + ba017e6 commit 069bb14

49 files changed

Lines changed: 608 additions & 140 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ docs/
3434
gcloud-java-wheels/
3535
src/test/resources/gcd-head.zip
3636
src/test/resources/gcd-v1beta2-rev1-2.1.1.zip
37+
38+
# API key file containing value of GOOGLE_API_KEY for integration tests
39+
api_key

.travis.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
language: java
22
matrix:
33
include:
4-
- os: linux
5-
jdk: oraclejdk8
6-
- os: linux
7-
jdk: oraclejdk7
8-
- os: linux
9-
jdk: openjdk7
10-
- os: osx
11-
# see travis issue https://github.com/travis-ci/travis-ci/issues/2839
12-
env: JAVA_HOME=$(/usr/libexec/java_home)
4+
- os: linux
5+
jdk: oraclejdk8
6+
- os: linux
7+
jdk: oraclejdk7
8+
- os: linux
9+
jdk: openjdk7
10+
- os: osx
11+
env: JAVA_HOME=$(/usr/libexec/java_home)
1312
before_install:
1413
- mvn clean
1514
- git clone -b travis `git config --get remote.origin.url` target/travis
1615
- cp target/travis/settings.xml ~/.m2/settings.xml
1716
- cp target/travis/logging.properties logging.properties
18-
install: mvn install --quiet -Djava.util.logging.config.file=logging.properties -DskipTests=true -Dgpg.skip=true
19-
script:
17+
install: mvn install --quiet -Djava.util.logging.config.file=logging.properties -DskipTests=true
18+
-Dgpg.skip=true
19+
script:
2020
- travis_wait 60 utilities/verify.sh
2121
after_success:
2222
- utilities/after_success.sh
2323
env:
2424
global:
25-
- secure: "IvdIao/ZBKZ7KcMdbnbpPH5dyujVnr1PAlE9hV+Nu5YujloIDUqTFpSFXB+wnp0CLMlW2kBR6YBhh71mp5M2XSqf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4PaXDPVmzY1AxPv/ZQWSrcMgLhz43GASD8Ty96bOIKBB8tO6k0FVzff9r9bpiHssNiW0kDp657BFON4UWG75T6wJxKp4jsttvLfhBFMBLKg+fpYlKnaOPqDc=

README.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ Google Cloud Language (Beta)
498498
### Preview
499499
500500
Here is a code snippet showing a simple usage example of LanguageServiceClient. The example assumes that either default application
501-
credentials or a valid api key are available. (See [Authentication section](#authentication) for more information)
501+
credentials or a valid API key are available. (See [Authentication section](#authentication) for more information)
502502
```java
503503
try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) {
504504
Document document = Document.newBuilder().build();
@@ -515,7 +515,7 @@ Google Cloud Vision (Beta)
515515
### Preview
516516
517517
Here is a code snippet showing a simple usage example of ImageAnnotatorClient.
518-
The example assumes that either default application credentials or a valid api key
518+
The example assumes that either default application credentials or a valid API key
519519
are available. (See [Authentication section](#authentication) for more information)
520520
```java
521521
try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
@@ -732,9 +732,8 @@ Google Translation (Beta)
732732
733733
Here's a snippet showing a simple usage example. The example shows how to detect the language of
734734
some text and how to translate some text. The example assumes that either default application
735-
credentials or a valid api key are available. An api key stored in the `GOOGLE_API_KEY` environment
736-
variable will be automatically detected. Alternatively, you can use the `apiKey(String)` setter in
737-
`TranslateOptions.Builder`. Complete source code can be found at
735+
credentials or a valid API key are available. An API key stored in the `GOOGLE_API_KEY` environment
736+
variable will be automatically detected. Complete source code can be found at
738737
[DetectLanguageAndTranslate.java](./google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java).
739738
740739
```java
@@ -766,7 +765,7 @@ Google Cloud Speech (Alpha)
766765
### Preview
767766
768767
Here is a code snippet showing a simple usage example of SpeechClient. The example assumes that either default application
769-
credentials or a valid api key are available. (See [Authentication section](#authentication) for more information)
768+
credentials or a valid API key are available. (See [Authentication section](#authentication) for more information)
770769
Note that you must provide a uri to a FLAC audio file to run this.
771770
772771
```java
@@ -796,7 +795,7 @@ Google Cloud Trace (Alpha)
796795
### Preview
797796
798797
Here is a code snippet showing a simple usage example of TraceServiceClient. The example assumes that either default application
799-
credentials or a valid api key are available.
798+
credentials or a valid API key are available.
800799
Note that you must [supply credentials](#authentication) and a project ID if running this snippet elsewhere.
801800
```java
802801
try (TraceServiceClient traceServiceClient = TraceServiceClient.create()) {
@@ -814,7 +813,7 @@ Google Cloud Video Intelligence (Alpha)
814813
### Preview
815814
816815
Here is a code snippet showing a simple usage example of TraceServiceClient. The example assumes that either default application
817-
credentials or a valid api key are available.
816+
credentials or a valid API key are available.
818817
Note that you must [supply credentials](#authentication) and a project ID if running this snippet elsewhere.
819818
```java
820819
try (VideoIntelligenceServiceClient videoIntelligenceServiceClient =
@@ -835,6 +834,20 @@ Troubleshooting
835834
836835
To get help, follow the instructions in the [shared Troubleshooting document](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/troubleshooting/readme.md#troubleshooting).
837836
837+
Using a proxy
838+
-----
839+
Clients in this repository use either HTTP or gRPC for the transport layer.
840+
The README of each client documents the transport layer the client uses.
841+
842+
For HTTP clients, a proxy can be configured by using `http.proxyHost` and
843+
related system properties as documented by
844+
[Java Networking and Proxies](https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html).
845+
846+
For gRPC clients, a proxy can be configured by using the
847+
`GRPC_PROXY_EXP` environment variable as documented by
848+
the gRPC [release notes](https://github.com/grpc/grpc-java/releases/tag/v1.0.3).
849+
Please note that gRPC proxy support is currently experimental.
850+
838851
Java Versions
839852
-------------
840853
@@ -948,7 +961,7 @@ Apache 2.0 - See [LICENSE] for more information.
948961
[stackdriver-logging-docs]: https://cloud.google.com/logging/docs
949962
[stackdriver-logging-activation]: https://console.cloud.google.com/start/api?id=logging
950963
951-
[pubsub-api]: https://googlecloudplatform.github.io/google-cloud-java/apidocs/index.html?com/google/cloud/pubsub/spi/v1/package-summary.html
964+
[pubsub-api]: https://googlecloudplatform.github.io/google-cloud-java/apidocs/index.html?com/google/cloud/pubsub/v1/package-summary.html
952965
[cloud-pubsub]: https://cloud.google.com/pubsub/
953966
[cloud-pubsub-docs]: https://cloud.google.com/pubsub/docs
954967

TESTING.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,14 @@ Google Translation service.
239239

240240
1. Create a test Google Cloud project.
241241

242-
2. Follow [Translate Quickstart](https://cloud.google.com/translate/v2/quickstart) to get an API
242+
2. Download a JSON service account credentials file from the Google Developer's Console. See more about this on the [Google Cloud Platform Authentication page][cloud-platform-authentication]
243243
key.
244244

245245
3. Create a `RemoteTranslateHelper` object using your project ID and API key. Here is an example
246246
that uses the `RemoteTranslateHelper` to list supported languages.
247247
```java
248-
RemoteTranslateHelper translateHelper = RemoteTranslateHelper.create(PROJECT_ID, API_KEY);
248+
RemoteTranslateHelper translateHelper =
249+
RemoteTranslateHelper.create(PROJECT_ID, new FileInputStream("/path/to/my/JSON/key.json"));
249250
Translate translate = translateHelper.getOptions().getService();
250251
List<Language> languages = translate.listSupportedLanguages();
251252
```
@@ -258,7 +259,7 @@ Currently, there isn't an emulator for Cloud Spanner, so an alternative is to cr
258259

259260
1. Create a test Google Cloud project.
260261

261-
2. Download a JSON service account credentials file from the Google Developer's Console. See more about this on the [Google Cloud Platform Storage Authentication page][cloud-platform-storage-authentication].
262+
2. Download a JSON service account credentials file from the Google Developer's Console. See more about this on the [Google Cloud Platform Authentication page][cloud-platform-authentication].
262263

263264
3. Create or use an existing Cloud Spanner Instance.
264265

@@ -283,6 +284,7 @@ Here is an example that uses the `RemoteSpannerHelper` to create a database.
283284
RemoteSpannerHelper.cleanUp();
284285
```
285286

287+
[cloud-platform-authentication]:https://cloud.google.com/docs/authentication/getting-started
286288
[cloud-platform-storage-authentication]:https://cloud.google.com/storage/docs/authentication?hl=en#service_accounts
287289
[create-service-account]:https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
288290
[cloud-nio]:https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-contrib/google-cloud-nio

appveyor.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,23 @@ environment:
1818
- JAVA_HOME: C:\Program Files\Java\jdk1.7.0
1919
GOOGLE_CLOUD_PROJECT:
2020
secure: hbX+cAXrU588+iTMKyzGOQ==
21-
SECRET:
22-
secure: P4H6q90j3t0GC527rKUrpMzYs1z4aqzMh7pfNVqr2ZIJB8H07oeaD0zlosK8An15VQw7q5WTWImiU+yzX1aErct+k2uIah0iArGuEcrKOtQV/4JD10P7QHPsSMXdDXFzbDXsDi6Wf4UDQH7tFGPNU+VrCcXPMfkIlMkYg5tD10TktjdCEJ6YNw0J6SldFeDHDyBkVbmP6SAiQTpqjqO3NDI8i15mH84CWNT90khz4t8Wnhyvnv+J3u89w9Lp/AFoJfkrK2fjDUhR3K1flyG689Skyng2NCSF5wZcq5IPGMRqR+18js4MykeybPVNmEtBBZh+rzPey42oxtQPIX9I6KwPfkXlu2tXuPcbPCpHH5Y=
21+
CREDENTIALS_SECRET:
22+
secure: P4H6q90j3t0GC527rKUrpMzYs1z4aqzMh7pfNVqr2ZIJB8H07oeaD0zlosK8An15VQw7q5WTWImiU+yzX1aErct+k2uIah0iArGuEcrKOtQV/4JD10P7QHPsSMXdDXFzbDXsDi6Wf4UDQH7tFGPNU+VrCcXPMfkIlMkYg5tD10TktjdCEJ6YNw0J6SldFeDHDyBkVbmP6SAiQTpqjqO3NDI8i15mH84CWNT90khz4t8Wnhyvnv+J3u89w9Lp/AFoJfkrK2fjDUhR3K1flyG689Skyng2NCSF5wZcq5IPGMRqR+18js4MykeybPVNmEtBBZh+rzPey42oxtQPIX9I6KwPfkXlu2tXuPcbPCpHH5Y=
23+
API_KEY_SECRET:
24+
secure: tlK82v6dlvXT76+w9PNmdf/oABZbzCdiA7JNLE+iUfQ=
2325

2426
# install required tools (maven, secure-file, encrypted files)
2527
install:
2628
- cmd: echo %JAVA_HOME%
2729
- cmd: echo %M2_HOME%
2830
- ps: $origin = git config --get remote.origin.url; git clone --quiet -b appveyor $origin appveyor
2931
- cmd: nuget install secure-file -ExcludeVersion
30-
- cmd: IF DEFINED SECRET (secure-file\tools\secure-file -decrypt appveyor\key.json.enc -secret %SECRET% -out appveyor\key.json)
31-
- cmd: IF DEFINED SECRET (SET GOOGLE_APPLICATION_CREDENTIALS=%APPVEYOR_BUILD_FOLDER%\appveyor\key.json)
32-
- cmd: ECHO %GOOGLE_APPLICATION_CREDENTIALS%
32+
- cmd: IF DEFINED CREDENTIALS_SECRET (secure-file\tools\secure-file -decrypt appveyor\key.json.enc -secret %CREDENTIALS_SECRET% -out appveyor\key.json)
33+
- cmd: IF DEFINED CREDENTIALS_SECRET (SET GOOGLE_APPLICATION_CREDENTIALS=%APPVEYOR_BUILD_FOLDER%\appveyor\key.json)
34+
- cmd: ECHO GOOGLE_APPLICATION_CREDENTIALS=%GOOGLE_APPLICATION_CREDENTIALS%
35+
- cmd: IF DEFINED API_KEY_SECRET (secure-file\tools\secure-file -decrypt appveyor\api_key.enc -secret %API_KEY_SECRET% -out appveyor\api_key)
36+
- cmd: IF DEFINED API_KEY_SECRET (SET /P GOOGLE_API_KEY=<%APPVEYOR_BUILD_FOLDER%\appveyor\api_key)
37+
- cmd: ECHO GOOGLE_API_KEY defined
3338

3439
# build and install artifacts
3540
build_script:

google-cloud-bigquery/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ Troubleshooting
214214

215215
To get help, follow the instructions in the [shared Troubleshooting document](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/troubleshooting/readme.md#troubleshooting).
216216

217+
Transport
218+
---------
219+
BigQuery uses HTTP for the transport layer.
220+
217221
Java Versions
218222
-------------
219223

google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/BigQueryOptionsTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.google.cloud.bigquery;
1818

1919
import com.google.cloud.TransportOptions;
20+
import org.easymock.EasyMock;
2021
import org.junit.Rule;
2122
import org.junit.Test;
2223
import org.junit.rules.ExpectedException;
@@ -28,7 +29,7 @@ public class BigQueryOptionsTest {
2829
@Test
2930
public void testInvalidTransport() {
3031
thrown.expect(IllegalArgumentException.class);
31-
BigQueryOptions.newBuilder().setTransportOptions(new TransportOptions() {});
32+
BigQueryOptions.newBuilder().setTransportOptions(EasyMock.createMock(TransportOptions.class));
3233
}
3334

3435
}

google-cloud-compute/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ Troubleshooting
218218

219219
To get help, follow the instructions in the [shared Troubleshooting document](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/troubleshooting/readme.md#troubleshooting).
220220

221+
Transport
222+
---------
223+
Compute uses HTTP for the transport layer.
224+
221225
Java Versions
222226
-------------
223227

google-cloud-compute/src/test/java/com/google/cloud/compute/ComputeOptionsTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.google.cloud.compute;
1818

1919
import com.google.cloud.TransportOptions;
20+
import org.easymock.EasyMock;
2021
import org.junit.Rule;
2122
import org.junit.Test;
2223
import org.junit.rules.ExpectedException;
@@ -29,7 +30,7 @@ public class ComputeOptionsTest {
2930
@Test
3031
public void testInvalidTransport() {
3132
thrown.expect(IllegalArgumentException.class);
32-
ComputeOptions.newBuilder().setTransportOptions(new TransportOptions() {});
33+
ComputeOptions.newBuilder().setTransportOptions(EasyMock.createMock(TransportOptions.class));
3334
}
3435

3536
}

google-cloud-core-grpc/src/main/java/com/google/cloud/grpc/GrpcTransportOptions.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
import com.google.api.core.InternalApi;
2222
import com.google.api.gax.core.FixedCredentialsProvider;
2323
import com.google.api.gax.core.CredentialsProvider;
24+
import com.google.api.gax.core.GaxProperties;
2425
import com.google.api.gax.core.NoCredentialsProvider;
2526
import com.google.api.gax.grpc.ChannelProvider;
27+
import com.google.api.gax.grpc.GaxGrpcProperties;
2628
import com.google.api.gax.grpc.InstantiatingChannelProvider;
2729
import com.google.api.gax.grpc.UnaryCallSettings;
2830
import com.google.api.gax.retrying.RetrySettings;
@@ -34,6 +36,7 @@
3436
import io.grpc.internal.SharedResourceHolder.Resource;
3537
import java.io.IOException;
3638
import java.io.ObjectInputStream;
39+
import java.util.Locale;
3740
import java.util.Objects;
3841
import java.util.concurrent.ExecutorService;
3942
import java.util.concurrent.ScheduledExecutorService;
@@ -71,6 +74,26 @@ public void close(ScheduledExecutorService instance) {
7174
}
7275
};
7376

77+
/**
78+
* Returns a string value for x-goog-api-client HTTP header. The header is used to report version
79+
* of the client and its protocol-specific dependencies.
80+
*
81+
* For internal use.
82+
*
83+
* @param libraryVersion version of the google-cloud-java library
84+
* @return value of x-goog-api-client HTTP header, which should be provided with each request
85+
*/
86+
@InternalApi
87+
public String getXGoogApiClientHeader(String libraryVersion) {
88+
return String.format(Locale.US,
89+
"gl-java/%s %s/%s gax/%s grpc/%s",
90+
firstNonNull(Runtime.class.getPackage().getImplementationVersion(), ""),
91+
ServiceOptions.getGoogApiClientLibName(),
92+
libraryVersion,
93+
GaxProperties.getGaxVersion(),
94+
GaxGrpcProperties.getGrpcVersion());
95+
}
96+
7497
/**
7598
* An interface for {@link ExecutorService} factories. Implementations of this interface can be
7699
* used to provide an user-defined executor to execute requests. Any implementation of this

0 commit comments

Comments
 (0)