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

Commit6ac4ac8

Browse files
fix: [Cloud Memorystore for Redis] Add missing fields for TLS and Maintenance Window features (#583)
* fix: [Cloud Memorystore for Redis] Add missing fields for TLS and Maintenance Window featuresPiperOrigin-RevId: 421360191Source-Link:googleapis/googleapis@3e958c3Source-Link:https://github.com/googleapis/googleapis-gen/commit/f6580f02343d8adb49c170f8e9160113bfbbd2b3Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjY1ODBmMDIzNDNkOGFkYjQ5YzE3MGY4ZTkxNjAxMTNiZmJiZDJiMyJ9* 🦉 Updates from OwlBotSeehttps://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.mdCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parentf1efdd1 commit6ac4ac8

File tree

35 files changed

+13433
-637
lines changed

35 files changed

+13433
-637
lines changed

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

Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
importcom.google.protobuf.Any;
3636
importcom.google.protobuf.Empty;
3737
importcom.google.protobuf.FieldMask;
38+
importcom.google.protobuf.Timestamp;
3839
importjava.io.IOException;
3940
importjava.util.List;
4041
importjava.util.concurrent.TimeUnit;
@@ -463,6 +464,107 @@ public final UnaryCallable<GetInstanceRequest, Instance> getInstanceCallable() {
463464
returnstub.getInstanceCallable();
464465
}
465466

467+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
468+
/**
469+
* Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response
470+
* will be empty. This information is not included in the details returned to GetInstance.
471+
*
472+
* <p>Sample code:
473+
*
474+
* <pre>{@code
475+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
476+
* InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
477+
* InstanceAuthString response = cloudRedisClient.getInstanceAuthString(name);
478+
* }
479+
* }</pre>
480+
*
481+
* @param name Required. Redis instance resource name using the form:
482+
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id`
483+
* refers to a GCP region.
484+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
485+
*/
486+
publicfinalInstanceAuthStringgetInstanceAuthString(InstanceNamename) {
487+
GetInstanceAuthStringRequestrequest =
488+
GetInstanceAuthStringRequest.newBuilder()
489+
.setName(name ==null ?null :name.toString())
490+
.build();
491+
returngetInstanceAuthString(request);
492+
}
493+
494+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
495+
/**
496+
* Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response
497+
* will be empty. This information is not included in the details returned to GetInstance.
498+
*
499+
* <p>Sample code:
500+
*
501+
* <pre>{@code
502+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
503+
* String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
504+
* InstanceAuthString response = cloudRedisClient.getInstanceAuthString(name);
505+
* }
506+
* }</pre>
507+
*
508+
* @param name Required. Redis instance resource name using the form:
509+
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id`
510+
* refers to a GCP region.
511+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
512+
*/
513+
publicfinalInstanceAuthStringgetInstanceAuthString(Stringname) {
514+
GetInstanceAuthStringRequestrequest =
515+
GetInstanceAuthStringRequest.newBuilder().setName(name).build();
516+
returngetInstanceAuthString(request);
517+
}
518+
519+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
520+
/**
521+
* Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response
522+
* will be empty. This information is not included in the details returned to GetInstance.
523+
*
524+
* <p>Sample code:
525+
*
526+
* <pre>{@code
527+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
528+
* GetInstanceAuthStringRequest request =
529+
* GetInstanceAuthStringRequest.newBuilder()
530+
* .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
531+
* .build();
532+
* InstanceAuthString response = cloudRedisClient.getInstanceAuthString(request);
533+
* }
534+
* }</pre>
535+
*
536+
* @param request The request object containing all of the parameters for the API call.
537+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
538+
*/
539+
publicfinalInstanceAuthStringgetInstanceAuthString(GetInstanceAuthStringRequestrequest) {
540+
returngetInstanceAuthStringCallable().call(request);
541+
}
542+
543+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
544+
/**
545+
* Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response
546+
* will be empty. This information is not included in the details returned to GetInstance.
547+
*
548+
* <p>Sample code:
549+
*
550+
* <pre>{@code
551+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
552+
* GetInstanceAuthStringRequest request =
553+
* GetInstanceAuthStringRequest.newBuilder()
554+
* .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
555+
* .build();
556+
* ApiFuture<InstanceAuthString> future =
557+
* cloudRedisClient.getInstanceAuthStringCallable().futureCall(request);
558+
* // Do something.
559+
* InstanceAuthString response = future.get();
560+
* }
561+
* }</pre>
562+
*/
563+
publicfinalUnaryCallable<GetInstanceAuthStringRequest,InstanceAuthString>
564+
getInstanceAuthStringCallable() {
565+
returnstub.getInstanceAuthStringCallable();
566+
}
567+
466568
// AUTO-GENERATED DOCUMENTATION AND METHOD.
467569
/**
468570
* Creates a Redis instance based on the specified tier and memory size.
@@ -1418,6 +1520,159 @@ public final UnaryCallable<DeleteInstanceRequest, Operation> deleteInstanceCalla
14181520
returnstub.deleteInstanceCallable();
14191521
}
14201522

1523+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1524+
/**
1525+
* Reschedule maintenance for a given instance in a given project and location.
1526+
*
1527+
* <p>Sample code:
1528+
*
1529+
* <pre>{@code
1530+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
1531+
* InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
1532+
* RescheduleMaintenanceRequest.RescheduleType rescheduleType =
1533+
* RescheduleMaintenanceRequest.RescheduleType.forNumber(0);
1534+
* Timestamp scheduleTime = Timestamp.newBuilder().build();
1535+
* Instance response =
1536+
* cloudRedisClient.rescheduleMaintenanceAsync(name, rescheduleType, scheduleTime).get();
1537+
* }
1538+
* }</pre>
1539+
*
1540+
* @param name Required. Redis instance resource name using the form:
1541+
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id`
1542+
* refers to a GCP region.
1543+
* @param rescheduleType Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time
1544+
* as well.
1545+
* @param scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if
1546+
* reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`.
1547+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1548+
*/
1549+
publicfinalOperationFuture<Instance,Any>rescheduleMaintenanceAsync(
1550+
InstanceNamename,
1551+
RescheduleMaintenanceRequest.RescheduleTyperescheduleType,
1552+
TimestampscheduleTime) {
1553+
RescheduleMaintenanceRequestrequest =
1554+
RescheduleMaintenanceRequest.newBuilder()
1555+
.setName(name ==null ?null :name.toString())
1556+
.setRescheduleType(rescheduleType)
1557+
.setScheduleTime(scheduleTime)
1558+
.build();
1559+
returnrescheduleMaintenanceAsync(request);
1560+
}
1561+
1562+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1563+
/**
1564+
* Reschedule maintenance for a given instance in a given project and location.
1565+
*
1566+
* <p>Sample code:
1567+
*
1568+
* <pre>{@code
1569+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
1570+
* String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
1571+
* RescheduleMaintenanceRequest.RescheduleType rescheduleType =
1572+
* RescheduleMaintenanceRequest.RescheduleType.forNumber(0);
1573+
* Timestamp scheduleTime = Timestamp.newBuilder().build();
1574+
* Instance response =
1575+
* cloudRedisClient.rescheduleMaintenanceAsync(name, rescheduleType, scheduleTime).get();
1576+
* }
1577+
* }</pre>
1578+
*
1579+
* @param name Required. Redis instance resource name using the form:
1580+
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id`
1581+
* refers to a GCP region.
1582+
* @param rescheduleType Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time
1583+
* as well.
1584+
* @param scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if
1585+
* reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`.
1586+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1587+
*/
1588+
publicfinalOperationFuture<Instance,Any>rescheduleMaintenanceAsync(
1589+
Stringname,
1590+
RescheduleMaintenanceRequest.RescheduleTyperescheduleType,
1591+
TimestampscheduleTime) {
1592+
RescheduleMaintenanceRequestrequest =
1593+
RescheduleMaintenanceRequest.newBuilder()
1594+
.setName(name)
1595+
.setRescheduleType(rescheduleType)
1596+
.setScheduleTime(scheduleTime)
1597+
.build();
1598+
returnrescheduleMaintenanceAsync(request);
1599+
}
1600+
1601+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1602+
/**
1603+
* Reschedule maintenance for a given instance in a given project and location.
1604+
*
1605+
* <p>Sample code:
1606+
*
1607+
* <pre>{@code
1608+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
1609+
* RescheduleMaintenanceRequest request =
1610+
* RescheduleMaintenanceRequest.newBuilder()
1611+
* .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
1612+
* .setScheduleTime(Timestamp.newBuilder().build())
1613+
* .build();
1614+
* Instance response = cloudRedisClient.rescheduleMaintenanceAsync(request).get();
1615+
* }
1616+
* }</pre>
1617+
*
1618+
* @param request The request object containing all of the parameters for the API call.
1619+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1620+
*/
1621+
publicfinalOperationFuture<Instance,Any>rescheduleMaintenanceAsync(
1622+
RescheduleMaintenanceRequestrequest) {
1623+
returnrescheduleMaintenanceOperationCallable().futureCall(request);
1624+
}
1625+
1626+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1627+
/**
1628+
* Reschedule maintenance for a given instance in a given project and location.
1629+
*
1630+
* <p>Sample code:
1631+
*
1632+
* <pre>{@code
1633+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
1634+
* RescheduleMaintenanceRequest request =
1635+
* RescheduleMaintenanceRequest.newBuilder()
1636+
* .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
1637+
* .setScheduleTime(Timestamp.newBuilder().build())
1638+
* .build();
1639+
* OperationFuture<Instance, Any> future =
1640+
* cloudRedisClient.rescheduleMaintenanceOperationCallable().futureCall(request);
1641+
* // Do something.
1642+
* Instance response = future.get();
1643+
* }
1644+
* }</pre>
1645+
*/
1646+
publicfinalOperationCallable<RescheduleMaintenanceRequest,Instance,Any>
1647+
rescheduleMaintenanceOperationCallable() {
1648+
returnstub.rescheduleMaintenanceOperationCallable();
1649+
}
1650+
1651+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1652+
/**
1653+
* Reschedule maintenance for a given instance in a given project and location.
1654+
*
1655+
* <p>Sample code:
1656+
*
1657+
* <pre>{@code
1658+
* try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
1659+
* RescheduleMaintenanceRequest request =
1660+
* RescheduleMaintenanceRequest.newBuilder()
1661+
* .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
1662+
* .setScheduleTime(Timestamp.newBuilder().build())
1663+
* .build();
1664+
* ApiFuture<Operation> future =
1665+
* cloudRedisClient.rescheduleMaintenanceCallable().futureCall(request);
1666+
* // Do something.
1667+
* Operation response = future.get();
1668+
* }
1669+
* }</pre>
1670+
*/
1671+
publicfinalUnaryCallable<RescheduleMaintenanceRequest,Operation>
1672+
rescheduleMaintenanceCallable() {
1673+
returnstub.rescheduleMaintenanceCallable();
1674+
}
1675+
14211676
@Override
14221677
publicfinalvoidclose() {
14231678
stub.close();

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ public UnaryCallSettings<GetInstanceRequest, Instance> getInstanceSettings() {
8484
return ((CloudRedisStubSettings)getStubSettings()).getInstanceSettings();
8585
}
8686

87+
/** Returns the object with the settings used for calls to getInstanceAuthString. */
88+
publicUnaryCallSettings<GetInstanceAuthStringRequest,InstanceAuthString>
89+
getInstanceAuthStringSettings() {
90+
return ((CloudRedisStubSettings)getStubSettings()).getInstanceAuthStringSettings();
91+
}
92+
8793
/** Returns the object with the settings used for calls to createInstance. */
8894
publicUnaryCallSettings<CreateInstanceRequest,Operation>createInstanceSettings() {
8995
return ((CloudRedisStubSettings)getStubSettings()).createInstanceSettings();
@@ -161,6 +167,18 @@ public UnaryCallSettings<DeleteInstanceRequest, Operation> deleteInstanceSetting
161167
return ((CloudRedisStubSettings)getStubSettings()).deleteInstanceOperationSettings();
162168
}
163169

170+
/** Returns the object with the settings used for calls to rescheduleMaintenance. */
171+
publicUnaryCallSettings<RescheduleMaintenanceRequest,Operation>
172+
rescheduleMaintenanceSettings() {
173+
return ((CloudRedisStubSettings)getStubSettings()).rescheduleMaintenanceSettings();
174+
}
175+
176+
/** Returns the object with the settings used for calls to rescheduleMaintenance. */
177+
publicOperationCallSettings<RescheduleMaintenanceRequest,Instance,Any>
178+
rescheduleMaintenanceOperationSettings() {
179+
return ((CloudRedisStubSettings)getStubSettings()).rescheduleMaintenanceOperationSettings();
180+
}
181+
164182
publicstaticfinalCloudRedisSettingscreate(CloudRedisStubSettingsstub)throwsIOException {
165183
returnnewCloudRedisSettings.Builder(stub.toBuilder()).build();
166184
}
@@ -269,6 +287,12 @@ public UnaryCallSettings.Builder<GetInstanceRequest, Instance> getInstanceSettin
269287
returngetStubSettingsBuilder().getInstanceSettings();
270288
}
271289

290+
/** Returns the builder for the settings used for calls to getInstanceAuthString. */
291+
publicUnaryCallSettings.Builder<GetInstanceAuthStringRequest,InstanceAuthString>
292+
getInstanceAuthStringSettings() {
293+
returngetStubSettingsBuilder().getInstanceAuthStringSettings();
294+
}
295+
272296
/** Returns the builder for the settings used for calls to createInstance. */
273297
publicUnaryCallSettings.Builder<CreateInstanceRequest,Operation>createInstanceSettings() {
274298
returngetStubSettingsBuilder().createInstanceSettings();
@@ -347,6 +371,18 @@ public UnaryCallSettings.Builder<DeleteInstanceRequest, Operation> deleteInstanc
347371
returngetStubSettingsBuilder().deleteInstanceOperationSettings();
348372
}
349373

374+
/** Returns the builder for the settings used for calls to rescheduleMaintenance. */
375+
publicUnaryCallSettings.Builder<RescheduleMaintenanceRequest,Operation>
376+
rescheduleMaintenanceSettings() {
377+
returngetStubSettingsBuilder().rescheduleMaintenanceSettings();
378+
}
379+
380+
/** Returns the builder for the settings used for calls to rescheduleMaintenance. */
381+
publicOperationCallSettings.Builder<RescheduleMaintenanceRequest,Instance,Any>
382+
rescheduleMaintenanceOperationSettings() {
383+
returngetStubSettingsBuilder().rescheduleMaintenanceOperationSettings();
384+
}
385+
350386
@Override
351387
publicCloudRedisSettingsbuild()throwsIOException {
352388
returnnewCloudRedisSettings(this);

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,18 @@
2525
"GetInstance": {
2626
"methods": ["getInstance","getInstance","getInstance","getInstanceCallable"]
2727
},
28+
"GetInstanceAuthString": {
29+
"methods": ["getInstanceAuthString","getInstanceAuthString","getInstanceAuthString","getInstanceAuthStringCallable"]
30+
},
2831
"ImportInstance": {
2932
"methods": ["importInstanceAsync","importInstanceAsync","importInstanceOperationCallable","importInstanceCallable"]
3033
},
3134
"ListInstances": {
3235
"methods": ["listInstances","listInstances","listInstances","listInstancesPagedCallable","listInstancesCallable"]
3336
},
37+
"RescheduleMaintenance": {
38+
"methods": ["rescheduleMaintenanceAsync","rescheduleMaintenanceAsync","rescheduleMaintenanceAsync","rescheduleMaintenanceOperationCallable","rescheduleMaintenanceCallable"]
39+
},
3440
"UpdateInstance": {
3541
"methods": ["updateInstanceAsync","updateInstanceAsync","updateInstanceOperationCallable","updateInstanceCallable"]
3642
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp