Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 16, 2023. It is now read-only.
/java-redisPublic archive

Commitd8f9c5b

Browse files
feat: add ConnectMode to v1 and UpgradeInstance RPC to v1beta1 (#53)
* [CHANGE ME] Re-generated to pick up changes in the API or client library generator.* fix: allow proto interface changesCo-authored-by: Jeff Ching <chingor@google.com>
1 parentdf84ef8 commitd8f9c5b

File tree

35 files changed

+3068
-759
lines changed

35 files changed

+3068
-759
lines changed

‎google-cloud-redis-bom/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<version>0.4.0</version>
1212
</parent>
1313

14-
<name>Google Cloudredis BOM</name>
14+
<name>Google CloudRedis BOM</name>
1515
<url>https://github.com/googleapis/java-redis</url>
1616
<description>
1717
BOM for Google Cloud Redis

‎google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java‎

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,9 @@ public final OperationsClient getOperationsClient() {
187187
* Lists all Redis instances owned by a project in either the specified location (region) or all
188188
* locations.
189189
*
190-
* <p>The location should have the following format: &#42;
191-
* `projects/{project_id}/locations/{location_id}`
190+
* <p>The location should have the following format:
191+
*
192+
* <p>&#42; `projects/{project_id}/locations/{location_id}`
192193
*
193194
* <p>If `location_id` is specified as `-` (wildcard), then all regions available to the project
194195
* are queried, and the results are aggregated.
@@ -221,8 +222,9 @@ public final ListInstancesPagedResponse listInstances(LocationName parent) {
221222
* Lists all Redis instances owned by a project in either the specified location (region) or all
222223
* locations.
223224
*
224-
* <p>The location should have the following format: &#42;
225-
* `projects/{project_id}/locations/{location_id}`
225+
* <p>The location should have the following format:
226+
*
227+
* <p>&#42; `projects/{project_id}/locations/{location_id}`
226228
*
227229
* <p>If `location_id` is specified as `-` (wildcard), then all regions available to the project
228230
* are queried, and the results are aggregated.
@@ -252,8 +254,9 @@ public final ListInstancesPagedResponse listInstances(String parent) {
252254
* Lists all Redis instances owned by a project in either the specified location (region) or all
253255
* locations.
254256
*
255-
* <p>The location should have the following format: &#42;
256-
* `projects/{project_id}/locations/{location_id}`
257+
* <p>The location should have the following format:
258+
*
259+
* <p>&#42; `projects/{project_id}/locations/{location_id}`
257260
*
258261
* <p>If `location_id` is specified as `-` (wildcard), then all regions available to the project
259262
* are queried, and the results are aggregated.
@@ -284,8 +287,9 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque
284287
* Lists all Redis instances owned by a project in either the specified location (region) or all
285288
* locations.
286289
*
287-
* <p>The location should have the following format: &#42;
288-
* `projects/{project_id}/locations/{location_id}`
290+
* <p>The location should have the following format:
291+
*
292+
* <p>&#42; `projects/{project_id}/locations/{location_id}`
289293
*
290294
* <p>If `location_id` is specified as `-` (wildcard), then all regions available to the project
291295
* are queried, and the results are aggregated.
@@ -316,8 +320,9 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque
316320
* Lists all Redis instances owned by a project in either the specified location (region) or all
317321
* locations.
318322
*
319-
* <p>The location should have the following format: &#42;
320-
* `projects/{project_id}/locations/{location_id}`
323+
* <p>The location should have the following format:
324+
*
325+
* <p>&#42; `projects/{project_id}/locations/{location_id}`
321326
*
322327
* <p>If `location_id` is specified as `-` (wildcard), then all regions available to the project
323328
* are queried, and the results are aggregated.
@@ -709,7 +714,7 @@ public final UnaryCallable<CreateInstanceRequest, Operation> createInstanceCalla
709714
*
710715
* @param updateMask Required. Mask of fields to update. At least one path must be supplied in
711716
* this field. The elements of the repeated paths field may only include these fields from
712-
* [Instance][CloudRedis.Instance]:
717+
* [Instance][google.cloud.redis.v1.Instance]:
713718
* <p>&#42; `displayName` &#42; `labels` &#42; `memorySizeGb` &#42; `redisConfig`
714719
* @param instance Required. Update description. Only fields specified in update_mask are updated.
715720
* @throws com.google.api.gax.rpc.ApiException if the remote call fails

‎google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java‎

Lines changed: 153 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ public final OperationsClient getOperationsClient() {
188188
* Lists all Redis instances owned by a project in either the specified location (region) or all
189189
* locations.
190190
*
191-
* <p>The location should have the following format: &#42;
192-
* `projects/{project_id}/locations/{location_id}`
191+
* <p>The location should have the following format:
192+
*
193+
* <p>&#42; `projects/{project_id}/locations/{location_id}`
193194
*
194195
* <p>If `location_id` is specified as `-` (wildcard), then all regions available to the project
195196
* are queried, and the results are aggregated.
@@ -222,8 +223,9 @@ public final ListInstancesPagedResponse listInstances(LocationName parent) {
222223
* Lists all Redis instances owned by a project in either the specified location (region) or all
223224
* locations.
224225
*
225-
* <p>The location should have the following format: &#42;
226-
* `projects/{project_id}/locations/{location_id}`
226+
* <p>The location should have the following format:
227+
*
228+
* <p>&#42; `projects/{project_id}/locations/{location_id}`
227229
*
228230
* <p>If `location_id` is specified as `-` (wildcard), then all regions available to the project
229231
* are queried, and the results are aggregated.
@@ -253,8 +255,9 @@ public final ListInstancesPagedResponse listInstances(String parent) {
253255
* Lists all Redis instances owned by a project in either the specified location (region) or all
254256
* locations.
255257
*
256-
* <p>The location should have the following format: &#42;
257-
* `projects/{project_id}/locations/{location_id}`
258+
* <p>The location should have the following format:
259+
*
260+
* <p>&#42; `projects/{project_id}/locations/{location_id}`
258261
*
259262
* <p>If `location_id` is specified as `-` (wildcard), then all regions available to the project
260263
* are queried, and the results are aggregated.
@@ -285,8 +288,9 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque
285288
* Lists all Redis instances owned by a project in either the specified location (region) or all
286289
* locations.
287290
*
288-
* <p>The location should have the following format: &#42;
289-
* `projects/{project_id}/locations/{location_id}`
291+
* <p>The location should have the following format:
292+
*
293+
* <p>&#42; `projects/{project_id}/locations/{location_id}`
290294
*
291295
* <p>If `location_id` is specified as `-` (wildcard), then all regions available to the project
292296
* are queried, and the results are aggregated.
@@ -317,8 +321,9 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque
317321
* Lists all Redis instances owned by a project in either the specified location (region) or all
318322
* locations.
319323
*
320-
* <p>The location should have the following format: &#42;
321-
* `projects/{project_id}/locations/{location_id}`
324+
* <p>The location should have the following format:
325+
*
326+
* <p>&#42; `projects/{project_id}/locations/{location_id}`
322327
*
323328
* <p>If `location_id` is specified as `-` (wildcard), then all regions available to the project
324329
* are queried, and the results are aggregated.
@@ -1365,6 +1370,144 @@ public final UnaryCallable<DeleteInstanceRequest, Operation> deleteInstanceCalla
13651370
returnstub.deleteInstanceCallable();
13661371
}
13671372

1373+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1374+
/**
1375+
* Upgrades Redis instance to the newer Redis version specified in the request.
1376+
*
1377+
* <p>Sample code:
1378+
*
1379+
* <pre><code>
1380+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
1381+
* InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
1382+
* String redisVersion = "";
1383+
* Instance response = cloudRedisClient.upgradeInstanceAsync(name, redisVersion).get();
1384+
* }
1385+
* </code></pre>
1386+
*
1387+
* @param name Required. Redis instance resource name using the form:
1388+
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id`
1389+
* refers to a GCP region.
1390+
* @param redisVersion Required. Specifies the target version of Redis software to upgrade to.
1391+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1392+
*/
1393+
@BetaApi(
1394+
"The surface for long-running operations is not stable yet and may change in the future.")
1395+
publicfinalOperationFuture<Instance,Any>upgradeInstanceAsync(
1396+
InstanceNamename,StringredisVersion) {
1397+
UpgradeInstanceRequestrequest =
1398+
UpgradeInstanceRequest.newBuilder()
1399+
.setName(name ==null ?null :name.toString())
1400+
.setRedisVersion(redisVersion)
1401+
.build();
1402+
returnupgradeInstanceAsync(request);
1403+
}
1404+
1405+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1406+
/**
1407+
* Upgrades Redis instance to the newer Redis version specified in the request.
1408+
*
1409+
* <p>Sample code:
1410+
*
1411+
* <pre><code>
1412+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
1413+
* InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
1414+
* String redisVersion = "";
1415+
* Instance response = cloudRedisClient.upgradeInstanceAsync(name.toString(), redisVersion).get();
1416+
* }
1417+
* </code></pre>
1418+
*
1419+
* @param name Required. Redis instance resource name using the form:
1420+
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id`
1421+
* refers to a GCP region.
1422+
* @param redisVersion Required. Specifies the target version of Redis software to upgrade to.
1423+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1424+
*/
1425+
@BetaApi(
1426+
"The surface for long-running operations is not stable yet and may change in the future.")
1427+
publicfinalOperationFuture<Instance,Any>upgradeInstanceAsync(
1428+
Stringname,StringredisVersion) {
1429+
UpgradeInstanceRequestrequest =
1430+
UpgradeInstanceRequest.newBuilder().setName(name).setRedisVersion(redisVersion).build();
1431+
returnupgradeInstanceAsync(request);
1432+
}
1433+
1434+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1435+
/**
1436+
* Upgrades Redis instance to the newer Redis version specified in the request.
1437+
*
1438+
* <p>Sample code:
1439+
*
1440+
* <pre><code>
1441+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
1442+
* InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
1443+
* String redisVersion = "";
1444+
* UpgradeInstanceRequest request = UpgradeInstanceRequest.newBuilder()
1445+
* .setName(name.toString())
1446+
* .setRedisVersion(redisVersion)
1447+
* .build();
1448+
* Instance response = cloudRedisClient.upgradeInstanceAsync(request).get();
1449+
* }
1450+
* </code></pre>
1451+
*
1452+
* @param request The request object containing all of the parameters for the API call.
1453+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1454+
*/
1455+
@BetaApi(
1456+
"The surface for long-running operations is not stable yet and may change in the future.")
1457+
publicfinalOperationFuture<Instance,Any>upgradeInstanceAsync(UpgradeInstanceRequestrequest) {
1458+
returnupgradeInstanceOperationCallable().futureCall(request);
1459+
}
1460+
1461+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1462+
/**
1463+
* Upgrades Redis instance to the newer Redis version specified in the request.
1464+
*
1465+
* <p>Sample code:
1466+
*
1467+
* <pre><code>
1468+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
1469+
* InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
1470+
* String redisVersion = "";
1471+
* UpgradeInstanceRequest request = UpgradeInstanceRequest.newBuilder()
1472+
* .setName(name.toString())
1473+
* .setRedisVersion(redisVersion)
1474+
* .build();
1475+
* OperationFuture&lt;Instance, Any&gt; future = cloudRedisClient.upgradeInstanceOperationCallable().futureCall(request);
1476+
* // Do something
1477+
* Instance response = future.get();
1478+
* }
1479+
* </code></pre>
1480+
*/
1481+
@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
1482+
publicfinalOperationCallable<UpgradeInstanceRequest,Instance,Any>
1483+
upgradeInstanceOperationCallable() {
1484+
returnstub.upgradeInstanceOperationCallable();
1485+
}
1486+
1487+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1488+
/**
1489+
* Upgrades Redis instance to the newer Redis version specified in the request.
1490+
*
1491+
* <p>Sample code:
1492+
*
1493+
* <pre><code>
1494+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
1495+
* InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
1496+
* String redisVersion = "";
1497+
* UpgradeInstanceRequest request = UpgradeInstanceRequest.newBuilder()
1498+
* .setName(name.toString())
1499+
* .setRedisVersion(redisVersion)
1500+
* .build();
1501+
* ApiFuture&lt;Operation&gt; future = cloudRedisClient.upgradeInstanceCallable().futureCall(request);
1502+
* // Do something
1503+
* Operation response = future.get();
1504+
* }
1505+
* </code></pre>
1506+
*/
1507+
publicfinalUnaryCallable<UpgradeInstanceRequest,Operation>upgradeInstanceCallable() {
1508+
returnstub.upgradeInstanceCallable();
1509+
}
1510+
13681511
@Override
13691512
publicfinalvoidclose() {
13701513
stub.close();

‎google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisSettings.java‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,19 @@ public UnaryCallSettings<DeleteInstanceRequest, Operation> deleteInstanceSetting
156156
return ((CloudRedisStubSettings)getStubSettings()).deleteInstanceOperationSettings();
157157
}
158158

159+
/** Returns the object with the settings used for calls to upgradeInstance. */
160+
publicUnaryCallSettings<UpgradeInstanceRequest,Operation>upgradeInstanceSettings() {
161+
return ((CloudRedisStubSettings)getStubSettings()).upgradeInstanceSettings();
162+
}
163+
164+
/** Returns the object with the settings used for calls to upgradeInstance. */
165+
@BetaApi(
166+
"The surface for long-running operations is not stable yet and may change in the future.")
167+
publicOperationCallSettings<UpgradeInstanceRequest,Instance,Any>
168+
upgradeInstanceOperationSettings() {
169+
return ((CloudRedisStubSettings)getStubSettings()).upgradeInstanceOperationSettings();
170+
}
171+
159172
publicstaticfinalCloudRedisSettingscreate(CloudRedisStubSettingsstub)throwsIOException {
160173
returnnewCloudRedisSettings.Builder(stub.toBuilder()).build();
161174
}
@@ -343,6 +356,19 @@ public UnaryCallSettings.Builder<DeleteInstanceRequest, Operation> deleteInstanc
343356
returngetStubSettingsBuilder().deleteInstanceOperationSettings();
344357
}
345358

359+
/** Returns the builder for the settings used for calls to upgradeInstance. */
360+
publicUnaryCallSettings.Builder<UpgradeInstanceRequest,Operation>upgradeInstanceSettings() {
361+
returngetStubSettingsBuilder().upgradeInstanceSettings();
362+
}
363+
364+
/** Returns the builder for the settings used for calls to upgradeInstance. */
365+
@BetaApi(
366+
"The surface for long-running operations is not stable yet and may change in the future.")
367+
publicOperationCallSettings.Builder<UpgradeInstanceRequest,Instance,Any>
368+
upgradeInstanceOperationSettings() {
369+
returngetStubSettingsBuilder().upgradeInstanceOperationSettings();
370+
}
371+
346372
@Override
347373
publicCloudRedisSettingsbuild()throwsIOException {
348374
returnnewCloudRedisSettings(this);

‎google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStub.java‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
importcom.google.cloud.redis.v1beta1.ListInstancesRequest;
3232
importcom.google.cloud.redis.v1beta1.ListInstancesResponse;
3333
importcom.google.cloud.redis.v1beta1.UpdateInstanceRequest;
34+
importcom.google.cloud.redis.v1beta1.UpgradeInstanceRequest;
3435
importcom.google.longrunning.Operation;
3536
importcom.google.longrunning.stub.OperationsStub;
3637
importcom.google.protobuf.Any;
@@ -120,6 +121,16 @@ public UnaryCallable<DeleteInstanceRequest, Operation> deleteInstanceCallable()
120121
thrownewUnsupportedOperationException("Not implemented: deleteInstanceCallable()");
121122
}
122123

124+
@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
125+
publicOperationCallable<UpgradeInstanceRequest,Instance,Any>
126+
upgradeInstanceOperationCallable() {
127+
thrownewUnsupportedOperationException("Not implemented: upgradeInstanceOperationCallable()");
128+
}
129+
130+
publicUnaryCallable<UpgradeInstanceRequest,Operation>upgradeInstanceCallable() {
131+
thrownewUnsupportedOperationException("Not implemented: upgradeInstanceCallable()");
132+
}
133+
123134
@Override
124135
publicabstractvoidclose();
125136
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp