From d8f9c5bd276f39c165a70b55181f990ec0b50a85 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 5 Feb 2020 09:36:55 -0800 Subject: [PATCH] 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 changes Co-authored-by: Jeff Ching --- google-cloud-redis-bom/pom.xml | 2 +- .../cloud/redis/v1/CloudRedisClient.java | 27 +- .../cloud/redis/v1beta1/CloudRedisClient.java | 163 +++- .../redis/v1beta1/CloudRedisSettings.java | 26 + .../redis/v1beta1/stub/CloudRedisStub.java | 11 + .../v1beta1/stub/CloudRedisStubSettings.java | 74 +- .../v1beta1/stub/GrpcCloudRedisStub.java | 45 + .../redis/v1beta1/CloudRedisClientTest.java | 77 ++ .../redis/v1beta1/MockCloudRedisImpl.java | 15 + .../cloud/redis/v1beta1/CloudRedisGrpc.java | 133 ++- .../clirr-ignored-differences.xml | 19 + .../redis/v1/CloudRedisServiceV1Proto.java | 224 ++--- .../redis/v1/FailoverInstanceRequest.java | 10 +- .../com/google/cloud/redis/v1/Instance.java | 463 ++++++++-- .../cloud/redis/v1/InstanceOrBuilder.java | 71 +- .../cloud/redis/v1/ListInstancesRequest.java | 36 +- .../v1/ListInstancesRequestOrBuilder.java | 10 +- .../cloud/redis/v1/ListInstancesResponse.java | 184 ++-- .../v1/ListInstancesResponseOrBuilder.java | 40 +- .../cloud/redis/v1/UpdateInstanceRequest.java | 24 +- .../v1/UpdateInstanceRequestOrBuilder.java | 6 +- .../google/cloud/redis/v1/cloud_redis.proto | 55 +- .../clirr-ignored-differences.xml | 19 + .../v1beta1/CloudRedisServiceBetaProto.java | 259 +++--- .../v1beta1/FailoverInstanceRequest.java | 10 +- .../google/cloud/redis/v1beta1/Instance.java | 469 ++++++++-- .../redis/v1beta1/InstanceOrBuilder.java | 71 +- .../redis/v1beta1/ListInstancesRequest.java | 36 +- .../ListInstancesRequestOrBuilder.java | 10 +- .../redis/v1beta1/ListInstancesResponse.java | 184 ++-- .../ListInstancesResponseOrBuilder.java | 40 +- .../redis/v1beta1/UpgradeInstanceRequest.java | 840 ++++++++++++++++++ .../UpgradeInstanceRequestOrBuilder.java | 83 ++ .../cloud/redis/v1beta1/cloud_redis.proto | 83 +- synth.metadata | 8 +- 35 files changed, 3068 insertions(+), 759 deletions(-) create mode 100644 proto-google-cloud-redis-v1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-redis-v1beta1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/UpgradeInstanceRequest.java create mode 100644 proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/UpgradeInstanceRequestOrBuilder.java diff --git a/google-cloud-redis-bom/pom.xml b/google-cloud-redis-bom/pom.xml index 135f3496..4ace8d71 100644 --- a/google-cloud-redis-bom/pom.xml +++ b/google-cloud-redis-bom/pom.xml @@ -11,7 +11,7 @@ 0.4.0 - Google Cloud redis BOM + Google Cloud Redis BOM https://github.com/googleapis/java-redis BOM for Google Cloud Redis diff --git a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java index ecf550a3..c69be1f2 100644 --- a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java +++ b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java @@ -187,8 +187,9 @@ public final OperationsClient getOperationsClient() { * Lists all Redis instances owned by a project in either the specified location (region) or all * locations. * - *

The location should have the following format: * - * `projects/{project_id}/locations/{location_id}` + *

The location should have the following format: + * + *

* `projects/{project_id}/locations/{location_id}` * *

