Skip to content

Commit 28ab0f2

Browse files
---
yaml --- r: 5803 b: refs/heads/master c: 8e074f3 h: refs/heads/master i: 5801: 65115c5 5799: d21fb97
1 parent 4a2c424 commit 28ab0f2

6 files changed

Lines changed: 30 additions & 27 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: b191ab325047a815e4a94c2ae15fb55092901a1f
2+
refs/heads/master: 8e074f3c07dee4efc0c6f204b57b40fd5d531dcb
33
refs/heads/travis: 47e4fee4fd5af9b2a8ce46f23c72ec95f9b195b2
44
refs/heads/gh-pages: 4154fc3537163299162c8c903f2d1386463dd7a3
55
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444

trunk/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Storage storage = StorageOptions.getDefaultInstance().getService();
178178
```
179179

180180
If no credentials are provided, `google-cloud` will attempt to detect them from the environment
181-
using `GoogleCredentials.getApplicationDefault()` which will search for Default Application
181+
using `GoogleCredentials.getApplicationDefault()` which will search for Application Default
182182
Credentials in the following locations (in order):
183183
184184
1. The credentials file pointed to by the `GOOGLE_APPLICATION_CREDENTIALS` environment variable
@@ -498,8 +498,8 @@ Google Cloud Language (Beta)
498498
499499
### Preview
500500
501-
Here is a code snippet showing a simple usage example of LanguageServiceClient. The example assumes that either default application
502-
credentials or a valid API key are available. (See [Authentication section](#authentication) for more information)
501+
Here is a code snippet showing a simple usage example of LanguageServiceClient. The example assumes that either Application Default
502+
Credentials or a valid API key are available. (See [Authentication section](#authentication) for more information)
503503
```java
504504
try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) {
505505
Document document = Document.newBuilder().build();
@@ -516,7 +516,7 @@ Google Cloud Vision (Beta)
516516
### Preview
517517
518518
Here is a code snippet showing a simple usage example of ImageAnnotatorClient.
519-
The example assumes that either default application credentials or a valid API key
519+
The example assumes that either Application Default Credentials or a valid API key
520520
are available. (See [Authentication section](#authentication) for more information)
521521
```java
522522
try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
@@ -751,8 +751,8 @@ Google Translation (Beta)
751751
#### Preview
752752
753753
Here's a snippet showing a simple usage example. The example shows how to detect the language of
754-
some text and how to translate some text. The example assumes that either default application
755-
credentials or a valid API key are available. An API key stored in the `GOOGLE_API_KEY` environment
754+
some text and how to translate some text. The example assumes that either Application Default
755+
Credentials or a valid API key are available. An API key stored in the `GOOGLE_API_KEY` environment
756756
variable will be automatically detected. Complete source code can be found at
757757
[DetectLanguageAndTranslate.java](./google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java).
758758
@@ -784,8 +784,8 @@ Google Cloud Speech (Alpha)
784784
785785
### Preview
786786
787-
Here is a code snippet showing a simple usage example of SpeechClient. The example assumes that either default application
788-
credentials or a valid API key are available. (See [Authentication section](#authentication) for more information)
787+
Here is a code snippet showing a simple usage example of SpeechClient. The example assumes that either Application Default
788+
Credentials or a valid API key are available. (See [Authentication section](#authentication) for more information)
789789
Note that you must provide a uri to a FLAC audio file to run this.
790790
791791
```java
@@ -814,8 +814,8 @@ Google Cloud Trace (Alpha)
814814
815815
### Preview
816816
817-
Here is a code snippet showing a simple usage example of TraceServiceClient. The example assumes that either default application
818-
credentials or a valid API key are available.
817+
Here is a code snippet showing a simple usage example of TraceServiceClient. The example assumes that either Application Default
818+
Credentials or a valid API key are available.
819819
Note that you must [supply credentials](#authentication) and a project ID if running this snippet elsewhere.
820820
```java
821821
try (TraceServiceClient traceServiceClient = TraceServiceClient.create()) {
@@ -832,8 +832,8 @@ Google Cloud Video Intelligence (Alpha)
832832
833833
### Preview
834834
835-
Here is a code snippet showing a simple usage example of TraceServiceClient. The example assumes that either default application
836-
credentials or a valid API key are available.
835+
Here is a code snippet showing a simple usage example of TraceServiceClient. The example assumes that either Application Default
836+
Credentials or a valid API key are available.
837837
Note that you must [supply credentials](#authentication) and a project ID if running this snippet elsewhere.
838838
```java
839839
try (VideoIntelligenceServiceClient videoIntelligenceServiceClient =

trunk/google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ public class DetectLanguageAndTranslate {
3737
public static void main(String... args) {
3838
// Create a service object
3939
//
40-
// Requests are authenticated using default application credentials if available; otherwise,
41-
// using an API key from the GOOGLE_API_KEY environment variable
40+
// If no explicit credentials or API key are set, requests are authenticated using Application
41+
// Default Credentials if available; otherwise, using an API key from the GOOGLE_API_KEY
42+
// environment variable
4243
Translate translate = TranslateOptions.getDefaultInstance().getService();
4344

4445
// Detect the language of some text

trunk/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,13 @@ public interface DatabaseClient {
218218
* returned runner can only be used once.
219219
*
220220
* <p>Example of a read write transaction.
221-
* <pre> {@code
221+
* <pre> <code>
222222
* long singerId = my_singer_id;
223223
* TransactionRunner runner = dbClient.readWriteTransaction();
224224
* runner.run(
225-
* new TransactionCallable<Void>() {
225+
* new TransactionCallable&lt;Void&gt;() {
226226
*
227-
* @Override
227+
* {@literal @}Override
228228
* public Void run(TransactionContext transaction) throws Exception {
229229
* String column = "FirstName";
230230
* Struct row =
@@ -235,7 +235,7 @@ public interface DatabaseClient {
235235
* return null;
236236
* }
237237
* });
238-
* }</pre>
238+
* </code></pre>
239239
*
240240
*/
241241
TransactionRunner readWriteTransaction();

trunk/google-cloud-translate/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ section to add `google-cloud-translate` as a dependency in your code.
8080

8181
#### Creating an authorized service object
8282
To make authenticated requests to Google Translation, you must create a service object with
83-
credentials or with an API key. The simplest way to authenticate is to use
83+
credentials or use an API key. The simplest way to authenticate is to use
8484
[Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials).
8585
These credentials are automatically inferred from your environment, so you only need the following
8686
code to create your service object:
@@ -142,8 +142,8 @@ Translation translation = translate.translate(
142142

143143
In
144144
[DetectLanguageAndTranslate.java](../google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java)
145-
we put together all the code shown above into one program. The program assumes that either default
146-
application credentials or a valid api key are available.
145+
we put together all the code shown above into one program. The program assumes that either Application
146+
Default Credentials or a valid API key are available.
147147

148148
Troubleshooting
149149
---------------

trunk/google-cloud-translate/src/main/java/com/google/cloud/translate/package-info.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
/**
1818
* A client to Google Translation.
1919
*
20-
* <p>Here's a simple usage example for using Google Cloud Translation. This example shows how to
21-
* detect the language of some text and how to translate some text. The example assumes that the
22-
* {@code GOOGLE_API_KEY} is set and contains a valid API key. Alternatively, you can use
23-
* {@link com.google.cloud.translate.TranslateOptions.Builder#setApiKey(java.lang.String)} to set
24-
* the API key. For the complete source code, see: <a
20+
* <p>Here's a simple usage example for Google Cloud Translation. This example shows how to detect
21+
* the language of some text and how to translate some text. The example assumes that either
22+
* Application Default Credentials are available or that the {@code GOOGLE_API_KEY} environment
23+
* variable is set and contains a valid API key. Alternatively, you can use
24+
* {@link com.google.cloud.ServiceOptions.Builder#setCredentials setCredentials} to set credentials,
25+
* or {@link com.google.cloud.translate.TranslateOptions.Builder#setApiKey(java.lang.String)} to set
26+
* an API key. For the complete source code see <a
2527
* href="https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java">
2628
* DetectLanguageAndTranslate.java</a>. <pre>
2729
* {@code Translate translate = TranslateOptions.getDefaultInstance().getService();

0 commit comments

Comments
 (0)