You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: branches/pubsub-streaming-pull/google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/DetectLanguageAndTranslate.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,9 @@ public class DetectLanguageAndTranslate {
37
37
publicstaticvoidmain(String... args) {
38
38
// Create a service object
39
39
//
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
Copy file name to clipboardExpand all lines: branches/pubsub-streaming-pull/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -218,13 +218,13 @@ public interface DatabaseClient {
Copy file name to clipboardExpand all lines: branches/pubsub-streaming-pull/google-cloud-translate/src/main/java/com/google/cloud/translate/package-info.java
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,13 @@
17
17
/**
18
18
* A client to Google Translation.
19
19
*
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
0 commit comments