Skip to content

Commit b3988d9

Browse files
authored
chore: migrate to owlbot (#213)
1 parent d920f37 commit b3988d9

2 files changed

Lines changed: 25 additions & 28 deletions

File tree

google-analytics-admin/src/main/java/com/example/analyticsadmin/QuickstartSample.java

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,35 @@
1717
package com.example.analytics;
1818

1919
/* This application demonstrates the usage of the Analytics Admin API using
20-
service account credentials. For more information on service accounts, see
21-
https://cloud.google.com/iam/docs/understanding-service-accounts
20+
service account credentials. For more information on service accounts, see
21+
https://cloud.google.com/iam/docs/understanding-service-accounts
2222
23-
The following document provides instructions on setting service account
24-
credentials for your application:
25-
https://cloud.google.com/docs/authentication/production
23+
The following document provides instructions on setting service account
24+
credentials for your application:
25+
https://cloud.google.com/docs/authentication/production
2626
27-
In a nutshell, you need to:
27+
In a nutshell, you need to:
2828
29-
1. Create a service account and download the key JSON file.
30-
https://cloud.google.com/docs/authentication/production#creating_a_service_account
29+
1. Create a service account and download the key JSON file.
30+
https://cloud.google.com/docs/authentication/production#creating_a_service_account
3131
32-
2. Provide service account credentials using one of the following options:
33-
- set the GOOGLE_APPLICATION_CREDENTIALS environment variable, the API
34-
client will use the value of this variable to find the service account key
35-
JSON file.
32+
2. Provide service account credentials using one of the following options:
33+
- set the GOOGLE_APPLICATION_CREDENTIALS environment variable, the API
34+
client will use the value of this variable to find the service account key
35+
JSON file.
3636
37-
https://cloud.google.com/docs/authentication/production#setting_the_environment_variable
37+
https://cloud.google.com/docs/authentication/production#setting_the_environment_variable
3838
39-
OR
39+
OR
4040
41-
- manually pass the path to the service account key JSON file to the API client
42-
by specifying the keyFilename parameter in the constructor.
43-
https://cloud.google.com/docs/authentication/production#passing_the_path_to_the_service_account_key_in_code
41+
- manually pass the path to the service account key JSON file to the API client
42+
by specifying the keyFilename parameter in the constructor.
43+
https://cloud.google.com/docs/authentication/production#passing_the_path_to_the_service_account_key_in_code
4444
45-
To run this sample using Maven:
46-
cd java-analytics-admin/samples/snippets
47-
mvn exec:java -Dexec.mainClass="com.example.analytics.QuickstartSample"
48-
*/
45+
To run this sample using Maven:
46+
cd java-analytics-admin/samples/snippets
47+
mvn exec:java -Dexec.mainClass="com.example.analytics.QuickstartSample"
48+
*/
4949

5050
// [START analytics_admin_quickstart]
5151

@@ -61,7 +61,6 @@ public static void main(String... args) throws Exception {
6161
listAccounts();
6262
}
6363

64-
6564
// This is an example snippet that calls the Google Analytics Admin API and lists all Google
6665
// Analytics accounts available to the authenticated user.
6766
static void listAccounts() throws Exception {
@@ -71,8 +70,8 @@ static void listAccounts() throws Exception {
7170
try (AnalyticsAdminServiceClient analyticsAdmin = AnalyticsAdminServiceClient.create()) {
7271
// Calls listAccounts() method of the Google Analytics Admin API and prints
7372
// the response for each account.
74-
ListAccountsPagedResponse response = analyticsAdmin
75-
.listAccounts(ListAccountsRequest.newBuilder().build());
73+
ListAccountsPagedResponse response =
74+
analyticsAdmin.listAccounts(ListAccountsRequest.newBuilder().build());
7675
for (ListAccountsPage page : response.iteratePages()) {
7776
for (Account account : page.iterateAll()) {
7877
System.out.printf("Account name: %s%n", account.getName());

google-analytics-admin/src/test/java/com/example/analyticsadmin/QuickstartSampleTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
import org.junit.runner.RunWith;
2727
import org.junit.runners.JUnit4;
2828

29-
/**
30-
* Tests for quickstart sample.
31-
*/
29+
/** Tests for quickstart sample. */
3230
@RunWith(JUnit4.class)
3331
@SuppressWarnings("checkstyle:abbreviationaswordinname")
3432
public class QuickstartSampleTest {
@@ -57,4 +55,4 @@ public void testQuickstart() throws Exception {
5755
String got = bout.toString();
5856
assertThat(got).contains("Account name:");
5957
}
60-
}
58+
}

0 commit comments

Comments
 (0)