If `location_id` is specified as `-` (wildcard), then all regions available to the project * are queried, and the results are aggregated. @@ -221,8 +222,9 @@ public final ListInstancesPagedResponse listInstances(LocationName parent) { * Lists all Redis instances owned by a project in either the specified location (region) or all * locations. * - *

The location should have the following format: * - * `projects/{project_id}/locations/{location_id}` + *

The location should have the following format: + * + *

* `projects/{project_id}/locations/{location_id}` * *

If `location_id` is specified as `-` (wildcard), then all regions available to the project * are queried, and the results are aggregated. @@ -252,8 +254,9 @@ public final ListInstancesPagedResponse listInstances(String parent) { * Lists all Redis instances owned by a project in either the specified location (region) or all * locations. * - *

The location should have the following format: * - * `projects/{project_id}/locations/{location_id}` + *

The location should have the following format: + * + *

* `projects/{project_id}/locations/{location_id}` * *

If `location_id` is specified as `-` (wildcard), then all regions available to the project * are queried, and the results are aggregated. @@ -284,8 +287,9 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque * Lists all Redis instances owned by a project in either the specified location (region) or all * locations. * - *

The location should have the following format: * - * `projects/{project_id}/locations/{location_id}` + *

The location should have the following format: + * + *

* `projects/{project_id}/locations/{location_id}` * *

If `location_id` is specified as `-` (wildcard), then all regions available to the project * are queried, and the results are aggregated. @@ -316,8 +320,9 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque * Lists all Redis instances owned by a project in either the specified location (region) or all * locations. * - *

The location should have the following format: * - * `projects/{project_id}/locations/{location_id}` + *

The location should have the following format: + * + *

* `projects/{project_id}/locations/{location_id}` * *

If `location_id` is specified as `-` (wildcard), then all regions available to the project * are queried, and the results are aggregated. @@ -709,7 +714,7 @@ public final UnaryCallable createInstanceCalla * * @param updateMask Required. Mask of fields to update. At least one path must be supplied in * this field. The elements of the repeated paths field may only include these fields from - * [Instance][CloudRedis.Instance]: + * [Instance][google.cloud.redis.v1.Instance]: *

* `displayName` * `labels` * `memorySizeGb` * `redisConfig` * @param instance Required. Update description. Only fields specified in update_mask are updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails diff --git a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java index 87c12d39..9f2d3c4e 100644 --- a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java +++ b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java @@ -188,8 +188,9 @@ public final OperationsClient getOperationsClient() { * Lists all Redis instances owned by a project in either the specified location (region) or all * locations. * - *

The location should have the following format: * - * `projects/{project_id}/locations/{location_id}` + *

The location should have the following format: + * + *

* `projects/{project_id}/locations/{location_id}` * *

If `location_id` is specified as `-` (wildcard), then all regions available to the project * are queried, and the results are aggregated. @@ -222,8 +223,9 @@ public final ListInstancesPagedResponse listInstances(LocationName parent) { * Lists all Redis instances owned by a project in either the specified location (region) or all * locations. * - *

The location should have the following format: * - * `projects/{project_id}/locations/{location_id}` + *

The location should have the following format: + * + *

* `projects/{project_id}/locations/{location_id}` * *

If `location_id` is specified as `-` (wildcard), then all regions available to the project * are queried, and the results are aggregated. @@ -253,8 +255,9 @@ public final ListInstancesPagedResponse listInstances(String parent) { * Lists all Redis instances owned by a project in either the specified location (region) or all * locations. * - *

The location should have the following format: * - * `projects/{project_id}/locations/{location_id}` + *

The location should have the following format: + * + *

* `projects/{project_id}/locations/{location_id}` * *

If `location_id` is specified as `-` (wildcard), then all regions available to the project * are queried, and the results are aggregated. @@ -285,8 +288,9 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque * Lists all Redis instances owned by a project in either the specified location (region) or all * locations. * - *

The location should have the following format: * - * `projects/{project_id}/locations/{location_id}` + *

The location should have the following format: + * + *

* `projects/{project_id}/locations/{location_id}` * *

If `location_id` is specified as `-` (wildcard), then all regions available to the project * are queried, and the results are aggregated. @@ -317,8 +321,9 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque * Lists all Redis instances owned by a project in either the specified location (region) or all * locations. * - *

The location should have the following format: * - * `projects/{project_id}/locations/{location_id}` + *

The location should have the following format: + * + *

* `projects/{project_id}/locations/{location_id}` * *

If `location_id` is specified as `-` (wildcard), then all regions available to the project * are queried, and the results are aggregated. @@ -1365,6 +1370,144 @@ public final UnaryCallable deleteInstanceCalla return stub.deleteInstanceCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Upgrades Redis instance to the newer Redis version specified in the request. + * + *

Sample code: + * + *


+   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   String redisVersion = "";
+   *   Instance response = cloudRedisClient.upgradeInstanceAsync(name, redisVersion).get();
+   * }
+   * 
+ * + * @param name Required. Redis instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` + * refers to a GCP region. + * @param redisVersion Required. Specifies the target version of Redis software to upgrade to. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture upgradeInstanceAsync( + InstanceName name, String redisVersion) { + UpgradeInstanceRequest request = + UpgradeInstanceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setRedisVersion(redisVersion) + .build(); + return upgradeInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Upgrades Redis instance to the newer Redis version specified in the request. + * + *

Sample code: + * + *


+   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   String redisVersion = "";
+   *   Instance response = cloudRedisClient.upgradeInstanceAsync(name.toString(), redisVersion).get();
+   * }
+   * 
+ * + * @param name Required. Redis instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` + * refers to a GCP region. + * @param redisVersion Required. Specifies the target version of Redis software to upgrade to. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture upgradeInstanceAsync( + String name, String redisVersion) { + UpgradeInstanceRequest request = + UpgradeInstanceRequest.newBuilder().setName(name).setRedisVersion(redisVersion).build(); + return upgradeInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Upgrades Redis instance to the newer Redis version specified in the request. + * + *

Sample code: + * + *


+   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   String redisVersion = "";
+   *   UpgradeInstanceRequest request = UpgradeInstanceRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setRedisVersion(redisVersion)
+   *     .build();
+   *   Instance response = cloudRedisClient.upgradeInstanceAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture upgradeInstanceAsync(UpgradeInstanceRequest request) { + return upgradeInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Upgrades Redis instance to the newer Redis version specified in the request. + * + *

Sample code: + * + *


+   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   String redisVersion = "";
+   *   UpgradeInstanceRequest request = UpgradeInstanceRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setRedisVersion(redisVersion)
+   *     .build();
+   *   OperationFuture<Instance, Any> future = cloudRedisClient.upgradeInstanceOperationCallable().futureCall(request);
+   *   // Do something
+   *   Instance response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + upgradeInstanceOperationCallable() { + return stub.upgradeInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Upgrades Redis instance to the newer Redis version specified in the request. + * + *

Sample code: + * + *


+   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   String redisVersion = "";
+   *   UpgradeInstanceRequest request = UpgradeInstanceRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setRedisVersion(redisVersion)
+   *     .build();
+   *   ApiFuture<Operation> future = cloudRedisClient.upgradeInstanceCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable upgradeInstanceCallable() { + return stub.upgradeInstanceCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisSettings.java b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisSettings.java index 70a1d54d..2a73ce25 100644 --- a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisSettings.java +++ b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisSettings.java @@ -156,6 +156,19 @@ public UnaryCallSettings deleteInstanceSetting return ((CloudRedisStubSettings) getStubSettings()).deleteInstanceOperationSettings(); } + /** Returns the object with the settings used for calls to upgradeInstance. */ + public UnaryCallSettings upgradeInstanceSettings() { + return ((CloudRedisStubSettings) getStubSettings()).upgradeInstanceSettings(); + } + + /** Returns the object with the settings used for calls to upgradeInstance. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + upgradeInstanceOperationSettings() { + return ((CloudRedisStubSettings) getStubSettings()).upgradeInstanceOperationSettings(); + } + public static final CloudRedisSettings create(CloudRedisStubSettings stub) throws IOException { return new CloudRedisSettings.Builder(stub.toBuilder()).build(); } @@ -343,6 +356,19 @@ public UnaryCallSettings.Builder deleteInstanc return getStubSettingsBuilder().deleteInstanceOperationSettings(); } + /** Returns the builder for the settings used for calls to upgradeInstance. */ + public UnaryCallSettings.Builder upgradeInstanceSettings() { + return getStubSettingsBuilder().upgradeInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to upgradeInstance. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + upgradeInstanceOperationSettings() { + return getStubSettingsBuilder().upgradeInstanceOperationSettings(); + } + @Override public CloudRedisSettings build() throws IOException { return new CloudRedisSettings(this); diff --git a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStub.java b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStub.java index fc6411a9..19a35a7f 100644 --- a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStub.java +++ b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStub.java @@ -31,6 +31,7 @@ import com.google.cloud.redis.v1beta1.ListInstancesRequest; import com.google.cloud.redis.v1beta1.ListInstancesResponse; import com.google.cloud.redis.v1beta1.UpdateInstanceRequest; +import com.google.cloud.redis.v1beta1.UpgradeInstanceRequest; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Any; @@ -120,6 +121,16 @@ public UnaryCallable deleteInstanceCallable() throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()"); } + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + upgradeInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: upgradeInstanceOperationCallable()"); + } + + public UnaryCallable upgradeInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: upgradeInstanceCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java index 8b36d2c3..c937b88f 100644 --- a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java +++ b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java @@ -53,6 +53,7 @@ import com.google.cloud.redis.v1beta1.ListInstancesRequest; import com.google.cloud.redis.v1beta1.ListInstancesResponse; import com.google.cloud.redis.v1beta1.UpdateInstanceRequest; +import com.google.cloud.redis.v1beta1.UpgradeInstanceRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -121,6 +122,9 @@ public class CloudRedisStubSettings extends StubSettings private final UnaryCallSettings deleteInstanceSettings; private final OperationCallSettings deleteInstanceOperationSettings; + private final UnaryCallSettings upgradeInstanceSettings; + private final OperationCallSettings + upgradeInstanceOperationSettings; /** Returns the object with the settings used for calls to listInstances. */ public PagedCallSettings @@ -205,6 +209,18 @@ public UnaryCallSettings deleteInstanceSetting return deleteInstanceOperationSettings; } + /** Returns the object with the settings used for calls to upgradeInstance. */ + public UnaryCallSettings upgradeInstanceSettings() { + return upgradeInstanceSettings; + } + + /** Returns the object with the settings used for calls to upgradeInstance. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + upgradeInstanceOperationSettings() { + return upgradeInstanceOperationSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public CloudRedisStub createStub() throws IOException { if (getTransportChannelProvider() @@ -288,6 +304,8 @@ protected CloudRedisStubSettings(Builder settingsBuilder) throws IOException { failoverInstanceOperationSettings = settingsBuilder.failoverInstanceOperationSettings().build(); deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); + upgradeInstanceSettings = settingsBuilder.upgradeInstanceSettings().build(); + upgradeInstanceOperationSettings = settingsBuilder.upgradeInstanceOperationSettings().build(); } private static final PagedListDescriptor @@ -375,6 +393,10 @@ public static class Builder extends StubSettings.Builder deleteInstanceOperationSettings; + private final UnaryCallSettings.Builder + upgradeInstanceSettings; + private final OperationCallSettings.Builder + upgradeInstanceOperationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -445,6 +467,10 @@ protected Builder(ClientContext clientContext) { deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); + upgradeInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + upgradeInstanceOperationSettings = OperationCallSettings.newBuilder(); + unaryMethodSettingsBuilders = ImmutableList.>of( listInstancesSettings, @@ -454,7 +480,8 @@ protected Builder(ClientContext clientContext) { importInstanceSettings, exportInstanceSettings, failoverInstanceSettings, - deleteInstanceSettings); + deleteInstanceSettings, + upgradeInstanceSettings); initDefaults(this); } @@ -509,6 +536,11 @@ private static Builder initDefaults(Builder builder) { .deleteInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .upgradeInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); builder .createInstanceOperationSettings() .setInitialCallSettings( @@ -641,6 +673,28 @@ private static Builder initDefaults(Builder builder) { .setMaxRpcTimeout(Duration.ZERO) // ignored .setTotalTimeout(Duration.ofMillis(1200000L)) .build())); + builder + .upgradeInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer(ProtoOperationTransformers.MetadataTransformer.create(Any.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); return builder; } @@ -662,6 +716,8 @@ protected Builder(CloudRedisStubSettings settings) { failoverInstanceOperationSettings = settings.failoverInstanceOperationSettings.toBuilder(); deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); + upgradeInstanceSettings = settings.upgradeInstanceSettings.toBuilder(); + upgradeInstanceOperationSettings = settings.upgradeInstanceOperationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -672,7 +728,8 @@ protected Builder(CloudRedisStubSettings settings) { importInstanceSettings, exportInstanceSettings, failoverInstanceSettings, - deleteInstanceSettings); + deleteInstanceSettings, + upgradeInstanceSettings); } // NEXT_MAJOR_VER: remove 'throws Exception' @@ -782,6 +839,19 @@ public UnaryCallSettings.Builder deleteInstanc return deleteInstanceOperationSettings; } + /** Returns the builder for the settings used for calls to upgradeInstance. */ + public UnaryCallSettings.Builder upgradeInstanceSettings() { + return upgradeInstanceSettings; + } + + /** Returns the builder for the settings used for calls to upgradeInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + upgradeInstanceOperationSettings() { + return upgradeInstanceOperationSettings; + } + @Override public CloudRedisStubSettings build() throws IOException { return new CloudRedisStubSettings(this); diff --git a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/GrpcCloudRedisStub.java b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/GrpcCloudRedisStub.java index 226cfa07..02a7f651 100644 --- a/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/GrpcCloudRedisStub.java +++ b/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/GrpcCloudRedisStub.java @@ -36,6 +36,7 @@ import com.google.cloud.redis.v1beta1.ListInstancesRequest; import com.google.cloud.redis.v1beta1.ListInstancesResponse; import com.google.cloud.redis.v1beta1.UpdateInstanceRequest; +import com.google.cloud.redis.v1beta1.UpgradeInstanceRequest; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; @@ -129,6 +130,15 @@ public class GrpcCloudRedisStub extends CloudRedisStub { ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + upgradeInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.redis.v1beta1.CloudRedis/UpgradeInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(UpgradeInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -155,6 +165,9 @@ public class GrpcCloudRedisStub extends CloudRedisStub { private final UnaryCallable deleteInstanceCallable; private final OperationCallable deleteInstanceOperationCallable; + private final UnaryCallable upgradeInstanceCallable; + private final OperationCallable + upgradeInstanceOperationCallable; private final GrpcStubCallableFactory callableFactory; @@ -300,6 +313,19 @@ public Map extract(DeleteInstanceRequest request) { } }) .build(); + GrpcCallSettings upgradeInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(upgradeInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpgradeInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); this.listInstancesCallable = callableFactory.createUnaryCallable( @@ -364,6 +390,15 @@ public Map extract(DeleteInstanceRequest request) { settings.deleteInstanceOperationSettings(), clientContext, this.operationsStub); + this.upgradeInstanceCallable = + callableFactory.createUnaryCallable( + upgradeInstanceTransportSettings, settings.upgradeInstanceSettings(), clientContext); + this.upgradeInstanceOperationCallable = + callableFactory.createOperationCallable( + upgradeInstanceTransportSettings, + settings.upgradeInstanceOperationSettings(), + clientContext, + this.operationsStub); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @@ -441,6 +476,16 @@ public UnaryCallable deleteInstanceCallable() return deleteInstanceCallable; } + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + upgradeInstanceOperationCallable() { + return upgradeInstanceOperationCallable; + } + + public UnaryCallable upgradeInstanceCallable() { + return upgradeInstanceCallable; + } + @Override public final void close() { shutdown(); diff --git a/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/CloudRedisClientTest.java b/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/CloudRedisClientTest.java index 11c4b89c..df94b1a8 100644 --- a/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/CloudRedisClientTest.java +++ b/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/CloudRedisClientTest.java @@ -648,4 +648,81 @@ public void deleteInstanceExceptionTest() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + @SuppressWarnings("all") + public void upgradeInstanceTest() throws Exception { + InstanceName name2 = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String displayName = "displayName1615086568"; + String locationId = "locationId552319461"; + String alternativeLocationId = "alternativeLocationId-718920621"; + String redisVersion2 = "redisVersion2-1453337401"; + String reservedIpRange = "reservedIpRange-1082940580"; + String host = "host3208616"; + int port = 3446913; + String currentLocationId = "currentLocationId1312712735"; + String statusMessage = "statusMessage-239442758"; + int memorySizeGb = 34199707; + String authorizedNetwork = "authorizedNetwork-1733809270"; + String persistenceIamIdentity = "persistenceIamIdentity1061944584"; + Instance expectedResponse = + Instance.newBuilder() + .setName(name2.toString()) + .setDisplayName(displayName) + .setLocationId(locationId) + .setAlternativeLocationId(alternativeLocationId) + .setRedisVersion(redisVersion2) + .setReservedIpRange(reservedIpRange) + .setHost(host) + .setPort(port) + .setCurrentLocationId(currentLocationId) + .setStatusMessage(statusMessage) + .setMemorySizeGb(memorySizeGb) + .setAuthorizedNetwork(authorizedNetwork) + .setPersistenceIamIdentity(persistenceIamIdentity) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("upgradeInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudRedis.addResponse(resultOperation); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String redisVersion = "redisVersion-685310444"; + + Instance actualResponse = client.upgradeInstanceAsync(name, redisVersion).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedis.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpgradeInstanceRequest actualRequest = (UpgradeInstanceRequest) actualRequests.get(0); + + Assert.assertEquals(name, InstanceName.parse(actualRequest.getName())); + Assert.assertEquals(redisVersion, actualRequest.getRedisVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void upgradeInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudRedis.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String redisVersion = "redisVersion-685310444"; + + client.upgradeInstanceAsync(name, redisVersion).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } } diff --git a/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/MockCloudRedisImpl.java b/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/MockCloudRedisImpl.java index 5417e695..bb12dcd4 100644 --- a/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/MockCloudRedisImpl.java +++ b/google-cloud-redis/src/test/java/com/google/cloud/redis/v1beta1/MockCloudRedisImpl.java @@ -116,6 +116,21 @@ public void updateInstance( } } + @Override + public void upgradeInstance( + UpgradeInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + @Override public void importInstance( ImportInstanceRequest request, StreamObserver responseObserver) { diff --git a/grpc-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisGrpc.java b/grpc-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisGrpc.java index 51697375..26efd62b 100644 --- a/grpc-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisGrpc.java +++ b/grpc-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisGrpc.java @@ -269,6 +269,59 @@ private CloudRedisGrpc() {} return getUpdateInstanceMethod; } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getUpgradeInstanceMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest, com.google.longrunning.Operation> + METHOD_UPGRADE_INSTANCE = getUpgradeInstanceMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest, com.google.longrunning.Operation> + getUpgradeInstanceMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest, com.google.longrunning.Operation> + getUpgradeInstanceMethod() { + return getUpgradeInstanceMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest, com.google.longrunning.Operation> + getUpgradeInstanceMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest, com.google.longrunning.Operation> + getUpgradeInstanceMethod; + if ((getUpgradeInstanceMethod = CloudRedisGrpc.getUpgradeInstanceMethod) == null) { + synchronized (CloudRedisGrpc.class) { + if ((getUpgradeInstanceMethod = CloudRedisGrpc.getUpgradeInstanceMethod) == null) { + CloudRedisGrpc.getUpgradeInstanceMethod = + getUpgradeInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.redis.v1beta1.CloudRedis", "UpgradeInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisMethodDescriptorSupplier("UpgradeInstance")) + .build(); + } + } + } + return getUpgradeInstanceMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getImportInstanceMethod()} instead. public static final io.grpc.MethodDescriptor< @@ -585,6 +638,20 @@ public void updateInstance( asyncUnimplementedUnaryCall(getUpdateInstanceMethodHelper(), responseObserver); } + /** + * + * + *
+     * Upgrades Redis instance to the newer Redis version specified in the
+     * request.
+     * 
+ */ + public void upgradeInstance( + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpgradeInstanceMethodHelper(), responseObserver); + } + /** * * @@ -675,6 +742,12 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.redis.v1beta1.UpdateInstanceRequest, com.google.longrunning.Operation>(this, METHODID_UPDATE_INSTANCE))) + .addMethod( + getUpgradeInstanceMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_UPGRADE_INSTANCE))) .addMethod( getImportInstanceMethodHelper(), asyncUnaryCall( @@ -816,6 +889,23 @@ public void updateInstance( responseObserver); } + /** + * + * + *
+     * Upgrades Redis instance to the newer Redis version specified in the
+     * request.
+     * 
+ */ + public void upgradeInstance( + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpgradeInstanceMethodHelper(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -993,6 +1083,20 @@ public com.google.longrunning.Operation updateInstance( getChannel(), getUpdateInstanceMethodHelper(), getCallOptions(), request); } + /** + * + * + *
+     * Upgrades Redis instance to the newer Redis version specified in the
+     * request.
+     * 
+ */ + public com.google.longrunning.Operation upgradeInstance( + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request) { + return blockingUnaryCall( + getChannel(), getUpgradeInstanceMethodHelper(), getCallOptions(), request); + } + /** * * @@ -1159,6 +1263,20 @@ protected CloudRedisFutureStub build(io.grpc.Channel channel, io.grpc.CallOption getChannel().newCall(getUpdateInstanceMethodHelper(), getCallOptions()), request); } + /** + * + * + *
+     * Upgrades Redis instance to the newer Redis version specified in the
+     * request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + upgradeInstance(com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpgradeInstanceMethodHelper(), getCallOptions()), request); + } + /** * * @@ -1226,10 +1344,11 @@ protected CloudRedisFutureStub build(io.grpc.Channel channel, io.grpc.CallOption private static final int METHODID_GET_INSTANCE = 1; private static final int METHODID_CREATE_INSTANCE = 2; private static final int METHODID_UPDATE_INSTANCE = 3; - private static final int METHODID_IMPORT_INSTANCE = 4; - private static final int METHODID_EXPORT_INSTANCE = 5; - private static final int METHODID_FAILOVER_INSTANCE = 6; - private static final int METHODID_DELETE_INSTANCE = 7; + private static final int METHODID_UPGRADE_INSTANCE = 4; + private static final int METHODID_IMPORT_INSTANCE = 5; + private static final int METHODID_EXPORT_INSTANCE = 6; + private static final int METHODID_FAILOVER_INSTANCE = 7; + private static final int METHODID_DELETE_INSTANCE = 8; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1270,6 +1389,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.redis.v1beta1.UpdateInstanceRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPGRADE_INSTANCE: + serviceImpl.upgradeInstance( + (com.google.cloud.redis.v1beta1.UpgradeInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_IMPORT_INSTANCE: serviceImpl.importInstance( (com.google.cloud.redis.v1beta1.ImportInstanceRequest) request, @@ -1358,6 +1482,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetInstanceMethodHelper()) .addMethod(getCreateInstanceMethodHelper()) .addMethod(getUpdateInstanceMethodHelper()) + .addMethod(getUpgradeInstanceMethodHelper()) .addMethod(getImportInstanceMethodHelper()) .addMethod(getExportInstanceMethodHelper()) .addMethod(getFailoverInstanceMethodHelper()) diff --git a/proto-google-cloud-redis-v1/clirr-ignored-differences.xml b/proto-google-cloud-redis-v1/clirr-ignored-differences.xml new file mode 100644 index 00000000..42ef3bba --- /dev/null +++ b/proto-google-cloud-redis-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/redis/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/redis/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/redis/v1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java index e4f7e312..cd1aa677 100644 --- a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java +++ b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java @@ -123,7 +123,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/api/resource.proto\032#google/longrunning/" + "operations.proto\032 google/protobuf/field_" + "mask.proto\032\037google/protobuf/timestamp.pr" - + "oto\"\306\010\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\024\n\014d" + + "oto\"\353\t\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\024\n\014d" + "isplay_name\030\002 \001(\t\022;\n\006labels\030\003 \003(\0132+.goog" + "le.cloud.redis.v1.Instance.LabelsEntry\022\030" + "\n\013location_id\030\004 \001(\tB\003\340A\001\022$\n\027alternative_" @@ -140,116 +140,121 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "loud.redis.v1.Instance.TierB\003\340A\002\022\033\n\016memo" + "ry_size_gb\030\022 \001(\005B\003\340A\002\022\037\n\022authorized_netw" + "ork\030\024 \001(\tB\003\340A\001\022%\n\030persistence_iam_identi" - + "ty\030\025 \001(\tB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" - + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\0323\n\021RedisConfigsEntr" - + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\224\001\n\005St" - + "ate\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001" - + "\022\t\n\005READY\020\002\022\014\n\010UPDATING\020\003\022\014\n\010DELETING\020\004\022" - + "\r\n\tREPAIRING\020\005\022\017\n\013MAINTENANCE\020\006\022\r\n\tIMPOR" - + "TING\020\010\022\020\n\014FAILING_OVER\020\t\"8\n\004Tier\022\024\n\020TIER" - + "_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\017\n\013STANDARD_HA" - + "\020\003:`\352A]\n\035redis.googleapis.com/Instance\022<" - + "projects/{project}/locations/{location}/" - + "instances/{instance}\"x\n\024ListInstancesReq" - + "uest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations." - + "googleapis.com/Location\022\021\n\tpage_size\030\002 \001" - + "(\005\022\022\n\npage_token\030\003 \001(\t\"y\n\025ListInstancesR" - + "esponse\0222\n\tinstances\030\001 \003(\0132\037.google.clou" - + "d.redis.v1.Instance\022\027\n\017next_page_token\030\002" - + " \001(\t\022\023\n\013unreachable\030\003 \003(\t\"I\n\022GetInstance" - + "Request\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035redis.goo" - + "gleapis.com/Instance\"\244\001\n\025CreateInstanceR" - + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" - + "s.googleapis.com/Location\022\030\n\013instance_id" - + "\030\002 \001(\tB\003\340A\002\0226\n\010instance\030\003 \001(\0132\037.google.c" - + "loud.redis.v1.InstanceB\003\340A\002\"\205\001\n\025UpdateIn" - + "stanceRequest\0224\n\013update_mask\030\001 \001(\0132\032.goo" - + "gle.protobuf.FieldMaskB\003\340A\002\0226\n\010instance\030" - + "\002 \001(\0132\037.google.cloud.redis.v1.InstanceB\003" - + "\340A\002\"L\n\025DeleteInstanceRequest\0223\n\004name\030\001 \001" - + "(\tB%\340A\002\372A\037\n\035redis.googleapis.com/Instanc" - + "e\"\035\n\tGcsSource\022\020\n\003uri\030\001 \001(\tB\003\340A\002\"O\n\013Inpu" - + "tConfig\0226\n\ngcs_source\030\001 \001(\0132 .google.clo" - + "ud.redis.v1.GcsSourceH\000B\010\n\006source\"i\n\025Imp" - + "ortInstanceRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022=\n" - + "\014input_config\030\003 \001(\0132\".google.cloud.redis" - + ".v1.InputConfigB\003\340A\002\"\"\n\016GcsDestination\022\020" - + "\n\003uri\030\001 \001(\tB\003\340A\002\"_\n\014OutputConfig\022@\n\017gcs_" - + "destination\030\001 \001(\0132%.google.cloud.redis.v" - + "1.GcsDestinationH\000B\r\n\013destination\"k\n\025Exp" - + "ortInstanceRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022?\n" - + "\routput_config\030\003 \001(\0132#.google.cloud.redi" - + "s.v1.OutputConfigB\003\340A\002\"\234\002\n\027FailoverInsta" - + "nceRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035redis." - + "googleapis.com/Instance\022d\n\024data_protecti" - + "on_mode\030\002 \001(\0162A.google.cloud.redis.v1.Fa" - + "iloverInstanceRequest.DataProtectionMode" - + "B\003\340A\001\"f\n\022DataProtectionMode\022$\n DATA_PROT" - + "ECTION_MODE_UNSPECIFIED\020\000\022\025\n\021LIMITED_DAT" - + "A_LOSS\020\001\022\023\n\017FORCE_DATA_LOSS\020\002\"\326\001\n\021Operat" - + "ionMetadata\022/\n\013create_time\030\001 \001(\0132\032.googl" - + "e.protobuf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032" - + ".google.protobuf.Timestamp\022\016\n\006target\030\003 \001" - + "(\t\022\014\n\004verb\030\004 \001(\t\022\025\n\rstatus_detail\030\005 \001(\t\022" - + "\030\n\020cancel_requested\030\006 \001(\010\022\023\n\013api_version" - + "\030\007 \001(\t\"\311\001\n\020LocationMetadata\022Y\n\017available" - + "_zones\030\001 \003(\0132;.google.cloud.redis.v1.Loc" - + "ationMetadata.AvailableZonesEntryB\003\340A\003\032Z" - + "\n\023AvailableZonesEntry\022\013\n\003key\030\001 \001(\t\0222\n\005va" - + "lue\030\002 \001(\0132#.google.cloud.redis.v1.ZoneMe" - + "tadata:\0028\001\"\016\n\014ZoneMetadata2\255\017\n\nCloudRedi" - + "s\022\252\001\n\rListInstances\022+.google.cloud.redis" - + ".v1.ListInstancesRequest\032,.google.cloud." - + "redis.v1.ListInstancesResponse\">\202\323\344\223\002/\022-" + + "ty\030\025 \001(\tB\003\340A\003\022F\n\014connect_mode\030\026 \001(\0162+.go" + + "ogle.cloud.redis.v1.Instance.ConnectMode" + + "B\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001\0323\n\021RedisConfigsEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\224\001\n\005State\022\025\n\021S" + + "TATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READ" + + "Y\020\002\022\014\n\010UPDATING\020\003\022\014\n\010DELETING\020\004\022\r\n\tREPAI" + + "RING\020\005\022\017\n\013MAINTENANCE\020\006\022\r\n\tIMPORTING\020\010\022\020" + + "\n\014FAILING_OVER\020\t\"8\n\004Tier\022\024\n\020TIER_UNSPECI" + + "FIED\020\000\022\t\n\005BASIC\020\001\022\017\n\013STANDARD_HA\020\003\"[\n\013Co" + + "nnectMode\022\034\n\030CONNECT_MODE_UNSPECIFIED\020\000\022" + + "\022\n\016DIRECT_PEERING\020\001\022\032\n\026PRIVATE_SERVICE_A" + + "CCESS\020\002:`\352A]\n\035redis.googleapis.com/Insta" + + "nce\022\202\323\344" + + "\223\002/\022-/v1/{parent=projects/*/locations/*}" + + "/instances\332A\006parent\022\227\001\n\013GetInstance\022).go" + + "ogle.cloud.redis.v1.GetInstanceRequest\032\037" + + ".google.cloud.redis.v1.Instance\"<\202\323\344\223\002/\022" + + "-/v1/{name=projects/*/locations/*/instan" + + "ces/*}\332A\004name\022\211\002\n\016CreateInstance\022,.googl" + + "e.cloud.redis.v1.CreateInstanceRequest\032\035" + + ".google.longrunning.Operation\"\251\001\202\323\344\223\0029\"-" + "/v1/{parent=projects/*/locations/*}/inst" - + "ances\332A\006parent\022\227\001\n\013GetInstance\022).google." - + "cloud.redis.v1.GetInstanceRequest\032\037.goog" - + "le.cloud.redis.v1.Instance\"<\202\323\344\223\002/\022-/v1/" + + "ances:\010instance\332A\033parent,instance_id,ins" + + "tance\312AI\n\036google.cloud.redis.v1.Instance" + + "\022\'google.cloud.redis.v1.OperationMetadat" + + "a\022\213\002\n\016UpdateInstance\022,.google.cloud.redi" + + "s.v1.UpdateInstanceRequest\032\035.google.long" + + "running.Operation\"\253\001\202\323\344\223\002B26/v1/{instanc" + + "e.name=projects/*/locations/*/instances/" + + "*}:\010instance\332A\024update_mask,instance\312AI\n\036" + + "google.cloud.redis.v1.Instance\022\'google.c" + + "loud.redis.v1.OperationMetadata\022\377\001\n\016Impo" + + "rtInstance\022,.google.cloud.redis.v1.Impor" + + "tInstanceRequest\032\035.google.longrunning.Op" + + "eration\"\237\001\202\323\344\223\0029\"4/v1/{name=projects/*/l" + + "ocations/*/instances/*}:import:\001*\332A\021name" + + ",input_config\312AI\n\036google.cloud.redis.v1." + + "Instance\022\'google.cloud.redis.v1.Operatio" + + "nMetadata\022\200\002\n\016ExportInstance\022,.google.cl" + + "oud.redis.v1.ExportInstanceRequest\032\035.goo" + + "gle.longrunning.Operation\"\240\001\202\323\344\223\0029\"4/v1/" + "{name=projects/*/locations/*/instances/*" - + "}\332A\004name\022\211\002\n\016CreateInstance\022,.google.clo" - + "ud.redis.v1.CreateInstanceRequest\032\035.goog" - + "le.longrunning.Operation\"\251\001\202\323\344\223\0029\"-/v1/{" - + "parent=projects/*/locations/*}/instances" - + ":\010instance\332A\033parent,instance_id,instance" - + "\312AI\n\036google.cloud.redis.v1.Instance\022\'goo" - + "gle.cloud.redis.v1.OperationMetadata\022\213\002\n" - + "\016UpdateInstance\022,.google.cloud.redis.v1." - + "UpdateInstanceRequest\032\035.google.longrunni" - + "ng.Operation\"\253\001\202\323\344\223\002B26/v1/{instance.nam" - + "e=projects/*/locations/*/instances/*}:\010i" - + "nstance\332A\024update_mask,instance\312AI\n\036googl" - + "e.cloud.redis.v1.Instance\022\'google.cloud." - + "redis.v1.OperationMetadata\022\377\001\n\016ImportIns" - + "tance\022,.google.cloud.redis.v1.ImportInst" - + "anceRequest\032\035.google.longrunning.Operati" - + "on\"\237\001\202\323\344\223\0029\"4/v1/{name=projects/*/locati" - + "ons/*/instances/*}:import:\001*\332A\021name,inpu" - + "t_config\312AI\n\036google.cloud.redis.v1.Insta" - + "nce\022\'google.cloud.redis.v1.OperationMeta" - + "data\022\200\002\n\016ExportInstance\022,.google.cloud.r" - + "edis.v1.ExportInstanceRequest\032\035.google.l" - + "ongrunning.Operation\"\240\001\202\323\344\223\0029\"4/v1/{name" - + "=projects/*/locations/*/instances/*}:exp" - + "ort:\001*\332A\022name,output_config\312AI\n\036google.c" - + "loud.redis.v1.Instance\022\'google.cloud.red" - + "is.v1.OperationMetadata\022\215\002\n\020FailoverInst" - + "ance\022..google.cloud.redis.v1.FailoverIns" - + "tanceRequest\032\035.google.longrunning.Operat" - + "ion\"\251\001\202\323\344\223\002;\"6/v1/{name=projects/*/locat" - + "ions/*/instances/*}:failover:\001*\332A\031name,d" - + "ata_protection_mode\312AI\n\036google.cloud.red" - + "is.v1.Instance\022\'google.cloud.redis.v1.Op" - + "erationMetadata\022\336\001\n\016DeleteInstance\022,.goo" - + "gle.cloud.redis.v1.DeleteInstanceRequest" - + "\032\035.google.longrunning.Operation\"\177\202\323\344\223\002/*" - + "-/v1/{name=projects/*/locations/*/instan" - + "ces/*}\332A\004name\312A@\n\025google.protobuf.Empty\022" - + "\'google.cloud.redis.v1.OperationMetadata" - + "\032H\312A\024redis.googleapis.com\322A.https://www." - + "googleapis.com/auth/cloud-platformBs\n\031co" - + "m.google.cloud.redis.v1B\030CloudRedisServi" - + "ceV1ProtoP\001Z:google.golang.org/genproto/" - + "googleapis/cloud/redis/v1;redisb\006proto3" + + "}:export:\001*\332A\022name,output_config\312AI\n\036goo" + + "gle.cloud.redis.v1.Instance\022\'google.clou" + + "d.redis.v1.OperationMetadata\022\215\002\n\020Failove" + + "rInstance\022..google.cloud.redis.v1.Failov" + + "erInstanceRequest\032\035.google.longrunning.O" + + "peration\"\251\001\202\323\344\223\002;\"6/v1/{name=projects/*/" + + "locations/*/instances/*}:failover:\001*\332A\031n" + + "ame,data_protection_mode\312AI\n\036google.clou" + + "d.redis.v1.Instance\022\'google.cloud.redis." + + "v1.OperationMetadata\022\336\001\n\016DeleteInstance\022" + + ",.google.cloud.redis.v1.DeleteInstanceRe" + + "quest\032\035.google.longrunning.Operation\"\177\202\323" + + "\344\223\002/*-/v1/{name=projects/*/locations/*/i" + + "nstances/*}\332A\004name\312A@\n\025google.protobuf.E" + + "mpty\022\'google.cloud.redis.v1.OperationMet" + + "adata\032H\312A\024redis.googleapis.com\322A.https:/" + + "/www.googleapis.com/auth/cloud-platformB" + + "s\n\031com.google.cloud.redis.v1B\030CloudRedis" + + "ServiceV1ProtoP\001Z:google.golang.org/genp" + + "roto/googleapis/cloud/redis/v1;redisb\006pr" + + "oto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -287,6 +292,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MemorySizeGb", "AuthorizedNetwork", "PersistenceIamIdentity", + "ConnectMode", }); internal_static_google_cloud_redis_v1_Instance_LabelsEntry_descriptor = internal_static_google_cloud_redis_v1_Instance_descriptor.getNestedTypes().get(0); diff --git a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/FailoverInstanceRequest.java b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/FailoverInstanceRequest.java index 22a3536b..60e487fa 100644 --- a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/FailoverInstanceRequest.java +++ b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/FailoverInstanceRequest.java @@ -119,7 +119,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.redis.v1.FailoverInstanceRequest.Builder.class); } - /** Protobuf enum {@code google.cloud.redis.v1.FailoverInstanceRequest.DataProtectionMode} */ + /** + * + * + *
+   * Specifies different modes of operation in relation to the data retention.
+   * 
+ * + * Protobuf enum {@code google.cloud.redis.v1.FailoverInstanceRequest.DataProtectionMode} + */ public enum DataProtectionMode implements com.google.protobuf.ProtocolMessageEnum { /** * diff --git a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java index 0f41d09a..5b896a1c 100644 --- a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java +++ b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java @@ -51,6 +51,7 @@ private Instance() { tier_ = 0; authorizedNetwork_ = ""; persistenceIamIdentity_ = ""; + connectMode_ = 0; } @java.lang.Override @@ -227,6 +228,13 @@ private Instance( persistenceIamIdentity_ = s; break; } + case 176: + { + int rawValue = input.readEnum(); + + connectMode_ = rawValue; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -716,6 +724,161 @@ private Tier(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1.Instance.Tier) } + /** + * + * + *
+   * Available connection modes.
+   * 
+ * + * Protobuf enum {@code google.cloud.redis.v1.Instance.ConnectMode} + */ + public enum ConnectMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * CONNECT_MODE_UNSPECIFIED = 0; + */ + CONNECT_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Connect via directly peering with memorystore redis hosted service.
+     * 
+ * + * DIRECT_PEERING = 1; + */ + DIRECT_PEERING(1), + /** + * + * + *
+     * Connect with google via private service access and share connection
+     * across google managed services.
+     * 
+ * + * PRIVATE_SERVICE_ACCESS = 2; + */ + PRIVATE_SERVICE_ACCESS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * CONNECT_MODE_UNSPECIFIED = 0; + */ + public static final int CONNECT_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Connect via directly peering with memorystore redis hosted service.
+     * 
+ * + * DIRECT_PEERING = 1; + */ + public static final int DIRECT_PEERING_VALUE = 1; + /** + * + * + *
+     * Connect with google via private service access and share connection
+     * across google managed services.
+     * 
+ * + * PRIVATE_SERVICE_ACCESS = 2; + */ + public static final int PRIVATE_SERVICE_ACCESS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConnectMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ConnectMode forNumber(int value) { + switch (value) { + case 0: + return CONNECT_MODE_UNSPECIFIED; + case 1: + return DIRECT_PEERING; + case 2: + return PRIVATE_SERVICE_ACCESS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ConnectMode findValueByNumber(int number) { + return ConnectMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.v1.Instance.getDescriptor().getEnumTypes().get(2); + } + + private static final ConnectMode[] VALUES = values(); + + public static ConnectMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ConnectMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1.Instance.ConnectMode) + } + public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -728,8 +891,8 @@ private Tier(int value) { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details. * * * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -757,8 +920,8 @@ public java.lang.String getName() { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details. * * * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -926,8 +1089,8 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1.Instance.location_id]. * * * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -952,8 +1115,8 @@ public java.lang.String getLocationId() { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1.Instance.location_id]. * * * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -980,7 +1143,7 @@ public com.google.protobuf.ByteString getLocationIdBytes() { *
    * Optional. Only applicable to STANDARD_HA tier which protects the instance
    * against zonal failures by provisioning it across two zones. If provided, it
-   * must be a different zone from the one provided in [location_id].
+   * must be a different zone from the one provided in [location_id][google.cloud.redis.v1.Instance.location_id].
    * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1004,7 +1167,7 @@ public java.lang.String getAlternativeLocationId() { *
    * Optional. Only applicable to STANDARD_HA tier which protects the instance
    * against zonal failures by provisioning it across two zones. If provided, it
-   * must be a different zone from the one provided in [location_id].
+   * must be a different zone from the one provided in [location_id][google.cloud.redis.v1.Instance.location_id].
    * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1030,9 +1193,8 @@ public com.google.protobuf.ByteString getAlternativeLocationIdBytes() { * *
    * Optional. The version of Redis software.
-   * If not provided, latest supported version will be used. Updating the
-   * version will perform an upgrade/downgrade to the new version. Currently,
-   * the supported values are:
+   * If not provided, latest supported version will be used. Currently, the
+   * supported values are:
    *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
    *  *   `REDIS_3_2` for Redis 3.2 compatibility
    * 
@@ -1057,9 +1219,8 @@ public java.lang.String getRedisVersion() { * *
    * Optional. The version of Redis software.
-   * If not provided, latest supported version will be used. Updating the
-   * version will perform an upgrade/downgrade to the new version. Currently,
-   * the supported values are:
+   * If not provided, latest supported version will be used. Currently, the
+   * supported values are:
    *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
    *  *   `REDIS_3_2` for Redis 3.2 compatibility
    * 
@@ -1206,9 +1367,9 @@ public int getPort() { * *
    * Output only. The current zone where the Redis endpoint is placed. For Basic
-   * Tier instances, this will always be the same as the [location_id]
+   * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1.Instance.location_id]
    * provided by the user at creation time. For Standard Tier instances,
-   * this can be either [location_id] or [alternative_location_id] and can
+   * this can be either [location_id][google.cloud.redis.v1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] and can
    * change after a failover event.
    * 
* @@ -1232,9 +1393,9 @@ public java.lang.String getCurrentLocationId() { * *
    * Output only. The current zone where the Redis endpoint is placed. For Basic
-   * Tier instances, this will always be the same as the [location_id]
+   * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1.Instance.location_id]
    * provided by the user at creation time. For Standard Tier instances,
-   * this can be either [location_id] or [alternative_location_id] and can
+   * this can be either [location_id][google.cloud.redis.v1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] and can
    * change after a failover event.
    * 
* @@ -1684,6 +1845,48 @@ public com.google.protobuf.ByteString getPersistenceIamIdentityBytes() { } } + public static final int CONNECT_MODE_FIELD_NUMBER = 22; + private int connectMode_; + /** + * + * + *
+   * Optional. The connect mode of Redis instance.
+   * If not provided, default one will be used.
+   * Current default: DIRECT_PEERING.
+   * 
+ * + * + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for connectMode. + */ + public int getConnectModeValue() { + return connectMode_; + } + /** + * + * + *
+   * Optional. The connect mode of Redis instance.
+   * If not provided, default one will be used.
+   * Current default: DIRECT_PEERING.
+   * 
+ * + * + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The connectMode. + */ + public com.google.cloud.redis.v1.Instance.ConnectMode getConnectMode() { + @SuppressWarnings("deprecation") + com.google.cloud.redis.v1.Instance.ConnectMode result = + com.google.cloud.redis.v1.Instance.ConnectMode.valueOf(connectMode_); + return result == null ? com.google.cloud.redis.v1.Instance.ConnectMode.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1750,6 +1953,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getPersistenceIamIdentityBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 21, persistenceIamIdentity_); } + if (connectMode_ + != com.google.cloud.redis.v1.Instance.ConnectMode.CONNECT_MODE_UNSPECIFIED.getNumber()) { + output.writeEnum(22, connectMode_); + } unknownFields.writeTo(output); } @@ -1827,6 +2034,10 @@ public int getSerializedSize() { if (!getPersistenceIamIdentityBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, persistenceIamIdentity_); } + if (connectMode_ + != com.google.cloud.redis.v1.Instance.ConnectMode.CONNECT_MODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, connectMode_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1863,6 +2074,7 @@ public boolean equals(final java.lang.Object obj) { if (getMemorySizeGb() != other.getMemorySizeGb()) return false; if (!getAuthorizedNetwork().equals(other.getAuthorizedNetwork())) return false; if (!getPersistenceIamIdentity().equals(other.getPersistenceIamIdentity())) return false; + if (connectMode_ != other.connectMode_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1916,6 +2128,8 @@ public int hashCode() { hash = (53 * hash) + getAuthorizedNetwork().hashCode(); hash = (37 * hash) + PERSISTENCE_IAM_IDENTITY_FIELD_NUMBER; hash = (53 * hash) + getPersistenceIamIdentity().hashCode(); + hash = (37 * hash) + CONNECT_MODE_FIELD_NUMBER; + hash = (53 * hash) + connectMode_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2122,6 +2336,8 @@ public Builder clear() { persistenceIamIdentity_ = ""; + connectMode_ = 0; + return this; } @@ -2173,6 +2389,7 @@ public com.google.cloud.redis.v1.Instance buildPartial() { result.memorySizeGb_ = memorySizeGb_; result.authorizedNetwork_ = authorizedNetwork_; result.persistenceIamIdentity_ = persistenceIamIdentity_; + result.connectMode_ = connectMode_; onBuilt(); return result; } @@ -2283,6 +2500,9 @@ public Builder mergeFrom(com.google.cloud.redis.v1.Instance other) { persistenceIamIdentity_ = other.persistenceIamIdentity_; onChanged(); } + if (other.connectMode_ != 0) { + setConnectModeValue(other.getConnectModeValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2325,8 +2545,8 @@ public Builder mergeFrom( * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details. * * * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2354,8 +2574,8 @@ public java.lang.String getName() { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details. * * * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2383,8 +2603,8 @@ public com.google.protobuf.ByteString getNameBytes() { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details. * * * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2411,8 +2631,8 @@ public Builder setName(java.lang.String value) { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details. * * * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2435,8 +2655,8 @@ public Builder clearName() { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details. * * * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2721,8 +2941,8 @@ public Builder putAllLabels(java.util.Map va * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1.Instance.location_id]. * * * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2747,8 +2967,8 @@ public java.lang.String getLocationId() { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1.Instance.location_id]. * * * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2773,8 +2993,8 @@ public com.google.protobuf.ByteString getLocationIdBytes() { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1.Instance.location_id]. * * * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2798,8 +3018,8 @@ public Builder setLocationId(java.lang.String value) { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1.Instance.location_id]. * * * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2819,8 +3039,8 @@ public Builder clearLocationId() { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1.Instance.location_id]. * * * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2846,7 +3066,7 @@ public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { *
      * Optional. Only applicable to STANDARD_HA tier which protects the instance
      * against zonal failures by provisioning it across two zones. If provided, it
-     * must be a different zone from the one provided in [location_id].
+     * must be a different zone from the one provided in [location_id][google.cloud.redis.v1.Instance.location_id].
      * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2870,7 +3090,7 @@ public java.lang.String getAlternativeLocationId() { *
      * Optional. Only applicable to STANDARD_HA tier which protects the instance
      * against zonal failures by provisioning it across two zones. If provided, it
-     * must be a different zone from the one provided in [location_id].
+     * must be a different zone from the one provided in [location_id][google.cloud.redis.v1.Instance.location_id].
      * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2894,7 +3114,7 @@ public com.google.protobuf.ByteString getAlternativeLocationIdBytes() { *
      * Optional. Only applicable to STANDARD_HA tier which protects the instance
      * against zonal failures by provisioning it across two zones. If provided, it
-     * must be a different zone from the one provided in [location_id].
+     * must be a different zone from the one provided in [location_id][google.cloud.redis.v1.Instance.location_id].
      * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2917,7 +3137,7 @@ public Builder setAlternativeLocationId(java.lang.String value) { *
      * Optional. Only applicable to STANDARD_HA tier which protects the instance
      * against zonal failures by provisioning it across two zones. If provided, it
-     * must be a different zone from the one provided in [location_id].
+     * must be a different zone from the one provided in [location_id][google.cloud.redis.v1.Instance.location_id].
      * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2936,7 +3156,7 @@ public Builder clearAlternativeLocationId() { *
      * Optional. Only applicable to STANDARD_HA tier which protects the instance
      * against zonal failures by provisioning it across two zones. If provided, it
-     * must be a different zone from the one provided in [location_id].
+     * must be a different zone from the one provided in [location_id][google.cloud.redis.v1.Instance.location_id].
      * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2961,9 +3181,8 @@ public Builder setAlternativeLocationIdBytes(com.google.protobuf.ByteString valu * *
      * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Updating the
-     * version will perform an upgrade/downgrade to the new version. Currently,
-     * the supported values are:
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
      *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
      *  *   `REDIS_3_2` for Redis 3.2 compatibility
      * 
@@ -2988,9 +3207,8 @@ public java.lang.String getRedisVersion() { * *
      * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Updating the
-     * version will perform an upgrade/downgrade to the new version. Currently,
-     * the supported values are:
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
      *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
      *  *   `REDIS_3_2` for Redis 3.2 compatibility
      * 
@@ -3015,9 +3233,8 @@ public com.google.protobuf.ByteString getRedisVersionBytes() { * *
      * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Updating the
-     * version will perform an upgrade/downgrade to the new version. Currently,
-     * the supported values are:
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
      *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
      *  *   `REDIS_3_2` for Redis 3.2 compatibility
      * 
@@ -3041,9 +3258,8 @@ public Builder setRedisVersion(java.lang.String value) { * *
      * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Updating the
-     * version will perform an upgrade/downgrade to the new version. Currently,
-     * the supported values are:
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
      *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
      *  *   `REDIS_3_2` for Redis 3.2 compatibility
      * 
@@ -3063,9 +3279,8 @@ public Builder clearRedisVersion() { * *
      * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Updating the
-     * version will perform an upgrade/downgrade to the new version. Currently,
-     * the supported values are:
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
      *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
      *  *   `REDIS_3_2` for Redis 3.2 compatibility
      * 
@@ -3375,9 +3590,9 @@ public Builder clearPort() { * *
      * Output only. The current zone where the Redis endpoint is placed. For Basic
-     * Tier instances, this will always be the same as the [location_id]
+     * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1.Instance.location_id]
      * provided by the user at creation time. For Standard Tier instances,
-     * this can be either [location_id] or [alternative_location_id] and can
+     * this can be either [location_id][google.cloud.redis.v1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] and can
      * change after a failover event.
      * 
* @@ -3401,9 +3616,9 @@ public java.lang.String getCurrentLocationId() { * *
      * Output only. The current zone where the Redis endpoint is placed. For Basic
-     * Tier instances, this will always be the same as the [location_id]
+     * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1.Instance.location_id]
      * provided by the user at creation time. For Standard Tier instances,
-     * this can be either [location_id] or [alternative_location_id] and can
+     * this can be either [location_id][google.cloud.redis.v1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] and can
      * change after a failover event.
      * 
* @@ -3427,9 +3642,9 @@ public com.google.protobuf.ByteString getCurrentLocationIdBytes() { * *
      * Output only. The current zone where the Redis endpoint is placed. For Basic
-     * Tier instances, this will always be the same as the [location_id]
+     * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1.Instance.location_id]
      * provided by the user at creation time. For Standard Tier instances,
-     * this can be either [location_id] or [alternative_location_id] and can
+     * this can be either [location_id][google.cloud.redis.v1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] and can
      * change after a failover event.
      * 
* @@ -3452,9 +3667,9 @@ public Builder setCurrentLocationId(java.lang.String value) { * *
      * Output only. The current zone where the Redis endpoint is placed. For Basic
-     * Tier instances, this will always be the same as the [location_id]
+     * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1.Instance.location_id]
      * provided by the user at creation time. For Standard Tier instances,
-     * this can be either [location_id] or [alternative_location_id] and can
+     * this can be either [location_id][google.cloud.redis.v1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] and can
      * change after a failover event.
      * 
* @@ -3473,9 +3688,9 @@ public Builder clearCurrentLocationId() { * *
      * Output only. The current zone where the Redis endpoint is placed. For Basic
-     * Tier instances, this will always be the same as the [location_id]
+     * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1.Instance.location_id]
      * provided by the user at creation time. For Standard Tier instances,
-     * this can be either [location_id] or [alternative_location_id] and can
+     * this can be either [location_id][google.cloud.redis.v1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] and can
      * change after a failover event.
      * 
* @@ -4531,6 +4746,114 @@ public Builder setPersistenceIamIdentityBytes(com.google.protobuf.ByteString val return this; } + private int connectMode_ = 0; + /** + * + * + *
+     * Optional. The connect mode of Redis instance.
+     * If not provided, default one will be used.
+     * Current default: DIRECT_PEERING.
+     * 
+ * + * + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for connectMode. + */ + public int getConnectModeValue() { + return connectMode_; + } + /** + * + * + *
+     * Optional. The connect mode of Redis instance.
+     * If not provided, default one will be used.
+     * Current default: DIRECT_PEERING.
+     * 
+ * + * + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for connectMode to set. + * @return This builder for chaining. + */ + public Builder setConnectModeValue(int value) { + connectMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The connect mode of Redis instance.
+     * If not provided, default one will be used.
+     * Current default: DIRECT_PEERING.
+     * 
+ * + * + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The connectMode. + */ + public com.google.cloud.redis.v1.Instance.ConnectMode getConnectMode() { + @SuppressWarnings("deprecation") + com.google.cloud.redis.v1.Instance.ConnectMode result = + com.google.cloud.redis.v1.Instance.ConnectMode.valueOf(connectMode_); + return result == null ? com.google.cloud.redis.v1.Instance.ConnectMode.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Optional. The connect mode of Redis instance.
+     * If not provided, default one will be used.
+     * Current default: DIRECT_PEERING.
+     * 
+ * + * + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The connectMode to set. + * @return This builder for chaining. + */ + public Builder setConnectMode(com.google.cloud.redis.v1.Instance.ConnectMode value) { + if (value == null) { + throw new NullPointerException(); + } + + connectMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The connect mode of Redis instance.
+     * If not provided, default one will be used.
+     * Current default: DIRECT_PEERING.
+     * 
+ * + * + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearConnectMode() { + + connectMode_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java index b16f0919..0cc84525 100644 --- a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java +++ b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java @@ -33,8 +33,8 @@ public interface InstanceOrBuilder * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details. * * * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -52,8 +52,8 @@ public interface InstanceOrBuilder * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details. * * * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -148,8 +148,8 @@ public interface InstanceOrBuilder * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1.Instance.location_id]. * * * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -164,8 +164,8 @@ public interface InstanceOrBuilder * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1.Instance.location_id]. * * * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -180,7 +180,7 @@ public interface InstanceOrBuilder *
    * Optional. Only applicable to STANDARD_HA tier which protects the instance
    * against zonal failures by provisioning it across two zones. If provided, it
-   * must be a different zone from the one provided in [location_id].
+   * must be a different zone from the one provided in [location_id][google.cloud.redis.v1.Instance.location_id].
    * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -194,7 +194,7 @@ public interface InstanceOrBuilder *
    * Optional. Only applicable to STANDARD_HA tier which protects the instance
    * against zonal failures by provisioning it across two zones. If provided, it
-   * must be a different zone from the one provided in [location_id].
+   * must be a different zone from the one provided in [location_id][google.cloud.redis.v1.Instance.location_id].
    * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -208,9 +208,8 @@ public interface InstanceOrBuilder * *
    * Optional. The version of Redis software.
-   * If not provided, latest supported version will be used. Updating the
-   * version will perform an upgrade/downgrade to the new version. Currently,
-   * the supported values are:
+   * If not provided, latest supported version will be used. Currently, the
+   * supported values are:
    *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
    *  *   `REDIS_3_2` for Redis 3.2 compatibility
    * 
@@ -225,9 +224,8 @@ public interface InstanceOrBuilder * *
    * Optional. The version of Redis software.
-   * If not provided, latest supported version will be used. Updating the
-   * version will perform an upgrade/downgrade to the new version. Currently,
-   * the supported values are:
+   * If not provided, latest supported version will be used. Currently, the
+   * supported values are:
    *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
    *  *   `REDIS_3_2` for Redis 3.2 compatibility
    * 
@@ -314,9 +312,9 @@ public interface InstanceOrBuilder * *
    * Output only. The current zone where the Redis endpoint is placed. For Basic
-   * Tier instances, this will always be the same as the [location_id]
+   * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1.Instance.location_id]
    * provided by the user at creation time. For Standard Tier instances,
-   * this can be either [location_id] or [alternative_location_id] and can
+   * this can be either [location_id][google.cloud.redis.v1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] and can
    * change after a failover event.
    * 
* @@ -330,9 +328,9 @@ public interface InstanceOrBuilder * *
    * Output only. The current zone where the Redis endpoint is placed. For Basic
-   * Tier instances, this will always be the same as the [location_id]
+   * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1.Instance.location_id]
    * provided by the user at creation time. For Standard Tier instances,
-   * this can be either [location_id] or [alternative_location_id] and can
+   * this can be either [location_id][google.cloud.redis.v1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] and can
    * change after a failover event.
    * 
* @@ -643,4 +641,37 @@ public interface InstanceOrBuilder * @return The bytes for persistenceIamIdentity. */ com.google.protobuf.ByteString getPersistenceIamIdentityBytes(); + + /** + * + * + *
+   * Optional. The connect mode of Redis instance.
+   * If not provided, default one will be used.
+   * Current default: DIRECT_PEERING.
+   * 
+ * + * + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for connectMode. + */ + int getConnectModeValue(); + /** + * + * + *
+   * Optional. The connect mode of Redis instance.
+   * If not provided, default one will be used.
+   * Current default: DIRECT_PEERING.
+   * 
+ * + * + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The connectMode. + */ + com.google.cloud.redis.v1.Instance.ConnectMode getConnectMode(); } diff --git a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequest.java b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequest.java index f99a7ebe..21f42039 100644 --- a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequest.java +++ b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequest.java @@ -189,7 +189,7 @@ public com.google.protobuf.ByteString getParentBytes() { * If not specified, a default value of 1000 will be used by the service. * Regardless of the page_size value, the response may include a partial list * and a caller should only rely on response's - * [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + * [`next_page_token`][google.cloud.redis.v1.ListInstancesResponse.next_page_token] * to determine if there are more instances left to be queried. * * @@ -207,8 +207,8 @@ public int getPageSize() { * * *
-   * The next_page_token value returned from a previous List request,
-   * if any.
+   * The `next_page_token` value returned from a previous
+   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
    * 
* * string page_token = 3; @@ -230,8 +230,8 @@ public java.lang.String getPageToken() { * * *
-   * The next_page_token value returned from a previous List request,
-   * if any.
+   * The `next_page_token` value returned from a previous
+   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
    * 
* * string page_token = 3; @@ -732,7 +732,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * If not specified, a default value of 1000 will be used by the service. * Regardless of the page_size value, the response may include a partial list * and a caller should only rely on response's - * [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + * [`next_page_token`][google.cloud.redis.v1.ListInstancesResponse.next_page_token] * to determine if there are more instances left to be queried. * * @@ -751,7 +751,7 @@ public int getPageSize() { * If not specified, a default value of 1000 will be used by the service. * Regardless of the page_size value, the response may include a partial list * and a caller should only rely on response's - * [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + * [`next_page_token`][google.cloud.redis.v1.ListInstancesResponse.next_page_token] * to determine if there are more instances left to be queried. * * @@ -774,7 +774,7 @@ public Builder setPageSize(int value) { * If not specified, a default value of 1000 will be used by the service. * Regardless of the page_size value, the response may include a partial list * and a caller should only rely on response's - * [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + * [`next_page_token`][google.cloud.redis.v1.ListInstancesResponse.next_page_token] * to determine if there are more instances left to be queried. * * @@ -794,8 +794,8 @@ public Builder clearPageSize() { * * *
-     * The next_page_token value returned from a previous List request,
-     * if any.
+     * The `next_page_token` value returned from a previous
+     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
      * 
* * string page_token = 3; @@ -817,8 +817,8 @@ public java.lang.String getPageToken() { * * *
-     * The next_page_token value returned from a previous List request,
-     * if any.
+     * The `next_page_token` value returned from a previous
+     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
      * 
* * string page_token = 3; @@ -840,8 +840,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * The next_page_token value returned from a previous List request,
-     * if any.
+     * The `next_page_token` value returned from a previous
+     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
      * 
* * string page_token = 3; @@ -862,8 +862,8 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * The next_page_token value returned from a previous List request,
-     * if any.
+     * The `next_page_token` value returned from a previous
+     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
      * 
* * string page_token = 3; @@ -880,8 +880,8 @@ public Builder clearPageToken() { * * *
-     * The next_page_token value returned from a previous List request,
-     * if any.
+     * The `next_page_token` value returned from a previous
+     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
      * 
* * string page_token = 3; diff --git a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequestOrBuilder.java b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequestOrBuilder.java index ba119917..c1e36250 100644 --- a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequestOrBuilder.java +++ b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequestOrBuilder.java @@ -64,7 +64,7 @@ public interface ListInstancesRequestOrBuilder * If not specified, a default value of 1000 will be used by the service. * Regardless of the page_size value, the response may include a partial list * and a caller should only rely on response's - * [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + * [`next_page_token`][google.cloud.redis.v1.ListInstancesResponse.next_page_token] * to determine if there are more instances left to be queried. * * @@ -78,8 +78,8 @@ public interface ListInstancesRequestOrBuilder * * *
-   * The next_page_token value returned from a previous List request,
-   * if any.
+   * The `next_page_token` value returned from a previous
+   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
    * 
* * string page_token = 3; @@ -91,8 +91,8 @@ public interface ListInstancesRequestOrBuilder * * *
-   * The next_page_token value returned from a previous List request,
-   * if any.
+   * The `next_page_token` value returned from a previous
+   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
    * 
* * string page_token = 3; diff --git a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesResponse.java b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesResponse.java index 01061e2f..e7cb9aba 100644 --- a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesResponse.java +++ b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesResponse.java @@ -152,10 +152,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -172,10 +172,10 @@ public java.util.List getInstancesList() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -193,10 +193,10 @@ public java.util.List getInstancesList() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -213,10 +213,10 @@ public int getInstancesCount() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -233,10 +233,10 @@ public com.google.cloud.redis.v1.Instance getInstances(int index) { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -788,10 +788,10 @@ private void ensureInstancesIsMutable() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -812,10 +812,10 @@ public java.util.List getInstancesList() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -836,10 +836,10 @@ public int getInstancesCount() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -860,10 +860,10 @@ public com.google.cloud.redis.v1.Instance getInstances(int index) { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -890,10 +890,10 @@ public Builder setInstances(int index, com.google.cloud.redis.v1.Instance value) * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -918,10 +918,10 @@ public Builder setInstances( * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -948,10 +948,10 @@ public Builder addInstances(com.google.cloud.redis.v1.Instance value) { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -978,10 +978,10 @@ public Builder addInstances(int index, com.google.cloud.redis.v1.Instance value) * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -1005,10 +1005,10 @@ public Builder addInstances(com.google.cloud.redis.v1.Instance.Builder builderFo * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -1033,10 +1033,10 @@ public Builder addInstances( * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -1061,10 +1061,10 @@ public Builder addAllInstances( * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -1088,10 +1088,10 @@ public Builder clearInstances() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -1115,10 +1115,10 @@ public Builder removeInstances(int index) { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -1135,10 +1135,10 @@ public com.google.cloud.redis.v1.Instance.Builder getInstancesBuilder(int index) * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -1159,10 +1159,10 @@ public com.google.cloud.redis.v1.InstanceOrBuilder getInstancesOrBuilder(int ind * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -1184,10 +1184,10 @@ public com.google.cloud.redis.v1.InstanceOrBuilder getInstancesOrBuilder(int ind * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -1205,10 +1205,10 @@ public com.google.cloud.redis.v1.Instance.Builder addInstancesBuilder() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -1226,10 +1226,10 @@ public com.google.cloud.redis.v1.Instance.Builder addInstancesBuilder(int index) * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; diff --git a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesResponseOrBuilder.java b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesResponseOrBuilder.java index 523d5570..682cc5e3 100644 --- a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesResponseOrBuilder.java +++ b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesResponseOrBuilder.java @@ -32,10 +32,10 @@ public interface ListInstancesResponseOrBuilder * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -50,10 +50,10 @@ public interface ListInstancesResponseOrBuilder * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -68,10 +68,10 @@ public interface ListInstancesResponseOrBuilder * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -86,10 +86,10 @@ public interface ListInstancesResponseOrBuilder * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; @@ -104,10 +104,10 @@ public interface ListInstancesResponseOrBuilder * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1.Instance instances = 1; diff --git a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java index ff58b0e6..c79a1452 100644 --- a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java +++ b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java @@ -140,7 +140,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. Mask of fields to update. At least one path must be supplied in
    * this field. The elements of the repeated paths field may only include these
-   * fields from [Instance][CloudRedis.Instance]:
+   * fields from [Instance][google.cloud.redis.v1.Instance]:
    *  *   `displayName`
    *  *   `labels`
    *  *   `memorySizeGb`
@@ -161,7 +161,7 @@ public boolean hasUpdateMask() {
    * 
    * Required. Mask of fields to update. At least one path must be supplied in
    * this field. The elements of the repeated paths field may only include these
-   * fields from [Instance][CloudRedis.Instance]:
+   * fields from [Instance][google.cloud.redis.v1.Instance]:
    *  *   `displayName`
    *  *   `labels`
    *  *   `memorySizeGb`
@@ -182,7 +182,7 @@ public com.google.protobuf.FieldMask getUpdateMask() {
    * 
    * Required. Mask of fields to update. At least one path must be supplied in
    * this field. The elements of the repeated paths field may only include these
-   * fields from [Instance][CloudRedis.Instance]:
+   * fields from [Instance][google.cloud.redis.v1.Instance]:
    *  *   `displayName`
    *  *   `labels`
    *  *   `memorySizeGb`
@@ -614,7 +614,7 @@ public Builder mergeFrom(
      * 
      * Required. Mask of fields to update. At least one path must be supplied in
      * this field. The elements of the repeated paths field may only include these
-     * fields from [Instance][CloudRedis.Instance]:
+     * fields from [Instance][google.cloud.redis.v1.Instance]:
      *  *   `displayName`
      *  *   `labels`
      *  *   `memorySizeGb`
@@ -635,7 +635,7 @@ public boolean hasUpdateMask() {
      * 
      * Required. Mask of fields to update. At least one path must be supplied in
      * this field. The elements of the repeated paths field may only include these
-     * fields from [Instance][CloudRedis.Instance]:
+     * fields from [Instance][google.cloud.redis.v1.Instance]:
      *  *   `displayName`
      *  *   `labels`
      *  *   `memorySizeGb`
@@ -662,7 +662,7 @@ public com.google.protobuf.FieldMask getUpdateMask() {
      * 
      * Required. Mask of fields to update. At least one path must be supplied in
      * this field. The elements of the repeated paths field may only include these
-     * fields from [Instance][CloudRedis.Instance]:
+     * fields from [Instance][google.cloud.redis.v1.Instance]:
      *  *   `displayName`
      *  *   `labels`
      *  *   `memorySizeGb`
@@ -691,7 +691,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) {
      * 
      * Required. Mask of fields to update. At least one path must be supplied in
      * this field. The elements of the repeated paths field may only include these
-     * fields from [Instance][CloudRedis.Instance]:
+     * fields from [Instance][google.cloud.redis.v1.Instance]:
      *  *   `displayName`
      *  *   `labels`
      *  *   `memorySizeGb`
@@ -717,7 +717,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal
      * 
      * Required. Mask of fields to update. At least one path must be supplied in
      * this field. The elements of the repeated paths field may only include these
-     * fields from [Instance][CloudRedis.Instance]:
+     * fields from [Instance][google.cloud.redis.v1.Instance]:
      *  *   `displayName`
      *  *   `labels`
      *  *   `memorySizeGb`
@@ -748,7 +748,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) {
      * 
      * Required. Mask of fields to update. At least one path must be supplied in
      * this field. The elements of the repeated paths field may only include these
-     * fields from [Instance][CloudRedis.Instance]:
+     * fields from [Instance][google.cloud.redis.v1.Instance]:
      *  *   `displayName`
      *  *   `labels`
      *  *   `memorySizeGb`
@@ -775,7 +775,7 @@ public Builder clearUpdateMask() {
      * 
      * Required. Mask of fields to update. At least one path must be supplied in
      * this field. The elements of the repeated paths field may only include these
-     * fields from [Instance][CloudRedis.Instance]:
+     * fields from [Instance][google.cloud.redis.v1.Instance]:
      *  *   `displayName`
      *  *   `labels`
      *  *   `memorySizeGb`
@@ -796,7 +796,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() {
      * 
      * Required. Mask of fields to update. At least one path must be supplied in
      * this field. The elements of the repeated paths field may only include these
-     * fields from [Instance][CloudRedis.Instance]:
+     * fields from [Instance][google.cloud.redis.v1.Instance]:
      *  *   `displayName`
      *  *   `labels`
      *  *   `memorySizeGb`
@@ -821,7 +821,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() {
      * 
      * Required. Mask of fields to update. At least one path must be supplied in
      * this field. The elements of the repeated paths field may only include these
-     * fields from [Instance][CloudRedis.Instance]:
+     * fields from [Instance][google.cloud.redis.v1.Instance]:
      *  *   `displayName`
      *  *   `labels`
      *  *   `memorySizeGb`
diff --git a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequestOrBuilder.java b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequestOrBuilder.java
index 41e34f44..c4496b01 100644
--- a/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequestOrBuilder.java
+++ b/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequestOrBuilder.java
@@ -29,7 +29,7 @@ public interface UpdateInstanceRequestOrBuilder
    * 
    * Required. Mask of fields to update. At least one path must be supplied in
    * this field. The elements of the repeated paths field may only include these
-   * fields from [Instance][CloudRedis.Instance]:
+   * fields from [Instance][google.cloud.redis.v1.Instance]:
    *  *   `displayName`
    *  *   `labels`
    *  *   `memorySizeGb`
@@ -48,7 +48,7 @@ public interface UpdateInstanceRequestOrBuilder
    * 
    * Required. Mask of fields to update. At least one path must be supplied in
    * this field. The elements of the repeated paths field may only include these
-   * fields from [Instance][CloudRedis.Instance]:
+   * fields from [Instance][google.cloud.redis.v1.Instance]:
    *  *   `displayName`
    *  *   `labels`
    *  *   `memorySizeGb`
@@ -67,7 +67,7 @@ public interface UpdateInstanceRequestOrBuilder
    * 
    * Required. Mask of fields to update. At least one path must be supplied in
    * this field. The elements of the repeated paths field may only include these
-   * fields from [Instance][CloudRedis.Instance]:
+   * fields from [Instance][google.cloud.redis.v1.Instance]:
    *  *   `displayName`
    *  *   `labels`
    *  *   `memorySizeGb`
diff --git a/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto b/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto
index 1c9cd495..c16ceb60 100644
--- a/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto
+++ b/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto
@@ -53,6 +53,7 @@ service CloudRedis {
   // location (region) or all locations.
   //
   // The location should have the following format:
+  //
   // * `projects/{project_id}/locations/{location_id}`
   //
   // If `location_id` is specified as `-` (wildcard), then all regions
@@ -230,6 +231,19 @@ message Instance {
     STANDARD_HA = 3;
   }
 
+  // Available connection modes.
+  enum ConnectMode {
+    // Not set.
+    CONNECT_MODE_UNSPECIFIED = 0;
+
+    // Connect via directly peering with memorystore redis hosted service.
+    DIRECT_PEERING = 1;
+
+    // Connect with google via private service access and share connection
+    // across google managed services.
+    PRIVATE_SERVICE_ACCESS = 2;
+  }
+
   // Required. Unique name of the resource in this scope including project and
   // location using the form:
   //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
@@ -237,8 +251,8 @@ message Instance {
   // Note: Redis instances are managed and addressed at regional level so
   // location_id here refers to a GCP region; however, users may choose which
   // specific zone (or collection of zones for cross-zone instances) an instance
-  // should be provisioned in. Refer to [location_id] and
-  // [alternative_location_id] fields for more details.
+  // should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and
+  // [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details.
   string name = 1 [(google.api.field_behavior) = REQUIRED];
 
   // An arbitrary and optional user-provided name for the instance.
@@ -250,19 +264,18 @@ message Instance {
   // Optional. The zone where the instance will be provisioned. If not provided,
   // the service will choose a zone for the instance. For STANDARD_HA tier,
   // instances will be created across two zones for protection against zonal
-  // failures. If [alternative_location_id] is also provided, it must be
-  // different from [location_id].
+  // failures. If [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] is also provided, it must be
+  // different from [location_id][google.cloud.redis.v1.Instance.location_id].
   string location_id = 4 [(google.api.field_behavior) = OPTIONAL];
 
   // Optional. Only applicable to STANDARD_HA tier which protects the instance
   // against zonal failures by provisioning it across two zones. If provided, it
-  // must be a different zone from the one provided in [location_id].
+  // must be a different zone from the one provided in [location_id][google.cloud.redis.v1.Instance.location_id].
   string alternative_location_id = 5 [(google.api.field_behavior) = OPTIONAL];
 
   // Optional. The version of Redis software.
-  // If not provided, latest supported version will be used. Updating the
-  // version will perform an upgrade/downgrade to the new version. Currently,
-  // the supported values are:
+  // If not provided, latest supported version will be used. Currently, the
+  // supported values are:
   //
   //  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
   //  *   `REDIS_3_2` for Redis 3.2 compatibility
@@ -282,9 +295,9 @@ message Instance {
   int32 port = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The current zone where the Redis endpoint is placed. For Basic
-  // Tier instances, this will always be the same as the [location_id]
+  // Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1.Instance.location_id]
   // provided by the user at creation time. For Standard Tier instances,
-  // this can be either [location_id] or [alternative_location_id] and can
+  // this can be either [location_id][google.cloud.redis.v1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] and can
   // change after a failover event.
   string current_location_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
 
@@ -332,6 +345,11 @@ message Instance {
   // for a given instance so should be checked before each import/export
   // operation.
   string persistence_iam_identity = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Optional. The connect mode of Redis instance.
+  // If not provided, default one will be used.
+  // Current default: DIRECT_PEERING.
+  ConnectMode connect_mode = 22 [(google.api.field_behavior) = OPTIONAL];
 }
 
 // Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances].
@@ -351,12 +369,12 @@ message ListInstancesRequest {
   // If not specified, a default value of 1000 will be used by the service.
   // Regardless of the page_size value, the response may include a partial list
   // and a caller should only rely on response's
-  // [next_page_token][CloudRedis.ListInstancesResponse.next_page_token]
+  // [`next_page_token`][google.cloud.redis.v1.ListInstancesResponse.next_page_token]
   // to determine if there are more instances left to be queried.
   int32 page_size = 2;
 
-  // The next_page_token value returned from a previous List request,
-  // if any.
+  // The `next_page_token` value returned from a previous
+  // [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
   string page_token = 3;
 }
 
@@ -368,10 +386,10 @@ message ListInstancesResponse {
   // If the `location_id` in the parent field of the request is "-", all regions
   // available to the project are queried, and the results aggregated.
   // If in such an aggregated query a location is unavailable, a dummy Redis
-  // entry is included in the response with the "name" field set to a value of
-  // the form projects/{project_id}/locations/{location_id}/instances/- and the
-  // "status" field set to ERROR and "status_message" field set to "location not
-  // available for ListInstances".
+  // entry is included in the response with the `name` field set to a value of
+  // the form `projects/{project_id}/locations/{location_id}/instances/`- and
+  // the `status` field set to ERROR and `status_message` field set to "location
+  // not available for ListInstances".
   repeated Instance instances = 1;
 
   // Token to retrieve the next page of results, or empty if there are no more
@@ -425,7 +443,7 @@ message CreateInstanceRequest {
 message UpdateInstanceRequest {
   // Required. Mask of fields to update. At least one path must be supplied in
   // this field. The elements of the repeated paths field may only include these
-  // fields from [Instance][CloudRedis.Instance]:
+  // fields from [Instance][google.cloud.redis.v1.Instance]:
   //
   //  *   `displayName`
   //  *   `labels`
@@ -506,6 +524,7 @@ message ExportInstanceRequest {
 
 // Request for [Failover][google.cloud.redis.v1.CloudRedis.FailoverInstance].
 message FailoverInstanceRequest {
+  // Specifies different modes of operation in relation to the data retention.
   enum DataProtectionMode {
     // Defaults to LIMITED_DATA_LOSS if a data protection mode is not
     // specified.
diff --git a/proto-google-cloud-redis-v1beta1/clirr-ignored-differences.xml b/proto-google-cloud-redis-v1beta1/clirr-ignored-differences.xml
new file mode 100644
index 00000000..29ac83fa
--- /dev/null
+++ b/proto-google-cloud-redis-v1beta1/clirr-ignored-differences.xml
@@ -0,0 +1,19 @@
+
+
+
+  
+    7012
+    com/google/cloud/redis/v1beta1/*OrBuilder
+    * get*(*)
+  
+  
+    7012
+    com/google/cloud/redis/v1beta1/*OrBuilder
+    boolean contains*(*)
+  
+  
+    7012
+    com/google/cloud/redis/v1beta1/*OrBuilder
+    boolean has*(*)
+  
+
diff --git a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisServiceBetaProto.java b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisServiceBetaProto.java
index e0975103..c4682727 100644
--- a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisServiceBetaProto.java
+++ b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisServiceBetaProto.java
@@ -59,6 +59,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
       internal_static_google_cloud_redis_v1beta1_UpdateInstanceRequest_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internal_static_google_cloud_redis_v1beta1_UpdateInstanceRequest_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_redis_v1beta1_UpgradeInstanceRequest_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_redis_v1beta1_UpgradeInstanceRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_cloud_redis_v1beta1_DeleteInstanceRequest_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -119,7 +123,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "to\032\031google/api/resource.proto\032#google/lo"
           + "ngrunning/operations.proto\032 google/proto"
           + "buf/field_mask.proto\032\037google/protobuf/ti"
-          + "mestamp.proto\"\332\010\n\010Instance\022\021\n\004name\030\001 \001(\t"
+          + "mestamp.proto\"\204\n\n\010Instance\022\021\n\004name\030\001 \001(\t"
           + "B\003\340A\002\022\024\n\014display_name\030\002 \001(\t\022@\n\006labels\030\003 "
           + "\003(\01320.google.cloud.redis.v1beta1.Instanc"
           + "e.LabelsEntry\022\030\n\013location_id\030\004 \001(\tB\003\340A\001\022"
@@ -137,112 +141,126 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "ta1.Instance.TierB\003\340A\002\022\033\n\016memory_size_gb"
           + "\030\022 \001(\005B\003\340A\002\022\037\n\022authorized_network\030\024 \001(\tB"
           + "\003\340A\001\022%\n\030persistence_iam_identity\030\025 \001(\tB\003"
-          + "\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value"
-          + "\030\002 \001(\t:\0028\001\0323\n\021RedisConfigsEntry\022\013\n\003key\030\001"
-          + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\224\001\n\005State\022\025\n\021STA"
-          + "TE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020"
-          + "\002\022\014\n\010UPDATING\020\003\022\014\n\010DELETING\020\004\022\r\n\tREPAIRI"
-          + "NG\020\005\022\017\n\013MAINTENANCE\020\006\022\r\n\tIMPORTING\020\010\022\020\n\014"
-          + "FAILING_OVER\020\n\"8\n\004Tier\022\024\n\020TIER_UNSPECIFI"
-          + "ED\020\000\022\t\n\005BASIC\020\001\022\017\n\013STANDARD_HA\020\003:`\352A]\n\035r"
-          + "edis.googleapis.com/Instance\022\"2/v1beta1/{parent=projects/*"
-          + "/locations/*}/instances:\010instance\332A\033pare"
-          + "nt,instance_id,instance\312A:\n#google.cloud"
-          + ".redis.v1beta1.Instance\022\023google.protobuf"
-          + ".Any\022\206\002\n\016UpdateInstance\0221.google.cloud.r"
-          + "edis.v1beta1.UpdateInstanceRequest\032\035.goo"
-          + "gle.longrunning.Operation\"\241\001\202\323\344\223\002G2;/v1b"
-          + "eta1/{instance.name=projects/*/locations"
-          + "/*/instances/*}:\010instance\332A\024update_mask,"
-          + "instance\312A:\n#google.cloud.redis.v1beta1."
-          + "Instance\022\023google.protobuf.Any\022\372\001\n\016Import"
-          + "Instance\0221.google.cloud.redis.v1beta1.Im"
-          + "portInstanceRequest\032\035.google.longrunning"
-          + ".Operation\"\225\001\202\323\344\223\002>\"9/v1beta1/{name=proj"
-          + "ects/*/locations/*/instances/*}:import:\001"
-          + "*\332A\021name,input_config\312A:\n#google.cloud.r"
-          + "edis.v1beta1.Instance\022\023google.protobuf.A"
-          + "ny\022\373\001\n\016ExportInstance\0221.google.cloud.red"
-          + "is.v1beta1.ExportInstanceRequest\032\035.googl"
-          + "e.longrunning.Operation\"\226\001\202\323\344\223\002>\"9/v1bet"
-          + "a1/{name=projects/*/locations/*/instance"
-          + "s/*}:export:\001*\332A\022name,output_config\312A:\n#"
-          + "google.cloud.redis.v1beta1.Instance\022\023goo"
-          + "gle.protobuf.Any\022\210\002\n\020FailoverInstance\0223."
-          + "google.cloud.redis.v1beta1.FailoverInsta"
-          + "nceRequest\032\035.google.longrunning.Operatio"
-          + "n\"\237\001\202\323\344\223\002@\";/v1beta1/{name=projects/*/lo"
-          + "cations/*/instances/*}:failover:\001*\332A\031nam"
-          + "e,data_protection_mode\312A:\n#google.cloud."
+          + "\340A\003\022K\n\014connect_mode\030\026 \001(\01620.google.cloud"
+          + ".redis.v1beta1.Instance.ConnectModeB\003\340A\001"
+          + "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 "
+          + "\001(\t:\0028\001\0323\n\021RedisConfigsEntry\022\013\n\003key\030\001 \001("
+          + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\224\001\n\005State\022\025\n\021STATE_"
+          + "UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\014"
+          + "\n\010UPDATING\020\003\022\014\n\010DELETING\020\004\022\r\n\tREPAIRING\020"
+          + "\005\022\017\n\013MAINTENANCE\020\006\022\r\n\tIMPORTING\020\010\022\020\n\014FAI"
+          + "LING_OVER\020\n\"8\n\004Tier\022\024\n\020TIER_UNSPECIFIED\020"
+          + "\000\022\t\n\005BASIC\020\001\022\017\n\013STANDARD_HA\020\003\"[\n\013Connect"
+          + "Mode\022\034\n\030CONNECT_MODE_UNSPECIFIED\020\000\022\022\n\016DI"
+          + "RECT_PEERING\020\001\022\032\n\026PRIVATE_SERVICE_ACCESS"
+          + "\020\002:`\352A]\n\035redis.googleapis.com/Instance\022<"
+          + "projects/{project}/locations/{location}/"
+          + "instances/{instance}\"x\n\024ListInstancesReq"
+          + "uest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations."
+          + "googleapis.com/Location\022\021\n\tpage_size\030\002 \001"
+          + "(\005\022\022\n\npage_token\030\003 \001(\t\"~\n\025ListInstancesR"
+          + "esponse\0227\n\tinstances\030\001 \003(\0132$.google.clou"
+          + "d.redis.v1beta1.Instance\022\027\n\017next_page_to"
+          + "ken\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"I\n\022GetIns"
+          + "tanceRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035redi"
+          + "s.googleapis.com/Instance\"\251\001\n\025CreateInst"
+          + "anceRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!loc"
+          + "ations.googleapis.com/Location\022\030\n\013instan"
+          + "ce_id\030\002 \001(\tB\003\340A\002\022;\n\010instance\030\003 \001(\0132$.goo"
+          + "gle.cloud.redis.v1beta1.InstanceB\003\340A\002\"\212\001"
+          + "\n\025UpdateInstanceRequest\0224\n\013update_mask\030\001"
+          + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022;\n"
+          + "\010instance\030\002 \001(\0132$.google.cloud.redis.v1b"
+          + "eta1.InstanceB\003\340A\002\"i\n\026UpgradeInstanceReq"
+          + "uest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035redis.google"
+          + "apis.com/Instance\022\032\n\rredis_version\030\002 \001(\t"
+          + "B\003\340A\002\"L\n\025DeleteInstanceRequest\0223\n\004name\030\001"
+          + " \001(\tB%\340A\002\372A\037\n\035redis.googleapis.com/Insta"
+          + "nce\"\035\n\tGcsSource\022\020\n\003uri\030\001 \001(\tB\003\340A\002\"T\n\013In"
+          + "putConfig\022;\n\ngcs_source\030\001 \001(\0132%.google.c"
+          + "loud.redis.v1beta1.GcsSourceH\000B\010\n\006source"
+          + "\"n\n\025ImportInstanceRequest\022\021\n\004name\030\001 \001(\tB"
+          + "\003\340A\002\022B\n\014input_config\030\003 \001(\0132\'.google.clou"
+          + "d.redis.v1beta1.InputConfigB\003\340A\002\"\"\n\016GcsD"
+          + "estination\022\020\n\003uri\030\001 \001(\tB\003\340A\002\"d\n\014OutputCo"
+          + "nfig\022E\n\017gcs_destination\030\001 \001(\0132*.google.c"
+          + "loud.redis.v1beta1.GcsDestinationH\000B\r\n\013d"
+          + "estination\"p\n\025ExportInstanceRequest\022\021\n\004n"
+          + "ame\030\001 \001(\tB\003\340A\002\022D\n\routput_config\030\003 \001(\0132(."
+          + "google.cloud.redis.v1beta1.OutputConfigB"
+          + "\003\340A\002\"\241\002\n\027FailoverInstanceRequest\0223\n\004name"
+          + "\030\001 \001(\tB%\340A\002\372A\037\n\035redis.googleapis.com/Ins"
+          + "tance\022i\n\024data_protection_mode\030\002 \001(\0162F.go"
+          + "ogle.cloud.redis.v1beta1.FailoverInstanc"
+          + "eRequest.DataProtectionModeB\003\340A\001\"f\n\022Data"
+          + "ProtectionMode\022$\n DATA_PROTECTION_MODE_U"
+          + "NSPECIFIED\020\000\022\025\n\021LIMITED_DATA_LOSS\020\001\022\023\n\017F"
+          + "ORCE_DATA_LOSS\020\002\"\323\001\n\020LocationMetadata\022^\n"
+          + "\017available_zones\030\001 \003(\0132@.google.cloud.re"
+          + "dis.v1beta1.LocationMetadata.AvailableZo"
+          + "nesEntryB\003\340A\003\032_\n\023AvailableZonesEntry\022\013\n\003"
+          + "key\030\001 \001(\t\0227\n\005value\030\002 \001(\0132(.google.cloud."
+          + "redis.v1beta1.ZoneMetadata:\0028\001\"\016\n\014ZoneMe"
+          + "tadata2\251\021\n\nCloudRedis\022\271\001\n\rListInstances\022"
+          + "0.google.cloud.redis.v1beta1.ListInstanc"
+          + "esRequest\0321.google.cloud.redis.v1beta1.L"
+          + "istInstancesResponse\"C\202\323\344\223\0024\0222/v1beta1/{"
+          + "parent=projects/*/locations/*}/instances"
+          + "\332A\006parent\022\246\001\n\013GetInstance\022..google.cloud"
+          + ".redis.v1beta1.GetInstanceRequest\032$.goog"
+          + "le.cloud.redis.v1beta1.Instance\"A\202\323\344\223\0024\022"
+          + "2/v1beta1/{name=projects/*/locations/*/i"
+          + "nstances/*}\332A\004name\022\204\002\n\016CreateInstance\0221."
+          + "google.cloud.redis.v1beta1.CreateInstanc"
+          + "eRequest\032\035.google.longrunning.Operation\""
+          + "\237\001\202\323\344\223\002>\"2/v1beta1/{parent=projects/*/lo"
+          + "cations/*}/instances:\010instance\332A\033parent,"
+          + "instance_id,instance\312A:\n#google.cloud.re"
+          + "dis.v1beta1.Instance\022\023google.protobuf.An"
+          + "y\022\206\002\n\016UpdateInstance\0221.google.cloud.redi"
+          + "s.v1beta1.UpdateInstanceRequest\032\035.google"
+          + ".longrunning.Operation\"\241\001\202\323\344\223\002G2;/v1beta"
+          + "1/{instance.name=projects/*/locations/*/"
+          + "instances/*}:\010instance\332A\024update_mask,ins"
+          + "tance\312A:\n#google.cloud.redis.v1beta1.Ins"
+          + "tance\022\023google.protobuf.Any\022\376\001\n\017UpgradeIn"
+          + "stance\0222.google.cloud.redis.v1beta1.Upgr"
+          + "adeInstanceRequest\032\035.google.longrunning."
+          + "Operation\"\227\001\202\323\344\223\002?\":/v1beta1/{name=proje"
+          + "cts/*/locations/*/instances/*}:upgrade:\001"
+          + "*\332A\022name,redis_version\312A:\n#google.cloud."
           + "redis.v1beta1.Instance\022\023google.protobuf."
-          + "Any\022\324\001\n\016DeleteInstance\0221.google.cloud.re"
-          + "dis.v1beta1.DeleteInstanceRequest\032\035.goog"
-          + "le.longrunning.Operation\"p\202\323\344\223\0024*2/v1bet"
-          + "a1/{name=projects/*/locations/*/instance"
-          + "s/*}\332A\004name\312A,\n\025google.protobuf.Empty\022\023g"
-          + "oogle.protobuf.Any\032H\312A\024redis.googleapis."
-          + "com\322A.https://www.googleapis.com/auth/cl"
-          + "oud-platformB\177\n\036com.google.cloud.redis.v"
-          + "1beta1B\032CloudRedisServiceBetaProtoP\001Z?go"
-          + "ogle.golang.org/genproto/googleapis/clou"
-          + "d/redis/v1beta1;redisb\006proto3"
+          + "Any\022\372\001\n\016ImportInstance\0221.google.cloud.re"
+          + "dis.v1beta1.ImportInstanceRequest\032\035.goog"
+          + "le.longrunning.Operation\"\225\001\202\323\344\223\002>\"9/v1be"
+          + "ta1/{name=projects/*/locations/*/instanc"
+          + "es/*}:import:\001*\332A\021name,input_config\312A:\n#"
+          + "google.cloud.redis.v1beta1.Instance\022\023goo"
+          + "gle.protobuf.Any\022\373\001\n\016ExportInstance\0221.go"
+          + "ogle.cloud.redis.v1beta1.ExportInstanceR"
+          + "equest\032\035.google.longrunning.Operation\"\226\001"
+          + "\202\323\344\223\002>\"9/v1beta1/{name=projects/*/locati"
+          + "ons/*/instances/*}:export:\001*\332A\022name,outp"
+          + "ut_config\312A:\n#google.cloud.redis.v1beta1"
+          + ".Instance\022\023google.protobuf.Any\022\210\002\n\020Failo"
+          + "verInstance\0223.google.cloud.redis.v1beta1"
+          + ".FailoverInstanceRequest\032\035.google.longru"
+          + "nning.Operation\"\237\001\202\323\344\223\002@\";/v1beta1/{name"
+          + "=projects/*/locations/*/instances/*}:fai"
+          + "lover:\001*\332A\031name,data_protection_mode\312A:\n"
+          + "#google.cloud.redis.v1beta1.Instance\022\023go"
+          + "ogle.protobuf.Any\022\324\001\n\016DeleteInstance\0221.g"
+          + "oogle.cloud.redis.v1beta1.DeleteInstance"
+          + "Request\032\035.google.longrunning.Operation\"p"
+          + "\202\323\344\223\0024*2/v1beta1/{name=projects/*/locati"
+          + "ons/*/instances/*}\332A\004name\312A,\n\025google.pro"
+          + "tobuf.Empty\022\023google.protobuf.Any\032H\312A\024red"
+          + "is.googleapis.com\322A.https://www.googleap"
+          + "is.com/auth/cloud-platformB\177\n\036com.google"
+          + ".cloud.redis.v1beta1B\032CloudRedisServiceB"
+          + "etaProtoP\001Z?google.golang.org/genproto/g"
+          + "oogleapis/cloud/redis/v1beta1;redisb\006pro"
+          + "to3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -280,6 +298,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "MemorySizeGb",
               "AuthorizedNetwork",
               "PersistenceIamIdentity",
+              "ConnectMode",
             });
     internal_static_google_cloud_redis_v1beta1_Instance_LabelsEntry_descriptor =
         internal_static_google_cloud_redis_v1beta1_Instance_descriptor.getNestedTypes().get(0);
@@ -337,8 +356,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
             new java.lang.String[] {
               "UpdateMask", "Instance",
             });
-    internal_static_google_cloud_redis_v1beta1_DeleteInstanceRequest_descriptor =
+    internal_static_google_cloud_redis_v1beta1_UpgradeInstanceRequest_descriptor =
         getDescriptor().getMessageTypes().get(6);
+    internal_static_google_cloud_redis_v1beta1_UpgradeInstanceRequest_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_redis_v1beta1_UpgradeInstanceRequest_descriptor,
+            new java.lang.String[] {
+              "Name", "RedisVersion",
+            });
+    internal_static_google_cloud_redis_v1beta1_DeleteInstanceRequest_descriptor =
+        getDescriptor().getMessageTypes().get(7);
     internal_static_google_cloud_redis_v1beta1_DeleteInstanceRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_cloud_redis_v1beta1_DeleteInstanceRequest_descriptor,
@@ -346,7 +373,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Name",
             });
     internal_static_google_cloud_redis_v1beta1_GcsSource_descriptor =
-        getDescriptor().getMessageTypes().get(7);
+        getDescriptor().getMessageTypes().get(8);
     internal_static_google_cloud_redis_v1beta1_GcsSource_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_cloud_redis_v1beta1_GcsSource_descriptor,
@@ -354,7 +381,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Uri",
             });
     internal_static_google_cloud_redis_v1beta1_InputConfig_descriptor =
-        getDescriptor().getMessageTypes().get(8);
+        getDescriptor().getMessageTypes().get(9);
     internal_static_google_cloud_redis_v1beta1_InputConfig_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_cloud_redis_v1beta1_InputConfig_descriptor,
@@ -362,7 +389,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "GcsSource", "Source",
             });
     internal_static_google_cloud_redis_v1beta1_ImportInstanceRequest_descriptor =
-        getDescriptor().getMessageTypes().get(9);
+        getDescriptor().getMessageTypes().get(10);
     internal_static_google_cloud_redis_v1beta1_ImportInstanceRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_cloud_redis_v1beta1_ImportInstanceRequest_descriptor,
@@ -370,7 +397,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Name", "InputConfig",
             });
     internal_static_google_cloud_redis_v1beta1_GcsDestination_descriptor =
-        getDescriptor().getMessageTypes().get(10);
+        getDescriptor().getMessageTypes().get(11);
     internal_static_google_cloud_redis_v1beta1_GcsDestination_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_cloud_redis_v1beta1_GcsDestination_descriptor,
@@ -378,7 +405,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Uri",
             });
     internal_static_google_cloud_redis_v1beta1_OutputConfig_descriptor =
-        getDescriptor().getMessageTypes().get(11);
+        getDescriptor().getMessageTypes().get(12);
     internal_static_google_cloud_redis_v1beta1_OutputConfig_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_cloud_redis_v1beta1_OutputConfig_descriptor,
@@ -386,7 +413,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "GcsDestination", "Destination",
             });
     internal_static_google_cloud_redis_v1beta1_ExportInstanceRequest_descriptor =
-        getDescriptor().getMessageTypes().get(12);
+        getDescriptor().getMessageTypes().get(13);
     internal_static_google_cloud_redis_v1beta1_ExportInstanceRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_cloud_redis_v1beta1_ExportInstanceRequest_descriptor,
@@ -394,7 +421,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Name", "OutputConfig",
             });
     internal_static_google_cloud_redis_v1beta1_FailoverInstanceRequest_descriptor =
-        getDescriptor().getMessageTypes().get(13);
+        getDescriptor().getMessageTypes().get(14);
     internal_static_google_cloud_redis_v1beta1_FailoverInstanceRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_cloud_redis_v1beta1_FailoverInstanceRequest_descriptor,
@@ -402,7 +429,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Name", "DataProtectionMode",
             });
     internal_static_google_cloud_redis_v1beta1_LocationMetadata_descriptor =
-        getDescriptor().getMessageTypes().get(14);
+        getDescriptor().getMessageTypes().get(15);
     internal_static_google_cloud_redis_v1beta1_LocationMetadata_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_cloud_redis_v1beta1_LocationMetadata_descriptor,
@@ -420,7 +447,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Key", "Value",
             });
     internal_static_google_cloud_redis_v1beta1_ZoneMetadata_descriptor =
-        getDescriptor().getMessageTypes().get(15);
+        getDescriptor().getMessageTypes().get(16);
     internal_static_google_cloud_redis_v1beta1_ZoneMetadata_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_cloud_redis_v1beta1_ZoneMetadata_descriptor,
diff --git a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/FailoverInstanceRequest.java b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/FailoverInstanceRequest.java
index cbece506..4173e885 100644
--- a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/FailoverInstanceRequest.java
+++ b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/FailoverInstanceRequest.java
@@ -119,7 +119,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             com.google.cloud.redis.v1beta1.FailoverInstanceRequest.Builder.class);
   }
 
-  /** Protobuf enum {@code google.cloud.redis.v1beta1.FailoverInstanceRequest.DataProtectionMode} */
+  /**
+   *
+   *
+   * 
+   * Specifies different modes of operation in relation to the data retention.
+   * 
+ * + * Protobuf enum {@code google.cloud.redis.v1beta1.FailoverInstanceRequest.DataProtectionMode} + */ public enum DataProtectionMode implements com.google.protobuf.ProtocolMessageEnum { /** * diff --git a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/Instance.java b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/Instance.java index fda8c71d..e88ce0c2 100644 --- a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/Instance.java +++ b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/Instance.java @@ -51,6 +51,7 @@ private Instance() { tier_ = 0; authorizedNetwork_ = ""; persistenceIamIdentity_ = ""; + connectMode_ = 0; } @java.lang.Override @@ -227,6 +228,13 @@ private Instance( persistenceIamIdentity_ = s; break; } + case 176: + { + int rawValue = input.readEnum(); + + connectMode_ = rawValue; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -716,6 +724,161 @@ private Tier(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1beta1.Instance.Tier) } + /** + * + * + *
+   * Available connection modes.
+   * 
+ * + * Protobuf enum {@code google.cloud.redis.v1beta1.Instance.ConnectMode} + */ + public enum ConnectMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * CONNECT_MODE_UNSPECIFIED = 0; + */ + CONNECT_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Connect via directly peering with memorystore redis hosted service.
+     * 
+ * + * DIRECT_PEERING = 1; + */ + DIRECT_PEERING(1), + /** + * + * + *
+     * Connect with google via private service access and share connection
+     * across google managed services.
+     * 
+ * + * PRIVATE_SERVICE_ACCESS = 2; + */ + PRIVATE_SERVICE_ACCESS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * CONNECT_MODE_UNSPECIFIED = 0; + */ + public static final int CONNECT_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Connect via directly peering with memorystore redis hosted service.
+     * 
+ * + * DIRECT_PEERING = 1; + */ + public static final int DIRECT_PEERING_VALUE = 1; + /** + * + * + *
+     * Connect with google via private service access and share connection
+     * across google managed services.
+     * 
+ * + * PRIVATE_SERVICE_ACCESS = 2; + */ + public static final int PRIVATE_SERVICE_ACCESS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConnectMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ConnectMode forNumber(int value) { + switch (value) { + case 0: + return CONNECT_MODE_UNSPECIFIED; + case 1: + return DIRECT_PEERING; + case 2: + return PRIVATE_SERVICE_ACCESS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ConnectMode findValueByNumber(int number) { + return ConnectMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.v1beta1.Instance.getDescriptor().getEnumTypes().get(2); + } + + private static final ConnectMode[] VALUES = values(); + + public static ConnectMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ConnectMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1beta1.Instance.ConnectMode) + } + public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -728,8 +891,8 @@ private Tier(int value) { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. *
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -757,8 +920,8 @@ public java.lang.String getName() { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. *
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -926,8 +1089,8 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1beta1.Instance.location_id]. *
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -952,8 +1115,8 @@ public java.lang.String getLocationId() { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1beta1.Instance.location_id]. *
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -980,7 +1143,7 @@ public com.google.protobuf.ByteString getLocationIdBytes() { *
    * Optional. Only applicable to STANDARD_HA tier which protects the instance
    * against zonal failures by provisioning it across two zones. If provided, it
-   * must be a different zone from the one provided in [location_id].
+   * must be a different zone from the one provided in [location_id][google.cloud.redis.v1beta1.Instance.location_id].
    * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1004,7 +1167,7 @@ public java.lang.String getAlternativeLocationId() { *
    * Optional. Only applicable to STANDARD_HA tier which protects the instance
    * against zonal failures by provisioning it across two zones. If provided, it
-   * must be a different zone from the one provided in [location_id].
+   * must be a different zone from the one provided in [location_id][google.cloud.redis.v1beta1.Instance.location_id].
    * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1030,9 +1193,8 @@ public com.google.protobuf.ByteString getAlternativeLocationIdBytes() { * *
    * Optional. The version of Redis software.
-   * If not provided, latest supported version will be used. Updating the
-   * version will perform an upgrade/downgrade to the new version. Currently,
-   * the supported values are:
+   * If not provided, latest supported version will be used. Currently, the
+   * supported values are:
    *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
    *  *   `REDIS_3_2` for Redis 3.2 compatibility
    * 
@@ -1057,9 +1219,8 @@ public java.lang.String getRedisVersion() { * *
    * Optional. The version of Redis software.
-   * If not provided, latest supported version will be used. Updating the
-   * version will perform an upgrade/downgrade to the new version. Currently,
-   * the supported values are:
+   * If not provided, latest supported version will be used. Currently, the
+   * supported values are:
    *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
    *  *   `REDIS_3_2` for Redis 3.2 compatibility
    * 
@@ -1206,9 +1367,9 @@ public int getPort() { * *
    * Output only. The current zone where the Redis endpoint is placed. For Basic
-   * Tier instances, this will always be the same as the [location_id]
+   * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1beta1.Instance.location_id]
    * provided by the user at creation time. For Standard Tier instances,
-   * this can be either [location_id] or [alternative_location_id] and can
+   * this can be either [location_id][google.cloud.redis.v1beta1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] and can
    * change after a failover event.
    * 
* @@ -1232,9 +1393,9 @@ public java.lang.String getCurrentLocationId() { * *
    * Output only. The current zone where the Redis endpoint is placed. For Basic
-   * Tier instances, this will always be the same as the [location_id]
+   * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1beta1.Instance.location_id]
    * provided by the user at creation time. For Standard Tier instances,
-   * this can be either [location_id] or [alternative_location_id] and can
+   * this can be either [location_id][google.cloud.redis.v1beta1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] and can
    * change after a failover event.
    * 
* @@ -1686,6 +1847,50 @@ public com.google.protobuf.ByteString getPersistenceIamIdentityBytes() { } } + public static final int CONNECT_MODE_FIELD_NUMBER = 22; + private int connectMode_; + /** + * + * + *
+   * Optional. The connect mode of Redis instance.
+   * If not provided, default one will be used.
+   * Current default: DIRECT_PEERING.
+   * 
+ * + * + * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for connectMode. + */ + public int getConnectModeValue() { + return connectMode_; + } + /** + * + * + *
+   * Optional. The connect mode of Redis instance.
+   * If not provided, default one will be used.
+   * Current default: DIRECT_PEERING.
+   * 
+ * + * + * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The connectMode. + */ + public com.google.cloud.redis.v1beta1.Instance.ConnectMode getConnectMode() { + @SuppressWarnings("deprecation") + com.google.cloud.redis.v1beta1.Instance.ConnectMode result = + com.google.cloud.redis.v1beta1.Instance.ConnectMode.valueOf(connectMode_); + return result == null + ? com.google.cloud.redis.v1beta1.Instance.ConnectMode.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1752,6 +1957,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getPersistenceIamIdentityBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 21, persistenceIamIdentity_); } + if (connectMode_ + != com.google.cloud.redis.v1beta1.Instance.ConnectMode.CONNECT_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(22, connectMode_); + } unknownFields.writeTo(output); } @@ -1829,6 +2039,11 @@ public int getSerializedSize() { if (!getPersistenceIamIdentityBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, persistenceIamIdentity_); } + if (connectMode_ + != com.google.cloud.redis.v1beta1.Instance.ConnectMode.CONNECT_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, connectMode_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1865,6 +2080,7 @@ public boolean equals(final java.lang.Object obj) { if (getMemorySizeGb() != other.getMemorySizeGb()) return false; if (!getAuthorizedNetwork().equals(other.getAuthorizedNetwork())) return false; if (!getPersistenceIamIdentity().equals(other.getPersistenceIamIdentity())) return false; + if (connectMode_ != other.connectMode_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1918,6 +2134,8 @@ public int hashCode() { hash = (53 * hash) + getAuthorizedNetwork().hashCode(); hash = (37 * hash) + PERSISTENCE_IAM_IDENTITY_FIELD_NUMBER; hash = (53 * hash) + getPersistenceIamIdentity().hashCode(); + hash = (37 * hash) + CONNECT_MODE_FIELD_NUMBER; + hash = (53 * hash) + connectMode_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2125,6 +2343,8 @@ public Builder clear() { persistenceIamIdentity_ = ""; + connectMode_ = 0; + return this; } @@ -2177,6 +2397,7 @@ public com.google.cloud.redis.v1beta1.Instance buildPartial() { result.memorySizeGb_ = memorySizeGb_; result.authorizedNetwork_ = authorizedNetwork_; result.persistenceIamIdentity_ = persistenceIamIdentity_; + result.connectMode_ = connectMode_; onBuilt(); return result; } @@ -2287,6 +2508,9 @@ public Builder mergeFrom(com.google.cloud.redis.v1beta1.Instance other) { persistenceIamIdentity_ = other.persistenceIamIdentity_; onChanged(); } + if (other.connectMode_ != 0) { + setConnectModeValue(other.getConnectModeValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2329,8 +2553,8 @@ public Builder mergeFrom( * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. *
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2358,8 +2582,8 @@ public java.lang.String getName() { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. *
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2387,8 +2611,8 @@ public com.google.protobuf.ByteString getNameBytes() { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. *
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2415,8 +2639,8 @@ public Builder setName(java.lang.String value) { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. *
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2439,8 +2663,8 @@ public Builder clearName() { * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. *
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2725,8 +2949,8 @@ public Builder putAllLabels(java.util.Map va * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1beta1.Instance.location_id]. *
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2751,8 +2975,8 @@ public java.lang.String getLocationId() { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1beta1.Instance.location_id]. *
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2777,8 +3001,8 @@ public com.google.protobuf.ByteString getLocationIdBytes() { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1beta1.Instance.location_id]. *
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2802,8 +3026,8 @@ public Builder setLocationId(java.lang.String value) { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1beta1.Instance.location_id]. *
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2823,8 +3047,8 @@ public Builder clearLocationId() { * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1beta1.Instance.location_id]. *
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2850,7 +3074,7 @@ public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { *
      * Optional. Only applicable to STANDARD_HA tier which protects the instance
      * against zonal failures by provisioning it across two zones. If provided, it
-     * must be a different zone from the one provided in [location_id].
+     * must be a different zone from the one provided in [location_id][google.cloud.redis.v1beta1.Instance.location_id].
      * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2874,7 +3098,7 @@ public java.lang.String getAlternativeLocationId() { *
      * Optional. Only applicable to STANDARD_HA tier which protects the instance
      * against zonal failures by provisioning it across two zones. If provided, it
-     * must be a different zone from the one provided in [location_id].
+     * must be a different zone from the one provided in [location_id][google.cloud.redis.v1beta1.Instance.location_id].
      * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2898,7 +3122,7 @@ public com.google.protobuf.ByteString getAlternativeLocationIdBytes() { *
      * Optional. Only applicable to STANDARD_HA tier which protects the instance
      * against zonal failures by provisioning it across two zones. If provided, it
-     * must be a different zone from the one provided in [location_id].
+     * must be a different zone from the one provided in [location_id][google.cloud.redis.v1beta1.Instance.location_id].
      * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2921,7 +3145,7 @@ public Builder setAlternativeLocationId(java.lang.String value) { *
      * Optional. Only applicable to STANDARD_HA tier which protects the instance
      * against zonal failures by provisioning it across two zones. If provided, it
-     * must be a different zone from the one provided in [location_id].
+     * must be a different zone from the one provided in [location_id][google.cloud.redis.v1beta1.Instance.location_id].
      * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2940,7 +3164,7 @@ public Builder clearAlternativeLocationId() { *
      * Optional. Only applicable to STANDARD_HA tier which protects the instance
      * against zonal failures by provisioning it across two zones. If provided, it
-     * must be a different zone from the one provided in [location_id].
+     * must be a different zone from the one provided in [location_id][google.cloud.redis.v1beta1.Instance.location_id].
      * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2965,9 +3189,8 @@ public Builder setAlternativeLocationIdBytes(com.google.protobuf.ByteString valu * *
      * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Updating the
-     * version will perform an upgrade/downgrade to the new version. Currently,
-     * the supported values are:
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
      *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
      *  *   `REDIS_3_2` for Redis 3.2 compatibility
      * 
@@ -2992,9 +3215,8 @@ public java.lang.String getRedisVersion() { * *
      * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Updating the
-     * version will perform an upgrade/downgrade to the new version. Currently,
-     * the supported values are:
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
      *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
      *  *   `REDIS_3_2` for Redis 3.2 compatibility
      * 
@@ -3019,9 +3241,8 @@ public com.google.protobuf.ByteString getRedisVersionBytes() { * *
      * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Updating the
-     * version will perform an upgrade/downgrade to the new version. Currently,
-     * the supported values are:
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
      *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
      *  *   `REDIS_3_2` for Redis 3.2 compatibility
      * 
@@ -3045,9 +3266,8 @@ public Builder setRedisVersion(java.lang.String value) { * *
      * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Updating the
-     * version will perform an upgrade/downgrade to the new version. Currently,
-     * the supported values are:
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
      *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
      *  *   `REDIS_3_2` for Redis 3.2 compatibility
      * 
@@ -3067,9 +3287,8 @@ public Builder clearRedisVersion() { * *
      * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Updating the
-     * version will perform an upgrade/downgrade to the new version. Currently,
-     * the supported values are:
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
      *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
      *  *   `REDIS_3_2` for Redis 3.2 compatibility
      * 
@@ -3379,9 +3598,9 @@ public Builder clearPort() { * *
      * Output only. The current zone where the Redis endpoint is placed. For Basic
-     * Tier instances, this will always be the same as the [location_id]
+     * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1beta1.Instance.location_id]
      * provided by the user at creation time. For Standard Tier instances,
-     * this can be either [location_id] or [alternative_location_id] and can
+     * this can be either [location_id][google.cloud.redis.v1beta1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] and can
      * change after a failover event.
      * 
* @@ -3405,9 +3624,9 @@ public java.lang.String getCurrentLocationId() { * *
      * Output only. The current zone where the Redis endpoint is placed. For Basic
-     * Tier instances, this will always be the same as the [location_id]
+     * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1beta1.Instance.location_id]
      * provided by the user at creation time. For Standard Tier instances,
-     * this can be either [location_id] or [alternative_location_id] and can
+     * this can be either [location_id][google.cloud.redis.v1beta1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] and can
      * change after a failover event.
      * 
* @@ -3431,9 +3650,9 @@ public com.google.protobuf.ByteString getCurrentLocationIdBytes() { * *
      * Output only. The current zone where the Redis endpoint is placed. For Basic
-     * Tier instances, this will always be the same as the [location_id]
+     * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1beta1.Instance.location_id]
      * provided by the user at creation time. For Standard Tier instances,
-     * this can be either [location_id] or [alternative_location_id] and can
+     * this can be either [location_id][google.cloud.redis.v1beta1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] and can
      * change after a failover event.
      * 
* @@ -3456,9 +3675,9 @@ public Builder setCurrentLocationId(java.lang.String value) { * *
      * Output only. The current zone where the Redis endpoint is placed. For Basic
-     * Tier instances, this will always be the same as the [location_id]
+     * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1beta1.Instance.location_id]
      * provided by the user at creation time. For Standard Tier instances,
-     * this can be either [location_id] or [alternative_location_id] and can
+     * this can be either [location_id][google.cloud.redis.v1beta1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] and can
      * change after a failover event.
      * 
* @@ -3477,9 +3696,9 @@ public Builder clearCurrentLocationId() { * *
      * Output only. The current zone where the Redis endpoint is placed. For Basic
-     * Tier instances, this will always be the same as the [location_id]
+     * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1beta1.Instance.location_id]
      * provided by the user at creation time. For Standard Tier instances,
-     * this can be either [location_id] or [alternative_location_id] and can
+     * this can be either [location_id][google.cloud.redis.v1beta1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] and can
      * change after a failover event.
      * 
* @@ -4535,6 +4754,116 @@ public Builder setPersistenceIamIdentityBytes(com.google.protobuf.ByteString val return this; } + private int connectMode_ = 0; + /** + * + * + *
+     * Optional. The connect mode of Redis instance.
+     * If not provided, default one will be used.
+     * Current default: DIRECT_PEERING.
+     * 
+ * + * + * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for connectMode. + */ + public int getConnectModeValue() { + return connectMode_; + } + /** + * + * + *
+     * Optional. The connect mode of Redis instance.
+     * If not provided, default one will be used.
+     * Current default: DIRECT_PEERING.
+     * 
+ * + * + * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for connectMode to set. + * @return This builder for chaining. + */ + public Builder setConnectModeValue(int value) { + connectMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The connect mode of Redis instance.
+     * If not provided, default one will be used.
+     * Current default: DIRECT_PEERING.
+     * 
+ * + * + * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The connectMode. + */ + public com.google.cloud.redis.v1beta1.Instance.ConnectMode getConnectMode() { + @SuppressWarnings("deprecation") + com.google.cloud.redis.v1beta1.Instance.ConnectMode result = + com.google.cloud.redis.v1beta1.Instance.ConnectMode.valueOf(connectMode_); + return result == null + ? com.google.cloud.redis.v1beta1.Instance.ConnectMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The connect mode of Redis instance.
+     * If not provided, default one will be used.
+     * Current default: DIRECT_PEERING.
+     * 
+ * + * + * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The connectMode to set. + * @return This builder for chaining. + */ + public Builder setConnectMode(com.google.cloud.redis.v1beta1.Instance.ConnectMode value) { + if (value == null) { + throw new NullPointerException(); + } + + connectMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The connect mode of Redis instance.
+     * If not provided, default one will be used.
+     * Current default: DIRECT_PEERING.
+     * 
+ * + * + * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearConnectMode() { + + connectMode_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/InstanceOrBuilder.java b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/InstanceOrBuilder.java index a00a9d92..663691f3 100644 --- a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/InstanceOrBuilder.java +++ b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/InstanceOrBuilder.java @@ -33,8 +33,8 @@ public interface InstanceOrBuilder * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. *
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -52,8 +52,8 @@ public interface InstanceOrBuilder * Note: Redis instances are managed and addressed at regional level so * location_id here refers to a GCP region; however, users may choose which * specific zone (or collection of zones for cross-zone instances) an instance - * should be provisioned in. Refer to [location_id] and - * [alternative_location_id] fields for more details. + * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and + * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. * * * string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -148,8 +148,8 @@ public interface InstanceOrBuilder * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1beta1.Instance.location_id]. * * * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -164,8 +164,8 @@ public interface InstanceOrBuilder * Optional. The zone where the instance will be provisioned. If not provided, * the service will choose a zone for the instance. For STANDARD_HA tier, * instances will be created across two zones for protection against zonal - * failures. If [alternative_location_id] is also provided, it must be - * different from [location_id]. + * failures. If [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] is also provided, it must be + * different from [location_id][google.cloud.redis.v1beta1.Instance.location_id]. * * * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -180,7 +180,7 @@ public interface InstanceOrBuilder *
    * Optional. Only applicable to STANDARD_HA tier which protects the instance
    * against zonal failures by provisioning it across two zones. If provided, it
-   * must be a different zone from the one provided in [location_id].
+   * must be a different zone from the one provided in [location_id][google.cloud.redis.v1beta1.Instance.location_id].
    * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -194,7 +194,7 @@ public interface InstanceOrBuilder *
    * Optional. Only applicable to STANDARD_HA tier which protects the instance
    * against zonal failures by provisioning it across two zones. If provided, it
-   * must be a different zone from the one provided in [location_id].
+   * must be a different zone from the one provided in [location_id][google.cloud.redis.v1beta1.Instance.location_id].
    * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -208,9 +208,8 @@ public interface InstanceOrBuilder * *
    * Optional. The version of Redis software.
-   * If not provided, latest supported version will be used. Updating the
-   * version will perform an upgrade/downgrade to the new version. Currently,
-   * the supported values are:
+   * If not provided, latest supported version will be used. Currently, the
+   * supported values are:
    *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
    *  *   `REDIS_3_2` for Redis 3.2 compatibility
    * 
@@ -225,9 +224,8 @@ public interface InstanceOrBuilder * *
    * Optional. The version of Redis software.
-   * If not provided, latest supported version will be used. Updating the
-   * version will perform an upgrade/downgrade to the new version. Currently,
-   * the supported values are:
+   * If not provided, latest supported version will be used. Currently, the
+   * supported values are:
    *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
    *  *   `REDIS_3_2` for Redis 3.2 compatibility
    * 
@@ -314,9 +312,9 @@ public interface InstanceOrBuilder * *
    * Output only. The current zone where the Redis endpoint is placed. For Basic
-   * Tier instances, this will always be the same as the [location_id]
+   * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1beta1.Instance.location_id]
    * provided by the user at creation time. For Standard Tier instances,
-   * this can be either [location_id] or [alternative_location_id] and can
+   * this can be either [location_id][google.cloud.redis.v1beta1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] and can
    * change after a failover event.
    * 
* @@ -330,9 +328,9 @@ public interface InstanceOrBuilder * *
    * Output only. The current zone where the Redis endpoint is placed. For Basic
-   * Tier instances, this will always be the same as the [location_id]
+   * Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1beta1.Instance.location_id]
    * provided by the user at creation time. For Standard Tier instances,
-   * this can be either [location_id] or [alternative_location_id] and can
+   * this can be either [location_id][google.cloud.redis.v1beta1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] and can
    * change after a failover event.
    * 
* @@ -645,4 +643,37 @@ public interface InstanceOrBuilder * @return The bytes for persistenceIamIdentity. */ com.google.protobuf.ByteString getPersistenceIamIdentityBytes(); + + /** + * + * + *
+   * Optional. The connect mode of Redis instance.
+   * If not provided, default one will be used.
+   * Current default: DIRECT_PEERING.
+   * 
+ * + * + * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for connectMode. + */ + int getConnectModeValue(); + /** + * + * + *
+   * Optional. The connect mode of Redis instance.
+   * If not provided, default one will be used.
+   * Current default: DIRECT_PEERING.
+   * 
+ * + * + * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The connectMode. + */ + com.google.cloud.redis.v1beta1.Instance.ConnectMode getConnectMode(); } diff --git a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesRequest.java b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesRequest.java index c092288b..320bcdd8 100644 --- a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesRequest.java +++ b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesRequest.java @@ -189,7 +189,7 @@ public com.google.protobuf.ByteString getParentBytes() { * If not specified, a default value of 1000 will be used by the service. * Regardless of the page_size value, the response may include a partial list * and a caller should only rely on response's - * [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + * [`next_page_token`][google.cloud.redis.v1beta1.ListInstancesResponse.next_page_token] * to determine if there are more instances left to be queried. * * @@ -207,8 +207,8 @@ public int getPageSize() { * * *
-   * The next_page_token value returned from a previous List request,
-   * if any.
+   * The `next_page_token` value returned from a previous
+   * [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any.
    * 
* * string page_token = 3; @@ -230,8 +230,8 @@ public java.lang.String getPageToken() { * * *
-   * The next_page_token value returned from a previous List request,
-   * if any.
+   * The `next_page_token` value returned from a previous
+   * [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any.
    * 
* * string page_token = 3; @@ -734,7 +734,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * If not specified, a default value of 1000 will be used by the service. * Regardless of the page_size value, the response may include a partial list * and a caller should only rely on response's - * [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + * [`next_page_token`][google.cloud.redis.v1beta1.ListInstancesResponse.next_page_token] * to determine if there are more instances left to be queried. * * @@ -753,7 +753,7 @@ public int getPageSize() { * If not specified, a default value of 1000 will be used by the service. * Regardless of the page_size value, the response may include a partial list * and a caller should only rely on response's - * [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + * [`next_page_token`][google.cloud.redis.v1beta1.ListInstancesResponse.next_page_token] * to determine if there are more instances left to be queried. * * @@ -776,7 +776,7 @@ public Builder setPageSize(int value) { * If not specified, a default value of 1000 will be used by the service. * Regardless of the page_size value, the response may include a partial list * and a caller should only rely on response's - * [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + * [`next_page_token`][google.cloud.redis.v1beta1.ListInstancesResponse.next_page_token] * to determine if there are more instances left to be queried. * * @@ -796,8 +796,8 @@ public Builder clearPageSize() { * * *
-     * The next_page_token value returned from a previous List request,
-     * if any.
+     * The `next_page_token` value returned from a previous
+     * [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any.
      * 
* * string page_token = 3; @@ -819,8 +819,8 @@ public java.lang.String getPageToken() { * * *
-     * The next_page_token value returned from a previous List request,
-     * if any.
+     * The `next_page_token` value returned from a previous
+     * [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any.
      * 
* * string page_token = 3; @@ -842,8 +842,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * The next_page_token value returned from a previous List request,
-     * if any.
+     * The `next_page_token` value returned from a previous
+     * [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any.
      * 
* * string page_token = 3; @@ -864,8 +864,8 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * The next_page_token value returned from a previous List request,
-     * if any.
+     * The `next_page_token` value returned from a previous
+     * [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any.
      * 
* * string page_token = 3; @@ -882,8 +882,8 @@ public Builder clearPageToken() { * * *
-     * The next_page_token value returned from a previous List request,
-     * if any.
+     * The `next_page_token` value returned from a previous
+     * [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any.
      * 
* * string page_token = 3; diff --git a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesRequestOrBuilder.java b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesRequestOrBuilder.java index ea15c74b..f9704d18 100644 --- a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesRequestOrBuilder.java +++ b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesRequestOrBuilder.java @@ -64,7 +64,7 @@ public interface ListInstancesRequestOrBuilder * If not specified, a default value of 1000 will be used by the service. * Regardless of the page_size value, the response may include a partial list * and a caller should only rely on response's - * [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + * [`next_page_token`][google.cloud.redis.v1beta1.ListInstancesResponse.next_page_token] * to determine if there are more instances left to be queried. * * @@ -78,8 +78,8 @@ public interface ListInstancesRequestOrBuilder * * *
-   * The next_page_token value returned from a previous List request,
-   * if any.
+   * The `next_page_token` value returned from a previous
+   * [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any.
    * 
* * string page_token = 3; @@ -91,8 +91,8 @@ public interface ListInstancesRequestOrBuilder * * *
-   * The next_page_token value returned from a previous List request,
-   * if any.
+   * The `next_page_token` value returned from a previous
+   * [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any.
    * 
* * string page_token = 3; diff --git a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesResponse.java b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesResponse.java index d354d476..6ae2050d 100644 --- a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesResponse.java +++ b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesResponse.java @@ -152,10 +152,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -172,10 +172,10 @@ public java.util.List getInstancesList( * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -193,10 +193,10 @@ public java.util.List getInstancesList( * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -213,10 +213,10 @@ public int getInstancesCount() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -233,10 +233,10 @@ public com.google.cloud.redis.v1beta1.Instance getInstances(int index) { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -789,10 +789,10 @@ private void ensureInstancesIsMutable() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -813,10 +813,10 @@ public java.util.List getInstancesList( * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -837,10 +837,10 @@ public int getInstancesCount() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -861,10 +861,10 @@ public com.google.cloud.redis.v1beta1.Instance getInstances(int index) { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -891,10 +891,10 @@ public Builder setInstances(int index, com.google.cloud.redis.v1beta1.Instance v * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -919,10 +919,10 @@ public Builder setInstances( * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -949,10 +949,10 @@ public Builder addInstances(com.google.cloud.redis.v1beta1.Instance value) { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -979,10 +979,10 @@ public Builder addInstances(int index, com.google.cloud.redis.v1beta1.Instance v * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -1006,10 +1006,10 @@ public Builder addInstances(com.google.cloud.redis.v1beta1.Instance.Builder buil * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -1034,10 +1034,10 @@ public Builder addInstances( * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -1062,10 +1062,10 @@ public Builder addAllInstances( * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -1089,10 +1089,10 @@ public Builder clearInstances() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -1116,10 +1116,10 @@ public Builder removeInstances(int index) { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -1136,10 +1136,10 @@ public com.google.cloud.redis.v1beta1.Instance.Builder getInstancesBuilder(int i * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -1160,10 +1160,10 @@ public com.google.cloud.redis.v1beta1.InstanceOrBuilder getInstancesOrBuilder(in * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -1185,10 +1185,10 @@ public com.google.cloud.redis.v1beta1.InstanceOrBuilder getInstancesOrBuilder(in * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -1206,10 +1206,10 @@ public com.google.cloud.redis.v1beta1.Instance.Builder addInstancesBuilder() { * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -1227,10 +1227,10 @@ public com.google.cloud.redis.v1beta1.Instance.Builder addInstancesBuilder(int i * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; diff --git a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesResponseOrBuilder.java b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesResponseOrBuilder.java index a0f62f49..a63bcd4f 100644 --- a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesResponseOrBuilder.java +++ b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/ListInstancesResponseOrBuilder.java @@ -32,10 +32,10 @@ public interface ListInstancesResponseOrBuilder * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -50,10 +50,10 @@ public interface ListInstancesResponseOrBuilder * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -68,10 +68,10 @@ public interface ListInstancesResponseOrBuilder * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -86,10 +86,10 @@ public interface ListInstancesResponseOrBuilder * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; @@ -105,10 +105,10 @@ public interface ListInstancesResponseOrBuilder * If the `location_id` in the parent field of the request is "-", all regions * available to the project are queried, and the results aggregated. * If in such an aggregated query a location is unavailable, a dummy Redis - * entry is included in the response with the "name" field set to a value of - * the form projects/{project_id}/locations/{location_id}/instances/- and the - * "status" field set to ERROR and "status_message" field set to "location not - * available for ListInstances". + * entry is included in the response with the `name` field set to a value of + * the form `projects/{project_id}/locations/{location_id}/instances/`- and + * the `status` field set to ERROR and `status_message` field set to "location + * not available for ListInstances". * * * repeated .google.cloud.redis.v1beta1.Instance instances = 1; diff --git a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/UpgradeInstanceRequest.java b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/UpgradeInstanceRequest.java new file mode 100644 index 00000000..d438296b --- /dev/null +++ b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/UpgradeInstanceRequest.java @@ -0,0 +1,840 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/v1beta1/cloud_redis.proto + +package com.google.cloud.redis.v1beta1; + +/** + * + * + *
+ * Request for [UpgradeInstance][google.cloud.redis.v1beta1.CloudRedis.UpgradeInstance].
+ * 
+ * + * Protobuf type {@code google.cloud.redis.v1beta1.UpgradeInstanceRequest} + */ +public final class UpgradeInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.v1beta1.UpgradeInstanceRequest) + UpgradeInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeInstanceRequest.newBuilder() to construct. + private UpgradeInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeInstanceRequest() { + name_ = ""; + redisVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpgradeInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + redisVersion_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto + .internal_static_google_cloud_redis_v1beta1_UpgradeInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto + .internal_static_google_cloud_redis_v1beta1_UpgradeInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest.class, + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Redis instance resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Redis instance resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REDIS_VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object redisVersion_; + /** + * + * + *
+   * Required. Specifies the target version of Redis software to upgrade to.
+   * 
+ * + * string redis_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The redisVersion. + */ + public java.lang.String getRedisVersion() { + java.lang.Object ref = redisVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + redisVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Specifies the target version of Redis software to upgrade to.
+   * 
+ * + * string redis_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for redisVersion. + */ + public com.google.protobuf.ByteString getRedisVersionBytes() { + java.lang.Object ref = redisVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + redisVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRedisVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, redisVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getRedisVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, redisVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.v1beta1.UpgradeInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest other = + (com.google.cloud.redis.v1beta1.UpgradeInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRedisVersion().equals(other.getRedisVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REDIS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getRedisVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for [UpgradeInstance][google.cloud.redis.v1beta1.CloudRedis.UpgradeInstance].
+   * 
+ * + * Protobuf type {@code google.cloud.redis.v1beta1.UpgradeInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.v1beta1.UpgradeInstanceRequest) + com.google.cloud.redis.v1beta1.UpgradeInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto + .internal_static_google_cloud_redis_v1beta1_UpgradeInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto + .internal_static_google_cloud_redis_v1beta1_UpgradeInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest.class, + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.redis.v1beta1.UpgradeInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + redisVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto + .internal_static_google_cloud_redis_v1beta1_UpgradeInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.v1beta1.UpgradeInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.redis.v1beta1.UpgradeInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.v1beta1.UpgradeInstanceRequest build() { + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.v1beta1.UpgradeInstanceRequest buildPartial() { + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest result = + new com.google.cloud.redis.v1beta1.UpgradeInstanceRequest(this); + result.name_ = name_; + result.redisVersion_ = redisVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.v1beta1.UpgradeInstanceRequest) { + return mergeFrom((com.google.cloud.redis.v1beta1.UpgradeInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.v1beta1.UpgradeInstanceRequest other) { + if (other == com.google.cloud.redis.v1beta1.UpgradeInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRedisVersion().isEmpty()) { + redisVersion_ = other.redisVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.redis.v1beta1.UpgradeInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.redis.v1beta1.UpgradeInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Redis instance resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Redis instance resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Redis instance resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Redis instance resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Redis instance resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object redisVersion_ = ""; + /** + * + * + *
+     * Required. Specifies the target version of Redis software to upgrade to.
+     * 
+ * + * string redis_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The redisVersion. + */ + public java.lang.String getRedisVersion() { + java.lang.Object ref = redisVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + redisVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Specifies the target version of Redis software to upgrade to.
+     * 
+ * + * string redis_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for redisVersion. + */ + public com.google.protobuf.ByteString getRedisVersionBytes() { + java.lang.Object ref = redisVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + redisVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Specifies the target version of Redis software to upgrade to.
+     * 
+ * + * string redis_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The redisVersion to set. + * @return This builder for chaining. + */ + public Builder setRedisVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + redisVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specifies the target version of Redis software to upgrade to.
+     * 
+ * + * string redis_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRedisVersion() { + + redisVersion_ = getDefaultInstance().getRedisVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specifies the target version of Redis software to upgrade to.
+     * 
+ * + * string redis_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for redisVersion to set. + * @return This builder for chaining. + */ + public Builder setRedisVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + redisVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.v1beta1.UpgradeInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.v1beta1.UpgradeInstanceRequest) + private static final com.google.cloud.redis.v1beta1.UpgradeInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.v1beta1.UpgradeInstanceRequest(); + } + + public static com.google.cloud.redis.v1beta1.UpgradeInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpgradeInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.v1beta1.UpgradeInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/UpgradeInstanceRequestOrBuilder.java b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/UpgradeInstanceRequestOrBuilder.java new file mode 100644 index 00000000..3e0c6ef3 --- /dev/null +++ b/proto-google-cloud-redis-v1beta1/src/main/java/com/google/cloud/redis/v1beta1/UpgradeInstanceRequestOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/v1beta1/cloud_redis.proto + +package com.google.cloud.redis.v1beta1; + +public interface UpgradeInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.v1beta1.UpgradeInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Redis instance resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Redis instance resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Specifies the target version of Redis software to upgrade to.
+   * 
+ * + * string redis_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The redisVersion. + */ + java.lang.String getRedisVersion(); + /** + * + * + *
+   * Required. Specifies the target version of Redis software to upgrade to.
+   * 
+ * + * string redis_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for redisVersion. + */ + com.google.protobuf.ByteString getRedisVersionBytes(); +} diff --git a/proto-google-cloud-redis-v1beta1/src/main/proto/google/cloud/redis/v1beta1/cloud_redis.proto b/proto-google-cloud-redis-v1beta1/src/main/proto/google/cloud/redis/v1beta1/cloud_redis.proto index eafd8eb4..968523fe 100644 --- a/proto-google-cloud-redis-v1beta1/src/main/proto/google/cloud/redis/v1beta1/cloud_redis.proto +++ b/proto-google-cloud-redis-v1beta1/src/main/proto/google/cloud/redis/v1beta1/cloud_redis.proto @@ -53,6 +53,7 @@ service CloudRedis { // location (region) or all locations. // // The location should have the following format: + // // * `projects/{project_id}/locations/{location_id}` // // If `location_id` is specified as `-` (wildcard), then all regions @@ -113,6 +114,20 @@ service CloudRedis { }; } + // Upgrades Redis instance to the newer Redis version specified in the + // request. + rpc UpgradeInstance(UpgradeInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/instances/*}:upgrade" + body: "*" + }; + option (google.api.method_signature) = "name,redis_version"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.redis.v1beta1.Instance" + metadata_type: "google.protobuf.Any" + }; + } + // Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. // // Redis may stop serving during this operation. Instance state will be @@ -230,6 +245,19 @@ message Instance { STANDARD_HA = 3; } + // Available connection modes. + enum ConnectMode { + // Not set. + CONNECT_MODE_UNSPECIFIED = 0; + + // Connect via directly peering with memorystore redis hosted service. + DIRECT_PEERING = 1; + + // Connect with google via private service access and share connection + // across google managed services. + PRIVATE_SERVICE_ACCESS = 2; + } + // Required. Unique name of the resource in this scope including project and // location using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` @@ -237,8 +265,8 @@ message Instance { // Note: Redis instances are managed and addressed at regional level so // location_id here refers to a GCP region; however, users may choose which // specific zone (or collection of zones for cross-zone instances) an instance - // should be provisioned in. Refer to [location_id] and - // [alternative_location_id] fields for more details. + // should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and + // [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. string name = 1 [(google.api.field_behavior) = REQUIRED]; // An arbitrary and optional user-provided name for the instance. @@ -250,19 +278,18 @@ message Instance { // Optional. The zone where the instance will be provisioned. If not provided, // the service will choose a zone for the instance. For STANDARD_HA tier, // instances will be created across two zones for protection against zonal - // failures. If [alternative_location_id] is also provided, it must be - // different from [location_id]. + // failures. If [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] is also provided, it must be + // different from [location_id][google.cloud.redis.v1beta1.Instance.location_id]. string location_id = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Only applicable to STANDARD_HA tier which protects the instance // against zonal failures by provisioning it across two zones. If provided, it - // must be a different zone from the one provided in [location_id]. + // must be a different zone from the one provided in [location_id][google.cloud.redis.v1beta1.Instance.location_id]. string alternative_location_id = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. The version of Redis software. - // If not provided, latest supported version will be used. Updating the - // version will perform an upgrade/downgrade to the new version. Currently, - // the supported values are: + // If not provided, latest supported version will be used. Currently, the + // supported values are: // // * `REDIS_4_0` for Redis 4.0 compatibility (default) // * `REDIS_3_2` for Redis 3.2 compatibility @@ -282,9 +309,9 @@ message Instance { int32 port = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current zone where the Redis endpoint is placed. For Basic - // Tier instances, this will always be the same as the [location_id] + // Tier instances, this will always be the same as the [location_id][google.cloud.redis.v1beta1.Instance.location_id] // provided by the user at creation time. For Standard Tier instances, - // this can be either [location_id] or [alternative_location_id] and can + // this can be either [location_id][google.cloud.redis.v1beta1.Instance.location_id] or [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] and can // change after a failover event. string current_location_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -332,6 +359,11 @@ message Instance { // for a given instance so should be checked before each import/export // operation. string persistence_iam_identity = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The connect mode of Redis instance. + // If not provided, default one will be used. + // Current default: DIRECT_PEERING. + ConnectMode connect_mode = 22 [(google.api.field_behavior) = OPTIONAL]; } // Request for [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances]. @@ -351,12 +383,12 @@ message ListInstancesRequest { // If not specified, a default value of 1000 will be used by the service. // Regardless of the page_size value, the response may include a partial list // and a caller should only rely on response's - // [next_page_token][CloudRedis.ListInstancesResponse.next_page_token] + // [`next_page_token`][google.cloud.redis.v1beta1.ListInstancesResponse.next_page_token] // to determine if there are more instances left to be queried. int32 page_size = 2; - // The next_page_token value returned from a previous List request, - // if any. + // The `next_page_token` value returned from a previous + // [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any. string page_token = 3; } @@ -368,10 +400,10 @@ message ListInstancesResponse { // If the `location_id` in the parent field of the request is "-", all regions // available to the project are queried, and the results aggregated. // If in such an aggregated query a location is unavailable, a dummy Redis - // entry is included in the response with the "name" field set to a value of - // the form projects/{project_id}/locations/{location_id}/instances/- and the - // "status" field set to ERROR and "status_message" field set to "location not - // available for ListInstances". + // entry is included in the response with the `name` field set to a value of + // the form `projects/{project_id}/locations/{location_id}/instances/`- and + // the `status` field set to ERROR and `status_message` field set to "location + // not available for ListInstances". repeated Instance instances = 1; // Token to retrieve the next page of results, or empty if there are no more @@ -438,6 +470,22 @@ message UpdateInstanceRequest { Instance instance = 2 [(google.api.field_behavior) = REQUIRED]; } +// Request for [UpgradeInstance][google.cloud.redis.v1beta1.CloudRedis.UpgradeInstance]. +message UpgradeInstanceRequest { + // Required. Redis instance resource name using the form: + // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + // where `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "redis.googleapis.com/Instance" + } + ]; + + // Required. Specifies the target version of Redis software to upgrade to. + string redis_version = 2 [(google.api.field_behavior) = REQUIRED]; +} + // Request for [DeleteInstance][google.cloud.redis.v1beta1.CloudRedis.DeleteInstance]. message DeleteInstanceRequest { // Required. Redis instance resource name using the form: @@ -506,6 +554,7 @@ message ExportInstanceRequest { // Request for [Failover][google.cloud.redis.v1beta1.CloudRedis.FailoverInstance]. message FailoverInstanceRequest { + // Specifies different modes of operation in relation to the data retention. enum DataProtectionMode { // Defaults to LIMITED_DATA_LOSS if a data protection mode is not // specified. diff --git a/synth.metadata b/synth.metadata index d39ddce1..6ea997e2 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2020-02-03T23:20:17.869807Z", + "updateTime": "2020-02-05T08:59:46.510803Z", "sources": [ { "generator": { @@ -12,9 +12,9 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "29d40b78e3dc1579b0b209463fbcb76e5767f72a", - "internalRef": "292979741", - "log": "29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\n" + "sha": "a8ed9d921fdddc61d8467bfd7c1668f0ad90435c", + "internalRef": "293257997", + "log": "a8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n" } }, {