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

Commit 58bb59d

Browse files
feat!: release gapic-generator-java v2.0.0 (#225)
Committer: @miraleung PiperOrigin-RevId: 388535346 Source-Link: googleapis/googleapis@d9eaf41 Source-Link: https://github.com/googleapis/googleapis-gen/commit/976c5ab6f24b58c91fe04847ead1953f99d19e6a
1 parent f5542e6 commit 58bb59d

File tree

9 files changed

+103
-559
lines changed

9 files changed

+103
-559
lines changed

google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1beta1/NotebookServiceClient.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.cloud.notebooks.v1beta1;
1818

19-
import com.google.api.core.ApiFunction;
2019
import com.google.api.core.ApiFuture;
2120
import com.google.api.core.ApiFutures;
2221
import com.google.api.core.BetaApi;
@@ -1526,12 +1525,7 @@ public static ApiFuture<ListInstancesPagedResponse> createAsync(
15261525
ListInstancesPage.createEmptyPage().createPageAsync(context, futureResponse);
15271526
return ApiFutures.transform(
15281527
futurePage,
1529-
new ApiFunction<ListInstancesPage, ListInstancesPagedResponse>() {
1530-
@Override
1531-
public ListInstancesPagedResponse apply(ListInstancesPage input) {
1532-
return new ListInstancesPagedResponse(input);
1533-
}
1534-
},
1528+
input -> new ListInstancesPagedResponse(input),
15351529
MoreExecutors.directExecutor());
15361530
}
15371531

@@ -1607,12 +1601,7 @@ public static ApiFuture<ListEnvironmentsPagedResponse> createAsync(
16071601
ListEnvironmentsPage.createEmptyPage().createPageAsync(context, futureResponse);
16081602
return ApiFutures.transform(
16091603
futurePage,
1610-
new ApiFunction<ListEnvironmentsPage, ListEnvironmentsPagedResponse>() {
1611-
@Override
1612-
public ListEnvironmentsPagedResponse apply(ListEnvironmentsPage input) {
1613-
return new ListEnvironmentsPagedResponse(input);
1614-
}
1615-
},
1604+
input -> new ListEnvironmentsPagedResponse(input),
16161605
MoreExecutors.directExecutor());
16171606
}
16181607

google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1beta1/NotebookServiceSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,13 @@ public NotebookServiceStubSettings.Builder getStubSettingsBuilder() {
348348
return ((NotebookServiceStubSettings.Builder) getStubSettings());
349349
}
350350

351-
// NEXT_MAJOR_VER: remove 'throws Exception'.
352351
/**
353352
* Applies the given settings updater function to all of the unary API methods in this service.
354353
*
355354
* <p>Note: This method does not support applying settings to streaming methods.
356355
*/
357356
public Builder applyToAllUnaryMethods(
358-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
357+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
359358
super.applyToAllUnaryMethods(
360359
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
361360
return this;

google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1beta1/stub/GrpcNotebookServiceStub.java

Lines changed: 77 additions & 136 deletions
Large diffs are not rendered by default.

google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1beta1/stub/NotebookServiceStubSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,14 +1269,13 @@ private static Builder initDefaults(Builder builder) {
12691269
return builder;
12701270
}
12711271

1272-
// NEXT_MAJOR_VER: remove 'throws Exception'.
12731272
/**
12741273
* Applies the given settings updater function to all of the unary API methods in this service.
12751274
*
12761275
* <p>Note: This method does not support applying settings to streaming methods.
12771276
*/
12781277
public Builder applyToAllUnaryMethods(
1279-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
1278+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
12801279
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
12811280
return this;
12821281
}

google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1beta1/NotebookServiceClientTest.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public void listInstancesExceptionTest() throws Exception {
147147
public void getInstanceTest() throws Exception {
148148
Instance expectedResponse =
149149
Instance.newBuilder()
150-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
150+
.setName("name3373707")
151151
.setPostStartupScript("postStartupScript870779112")
152152
.setProxyUri("proxyUri-985185250")
153153
.addAllInstanceOwners(new ArrayList<String>())
@@ -205,7 +205,7 @@ public void getInstanceExceptionTest() throws Exception {
205205
public void createInstanceTest() throws Exception {
206206
Instance expectedResponse =
207207
Instance.newBuilder()
208-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
208+
.setName("name3373707")
209209
.setPostStartupScript("postStartupScript870779112")
210210
.setProxyUri("proxyUri-985185250")
211211
.addAllInstanceOwners(new ArrayList<String>())
@@ -283,7 +283,7 @@ public void createInstanceExceptionTest() throws Exception {
283283
public void registerInstanceTest() throws Exception {
284284
Instance expectedResponse =
285285
Instance.newBuilder()
286-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
286+
.setName("name3373707")
287287
.setPostStartupScript("postStartupScript870779112")
288288
.setProxyUri("proxyUri-985185250")
289289
.addAllInstanceOwners(new ArrayList<String>())
@@ -358,7 +358,7 @@ public void registerInstanceExceptionTest() throws Exception {
358358
public void setInstanceAcceleratorTest() throws Exception {
359359
Instance expectedResponse =
360360
Instance.newBuilder()
361-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
361+
.setName("name3373707")
362362
.setPostStartupScript("postStartupScript870779112")
363363
.setProxyUri("proxyUri-985185250")
364364
.addAllInstanceOwners(new ArrayList<String>())
@@ -435,7 +435,7 @@ public void setInstanceAcceleratorExceptionTest() throws Exception {
435435
public void setInstanceMachineTypeTest() throws Exception {
436436
Instance expectedResponse =
437437
Instance.newBuilder()
438-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
438+
.setName("name3373707")
439439
.setPostStartupScript("postStartupScript870779112")
440440
.setProxyUri("proxyUri-985185250")
441441
.addAllInstanceOwners(new ArrayList<String>())
@@ -511,7 +511,7 @@ public void setInstanceMachineTypeExceptionTest() throws Exception {
511511
public void setInstanceLabelsTest() throws Exception {
512512
Instance expectedResponse =
513513
Instance.newBuilder()
514-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
514+
.setName("name3373707")
515515
.setPostStartupScript("postStartupScript870779112")
516516
.setProxyUri("proxyUri-985185250")
517517
.addAllInstanceOwners(new ArrayList<String>())
@@ -630,7 +630,7 @@ public void deleteInstanceExceptionTest() throws Exception {
630630
public void startInstanceTest() throws Exception {
631631
Instance expectedResponse =
632632
Instance.newBuilder()
633-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
633+
.setName("name3373707")
634634
.setPostStartupScript("postStartupScript870779112")
635635
.setProxyUri("proxyUri-985185250")
636636
.addAllInstanceOwners(new ArrayList<String>())
@@ -697,7 +697,7 @@ public void startInstanceExceptionTest() throws Exception {
697697
public void stopInstanceTest() throws Exception {
698698
Instance expectedResponse =
699699
Instance.newBuilder()
700-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
700+
.setName("name3373707")
701701
.setPostStartupScript("postStartupScript870779112")
702702
.setProxyUri("proxyUri-985185250")
703703
.addAllInstanceOwners(new ArrayList<String>())
@@ -763,7 +763,7 @@ public void stopInstanceExceptionTest() throws Exception {
763763
public void resetInstanceTest() throws Exception {
764764
Instance expectedResponse =
765765
Instance.newBuilder()
766-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
766+
.setName("name3373707")
767767
.setPostStartupScript("postStartupScript870779112")
768768
.setProxyUri("proxyUri-985185250")
769769
.addAllInstanceOwners(new ArrayList<String>())
@@ -830,7 +830,7 @@ public void resetInstanceExceptionTest() throws Exception {
830830
public void reportInstanceInfoTest() throws Exception {
831831
Instance expectedResponse =
832832
Instance.newBuilder()
833-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
833+
.setName("name3373707")
834834
.setPostStartupScript("postStartupScript870779112")
835835
.setProxyUri("proxyUri-985185250")
836836
.addAllInstanceOwners(new ArrayList<String>())
@@ -955,7 +955,7 @@ public void isInstanceUpgradeableExceptionTest() throws Exception {
955955
public void upgradeInstanceTest() throws Exception {
956956
Instance expectedResponse =
957957
Instance.newBuilder()
958-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
958+
.setName("name3373707")
959959
.setPostStartupScript("postStartupScript870779112")
960960
.setProxyUri("proxyUri-985185250")
961961
.addAllInstanceOwners(new ArrayList<String>())
@@ -1023,7 +1023,7 @@ public void upgradeInstanceExceptionTest() throws Exception {
10231023
public void upgradeInstanceInternalTest() throws Exception {
10241024
Instance expectedResponse =
10251025
Instance.newBuilder()
1026-
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
1026+
.setName("name3373707")
10271027
.setPostStartupScript("postStartupScript870779112")
10281028
.setProxyUri("proxyUri-985185250")
10291029
.addAllInstanceOwners(new ArrayList<String>())
@@ -1155,7 +1155,7 @@ public void listEnvironmentsExceptionTest() throws Exception {
11551155
public void getEnvironmentTest() throws Exception {
11561156
Environment expectedResponse =
11571157
Environment.newBuilder()
1158-
.setName(EnvironmentName.of("[PROJECT]", "[ENVIRONMENT]").toString())
1158+
.setName("name3373707")
11591159
.setDisplayName("displayName1714148973")
11601160
.setDescription("description-1724546052")
11611161
.setPostStartupScript("postStartupScript870779112")
@@ -1199,7 +1199,7 @@ public void getEnvironmentExceptionTest() throws Exception {
11991199
public void createEnvironmentTest() throws Exception {
12001200
Environment expectedResponse =
12011201
Environment.newBuilder()
1202-
.setName(EnvironmentName.of("[PROJECT]", "[ENVIRONMENT]").toString())
1202+
.setName("name3373707")
12031203
.setDisplayName("displayName1714148973")
12041204
.setDescription("description-1724546052")
12051205
.setPostStartupScript("postStartupScript870779112")

proto-google-cloud-notebooks-v1beta1/clirr-ignored-differences.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,12 @@
1616
<className>com/google/cloud/notebooks/v1beta1/*OrBuilder</className>
1717
<method>boolean has*(*)</method>
1818
</difference>
19+
<difference>
20+
<differenceType>8001</differenceType>
21+
<className>com/google/cloud/notebooks/v1beta1/Environment*</className>
22+
</difference>
23+
<difference>
24+
<differenceType>8001</differenceType>
25+
<className>com/google/cloud/notebooks/v1beta1/Instance*</className>
26+
</difference>
1927
</differences>

proto-google-cloud-notebooks-v1beta1/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@
2121
<groupId>com.google.api.grpc</groupId>
2222
<artifactId>proto-google-common-protos</artifactId>
2323
</dependency>
24-
<dependency>
25-
<groupId>com.google.api</groupId>
26-
<artifactId>api-common</artifactId>
27-
</dependency>
28-
<dependency>
29-
<groupId>com.google.guava</groupId>
30-
<artifactId>guava</artifactId>
31-
</dependency>
3224
</dependencies>
3325

3426
<build>

0 commit comments

Comments
 (0)