Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 1d6f33f

Browse files
feat!: regenerate with breaking v1p1beta1 and v1p2beta2 changes (#91)
## Breaking Changes * Remove SearchIamPolicies from v1p1beta1 * Remove SearchResources from v1p1beta1 * Remove ExportAssets from v1p2beta1 * Remove BatchGetAssetHistory from v1p2beta1 This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/badf69d0-35e6-44bc-af51-7c1c8f83a086/targets
1 parent 984bc16 commit 1d6f33f

File tree

88 files changed

+1191
-16384
lines changed

Some content is hidden

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

88 files changed

+1191
-16384
lines changed

.kokoro/build.sh

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,23 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI
3737
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
3838
fi
3939

40+
RETURN_CODE=0
41+
set +e
42+
4043
case ${JOB_TYPE} in
4144
test)
4245
mvn test -B -Dclirr.skip=true -Denforcer.skip=true
43-
bash ${KOKORO_GFILE_DIR}/codecov.sh
44-
bash .kokoro/coerce_logs.sh
46+
RETURN_CODE=$?
4547
;;
4648
lint)
4749
mvn \
4850
-Penable-samples \
4951
com.coveo:fmt-maven-plugin:check
52+
RETURN_CODE=$?
5053
;;
5154
javadoc)
5255
mvn javadoc:javadoc javadoc:test-javadoc
56+
RETURN_CODE=$?
5357
;;
5458
integration)
5559
mvn -B ${INTEGRATION_TEST_ARGS} \
@@ -59,21 +63,46 @@ integration)
5963
-Denforcer.skip=true \
6064
-fae \
6165
verify
62-
bash .kokoro/coerce_logs.sh
66+
RETURN_CODE=$?
6367
;;
6468
samples)
65-
mvn -B \
66-
-Penable-samples \
67-
-DtrimStackTrace=false \
68-
-Dclirr.skip=true \
69-
-Denforcer.skip=true \
70-
-fae \
71-
verify
72-
bash .kokoro/coerce_logs.sh
69+
if [[ -f samples/pom.xml ]]
70+
then
71+
pushd samples
72+
mvn -B \
73+
-Penable-samples \
74+
-DtrimStackTrace=false \
75+
-Dclirr.skip=true \
76+
-Denforcer.skip=true \
77+
-fae \
78+
verify
79+
RETURN_CODE=$?
80+
popd
81+
else
82+
echo "no sample pom.xml found - skipping sample tests"
83+
fi
7384
;;
7485
clirr)
7586
mvn -B -Denforcer.skip=true clirr:check
87+
RETURN_CODE=$?
7688
;;
7789
*)
7890
;;
7991
esac
92+
93+
if [ "${REPORT_COVERAGE}" == "true" ]
94+
then
95+
bash ${KOKORO_GFILE_DIR}/codecov.sh
96+
fi
97+
98+
# fix output location of logs
99+
bash .kokoro/coerce_logs.sh
100+
101+
if [[ "${ENABLE_BUILD_COP}" == "true" ]]
102+
then
103+
chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop
104+
${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-asset
105+
fi
106+
107+
echo "exiting with ${RETURN_CODE}"
108+
exit ${RETURN_CODE}

.kokoro/continuous/java8.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ env_vars: {
55
key: "TRAMPOLINE_IMAGE"
66
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
8+
9+
env_vars: {
10+
key: "REPORT_COVERAGE"
11+
value: "true"
12+
}

.kokoro/nightly/integration.cfg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,17 @@ env_vars: {
55
key: "TRAMPOLINE_IMAGE"
66
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
8+
9+
env_vars: {
10+
key: "ENABLE_BUILD_COP"
11+
value: "true"
12+
}
13+
14+
before_action {
15+
fetch_keystore {
16+
keystore_resource {
17+
keystore_config_id: 73713
18+
keyname: "java_it_service_account"
19+
}
20+
}
21+
}

.kokoro/nightly/java8.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ env_vars: {
55
key: "TRAMPOLINE_IMAGE"
66
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
8+
9+
env_vars: {
10+
key: "REPORT_COVERAGE"
11+
value: "true"
12+
}

.kokoro/nightly/samples.cfg

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,28 @@
22

33
# Configure the docker image for kokoro-trampoline.
44
env_vars: {
5-
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
88

99
env_vars: {
10-
key: "JOB_TYPE"
11-
value: "samples"
10+
key: "JOB_TYPE"
11+
value: "samples"
1212
}
1313

1414
env_vars: {
15-
key: "GCLOUD_PROJECT"
16-
value: "gcloud-devel"
15+
key: "GCLOUD_PROJECT"
16+
value: "gcloud-devel"
1717
}
1818

1919
env_vars: {
20-
key: "GOOGLE_APPLICATION_CREDENTIALS"
21-
value: "keystore/73713_java_it_service_account"
20+
key: "GOOGLE_APPLICATION_CREDENTIALS"
21+
value: "keystore/73713_java_it_service_account"
22+
}
23+
24+
env_vars: {
25+
key: "ENABLE_BUILD_COP"
26+
value: "true"
2227
}
2328

2429
before_action {

.kokoro/presubmit/java8.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ env_vars: {
55
key: "TRAMPOLINE_IMAGE"
66
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
8+
9+
env_vars: {
10+
key: "REPORT_COVERAGE"
11+
value: "true"
12+
}

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>3.4.0</version>
23+
<version>4.2.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>
2727
</dependencies>
2828
</dependencyManagement>
29-
3029
<dependencies>
3130
<dependency>
3231
<groupId>com.google.cloud</groupId>
@@ -87,6 +86,8 @@ use this Cloud Asset Inventory Client Library.
8786

8887

8988

89+
90+
9091
## Troubleshooting
9192

9293
To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting].
@@ -158,4 +159,5 @@ Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5]
158159
[license]: https://github.com/googleapis/java-asset/blob/master/LICENSE
159160
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
160161
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudasset.googleapis.com
161-
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
162+
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
163+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
3+
<differences>
4+
<!-- TODO: remove after 0.119 is released -->
5+
<difference>
6+
<differenceType>7002</differenceType>
7+
<className>com/google/cloud/asset/v1p1beta1/AssetServiceClient</className>
8+
<method>*</method>
9+
</difference>
10+
<difference>
11+
<differenceType>7002</differenceType>
12+
<className>com/google/cloud/asset/v1p1beta1/AssetServiceSettings*</className>
13+
<method>*</method>
14+
</difference>
15+
<difference>
16+
<differenceType>7002</differenceType>
17+
<className>com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub*</className>
18+
<method>*</method>
19+
</difference>
20+
<difference>
21+
<differenceType>7002</differenceType>
22+
<className>com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub*</className>
23+
<method>*</method>
24+
</difference>
25+
<difference>
26+
<differenceType>7002</differenceType>
27+
<className>com/google/cloud/asset/v1p2beta1/AssetServiceClient</className>
28+
<method>*</method>
29+
</difference>
30+
<difference>
31+
<differenceType>7002</differenceType>
32+
<className>com/google/cloud/asset/v1p2beta1/AssetServiceSettings*</className>
33+
<method>*</method>
34+
</difference>
35+
<difference>
36+
<differenceType>7002</differenceType>
37+
<className>com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub*</className>
38+
<method>*</method>
39+
</difference>
40+
<difference>
41+
<differenceType>7002</differenceType>
42+
<className>com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub*</className>
43+
<method>*</method>
44+
</difference>
45+
<difference>
46+
<differenceType>8001</differenceType>
47+
<className>com/google/cloud/asset/v1p1beta1/AssetServiceClient$SearchIam*</className>
48+
</difference>
49+
<difference>
50+
<differenceType>8001</differenceType>
51+
<className>com/google/cloud/asset/v1p1beta1/AssetServiceClient$SearchResources*</className>
52+
</difference>
53+
</differences>

google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,12 @@
5454
* <code>
5555
* AssetServiceSettings.Builder assetServiceSettingsBuilder =
5656
* AssetServiceSettings.newBuilder();
57-
* assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
58-
* .setTotalTimeout(Duration.ofSeconds(30));
57+
* assetServiceSettingsBuilder
58+
* .createFeedSettings()
59+
* .setRetrySettings(
60+
* assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
61+
* .setTotalTimeout(Duration.ofSeconds(30))
62+
* .build());
5963
* AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
6064
* </code>
6165
* </pre>

google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,12 @@
7777
* <code>
7878
* AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
7979
* AssetServiceStubSettings.newBuilder();
80-
* assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
81-
* .setTotalTimeout(Duration.ofSeconds(30));
80+
* assetServiceSettingsBuilder
81+
* .createFeedSettings()
82+
* .setRetrySettings(
83+
* assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
84+
* .setTotalTimeout(Duration.ofSeconds(30))
85+
* .build());
8286
* AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
8387
* </code>
8488
* </pre>

0 commit comments

Comments
 (0)