diff --git a/java-redis/README.md b/java-redis/README.md index df7fe3777ada..352f810a76ae 100644 --- a/java-redis/README.md +++ b/java-redis/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.11.0 + 26.14.0 pom import @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-redis.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis/2.17.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis/2.19.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-redis/google-cloud-redis/pom.xml b/java-redis/google-cloud-redis/pom.xml index afa566ceca3c..0a48013a0aa0 100644 --- a/java-redis/google-cloud-redis/pom.xml +++ b/java-redis/google-cloud-redis/pom.xml @@ -91,6 +91,10 @@ grpc-google-cloud-redis-v1 test + + com.google.api.grpc + grpc-google-common-protos + com.google.api diff --git a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java index 1de16383906a..b03d467be03a 100644 --- a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java +++ b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java @@ -28,6 +28,10 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.redis.v1.stub.CloudRedisStub; import com.google.cloud.redis.v1.stub.CloudRedisStubSettings; import com.google.common.util.concurrent.MoreExecutors; @@ -1966,6 +1970,161 @@ public final OperationFuture rescheduleMaintenanceA return stub.rescheduleMaintenanceCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : cloudRedisClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = cloudRedisClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = cloudRedisClient.getLocation(request);
+   * }
+   * }
+ * + * @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 + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = cloudRedisClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + @Override public final void close() { stub.close(); @@ -2071,4 +2230,80 @@ protected ListInstancesFixedSizeCollection createCollection( return new ListInstancesFixedSizeCollection(pages, collectionSize); } } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisSettings.java b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisSettings.java index d42be913dc7b..d709277f7d9a 100644 --- a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisSettings.java +++ b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisSettings.java @@ -17,6 +17,7 @@ package com.google.cloud.redis.v1; import static com.google.cloud.redis.v1.CloudRedisClient.ListInstancesPagedResponse; +import static com.google.cloud.redis.v1.CloudRedisClient.ListLocationsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; @@ -31,6 +32,10 @@ import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.redis.v1.stub.CloudRedisStubSettings; import com.google.longrunning.Operation; import com.google.protobuf.Empty; @@ -183,6 +188,17 @@ public UnaryCallSettings deleteInstanceSetting return ((CloudRedisStubSettings) getStubSettings()).rescheduleMaintenanceOperationSettings(); } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((CloudRedisStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((CloudRedisStubSettings) getStubSettings()).getLocationSettings(); + } + public static final CloudRedisSettings create(CloudRedisStubSettings stub) throws IOException { return new CloudRedisSettings.Builder(stub.toBuilder()).build(); } @@ -405,6 +421,18 @@ public UnaryCallSettings.Builder deleteInstanc return getStubSettingsBuilder().rescheduleMaintenanceOperationSettings(); } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + @Override public CloudRedisSettings build() throws IOException { return new CloudRedisSettings(this); diff --git a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/gapic_metadata.json b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/gapic_metadata.json index 112b26927b9a..59c1ae6782aa 100644 --- a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/gapic_metadata.json +++ b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/gapic_metadata.json @@ -28,12 +28,18 @@ "GetInstanceAuthString": { "methods": ["getInstanceAuthString", "getInstanceAuthString", "getInstanceAuthString", "getInstanceAuthStringCallable"] }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, "ImportInstance": { "methods": ["importInstanceAsync", "importInstanceAsync", "importInstanceOperationCallable", "importInstanceCallable"] }, "ListInstances": { "methods": ["listInstances", "listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, "RescheduleMaintenance": { "methods": ["rescheduleMaintenanceAsync", "rescheduleMaintenanceAsync", "rescheduleMaintenanceAsync", "rescheduleMaintenanceOperationCallable", "rescheduleMaintenanceCallable"] }, diff --git a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStub.java b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStub.java index 0548825145ae..2eb4812393f6 100644 --- a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStub.java +++ b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStub.java @@ -17,10 +17,15 @@ package com.google.cloud.redis.v1.stub; import static com.google.cloud.redis.v1.CloudRedisClient.ListInstancesPagedResponse; +import static com.google.cloud.redis.v1.CloudRedisClient.ListLocationsPagedResponse; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.redis.v1.CreateInstanceRequest; import com.google.cloud.redis.v1.DeleteInstanceRequest; import com.google.cloud.redis.v1.ExportInstanceRequest; @@ -149,6 +154,19 @@ public UnaryCallable rescheduleMaintena throw new UnsupportedOperationException("Not implemented: rescheduleMaintenanceCallable()"); } + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + @Override public abstract void close(); } diff --git a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java index d4df3cebd12e..4b083b40bd37 100644 --- a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java +++ b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java @@ -17,6 +17,7 @@ package com.google.cloud.redis.v1.stub; import static com.google.cloud.redis.v1.CloudRedisClient.ListInstancesPagedResponse; +import static com.google.cloud.redis.v1.CloudRedisClient.ListLocationsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; @@ -47,6 +48,10 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.redis.v1.CreateInstanceRequest; import com.google.cloud.redis.v1.DeleteInstanceRequest; import com.google.cloud.redis.v1.ExportInstanceRequest; @@ -146,6 +151,10 @@ public class CloudRedisStubSettings extends StubSettings rescheduleMaintenanceSettings; private final OperationCallSettings rescheduleMaintenanceOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; private static final PagedListDescriptor LIST_INSTANCES_PAGE_STR_DESC = @@ -183,6 +192,42 @@ public Iterable extractResources(ListInstancesResponse payload) { } }; + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + private static final PagedListResponseFactory< ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> LIST_INSTANCES_PAGE_STR_FACT = @@ -200,6 +245,23 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to listInstances. */ public PagedCallSettings listInstancesSettings() { @@ -306,6 +368,17 @@ public UnaryCallSettings deleteInstanceSetting return rescheduleMaintenanceOperationSettings; } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + public CloudRedisStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -432,6 +505,8 @@ protected CloudRedisStubSettings(Builder settingsBuilder) throws IOException { rescheduleMaintenanceSettings = settingsBuilder.rescheduleMaintenanceSettings().build(); rescheduleMaintenanceOperationSettings = settingsBuilder.rescheduleMaintenanceOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); } /** Builder for CloudRedisStubSettings. */ @@ -477,6 +552,10 @@ public static class Builder extends StubSettings.Builder rescheduleMaintenanceOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -485,6 +564,7 @@ public static class Builder extends StubSettings.BuildernewArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -501,6 +581,8 @@ public static class Builder extends StubSettings.Builder>of( @@ -543,7 +627,9 @@ protected Builder(ClientContext clientContext) { exportInstanceSettings, failoverInstanceSettings, deleteInstanceSettings, - rescheduleMaintenanceSettings); + rescheduleMaintenanceSettings, + listLocationsSettings, + getLocationSettings); initDefaults(this); } @@ -570,6 +656,8 @@ protected Builder(CloudRedisStubSettings settings) { rescheduleMaintenanceSettings = settings.rescheduleMaintenanceSettings.toBuilder(); rescheduleMaintenanceOperationSettings = settings.rescheduleMaintenanceOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -583,7 +671,9 @@ protected Builder(CloudRedisStubSettings settings) { exportInstanceSettings, failoverInstanceSettings, deleteInstanceSettings, - rescheduleMaintenanceSettings); + rescheduleMaintenanceSettings, + listLocationsSettings, + getLocationSettings); } private static Builder createDefault() { @@ -668,6 +758,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createInstanceOperationSettings() .setInitialCallSettings( @@ -1002,6 +1102,18 @@ public UnaryCallSettings.Builder deleteInstanc return rescheduleMaintenanceOperationSettings; } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + @Override public CloudRedisStubSettings build() throws IOException { return new CloudRedisStubSettings(this); diff --git a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/GrpcCloudRedisStub.java b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/GrpcCloudRedisStub.java index 528e750ab339..2bb49933169c 100644 --- a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/GrpcCloudRedisStub.java +++ b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/GrpcCloudRedisStub.java @@ -17,6 +17,7 @@ package com.google.cloud.redis.v1.stub; import static com.google.cloud.redis.v1.CloudRedisClient.ListInstancesPagedResponse; +import static com.google.cloud.redis.v1.CloudRedisClient.ListLocationsPagedResponse; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -25,6 +26,10 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.redis.v1.CreateInstanceRequest; import com.google.cloud.redis.v1.DeleteInstanceRequest; import com.google.cloud.redis.v1.ExportInstanceRequest; @@ -167,6 +172,25 @@ public class GrpcCloudRedisStub extends CloudRedisStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + private final UnaryCallable listInstancesCallable; private final UnaryCallable listInstancesPagedCallable; @@ -198,6 +222,10 @@ public class GrpcCloudRedisStub extends CloudRedisStub { rescheduleMaintenanceCallable; private final OperationCallable rescheduleMaintenanceOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -353,6 +381,26 @@ protected GrpcCloudRedisStub( return params.build(); }) .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); this.listInstancesCallable = callableFactory.createUnaryCallable( @@ -442,6 +490,15 @@ protected GrpcCloudRedisStub( settings.rescheduleMaintenanceOperationSettings(), clientContext, operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -561,6 +618,22 @@ public UnaryCallable rescheduleMaintena return rescheduleMaintenanceOperationCallable; } + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + @Override public final void close() { try { diff --git a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/HttpJsonCloudRedisStub.java b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/HttpJsonCloudRedisStub.java index afc7a8066844..d029604a11c3 100644 --- a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/HttpJsonCloudRedisStub.java +++ b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/HttpJsonCloudRedisStub.java @@ -17,6 +17,7 @@ package com.google.cloud.redis.v1.stub; import static com.google.cloud.redis.v1.CloudRedisClient.ListInstancesPagedResponse; +import static com.google.cloud.redis.v1.CloudRedisClient.ListLocationsPagedResponse; import com.google.api.HttpRule; import com.google.api.core.BetaApi; @@ -34,6 +35,10 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.redis.v1.CreateInstanceRequest; import com.google.cloud.redis.v1.DeleteInstanceRequest; import com.google.cloud.redis.v1.ExportInstanceRequest; @@ -501,6 +506,74 @@ public class HttpJsonCloudRedisStub extends CloudRedisStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable listInstancesCallable; private final UnaryCallable listInstancesPagedCallable; @@ -532,6 +605,10 @@ public class HttpJsonCloudRedisStub extends CloudRedisStub { rescheduleMaintenanceCallable; private final OperationCallable rescheduleMaintenanceOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; @@ -661,6 +738,17 @@ protected HttpJsonCloudRedisStub( .setMethodDescriptor(rescheduleMaintenanceMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); this.listInstancesCallable = callableFactory.createUnaryCallable( @@ -750,6 +838,15 @@ protected HttpJsonCloudRedisStub( settings.rescheduleMaintenanceOperationSettings(), clientContext, httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -769,6 +866,8 @@ public static List getMethodDescriptors() { methodDescriptors.add(failoverInstanceMethodDescriptor); methodDescriptors.add(deleteInstanceMethodDescriptor); methodDescriptors.add(rescheduleMaintenanceMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } @@ -886,6 +985,22 @@ public UnaryCallable rescheduleMaintena return rescheduleMaintenanceOperationCallable; } + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + @Override public final void close() { try { diff --git a/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientHttpJsonTest.java b/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientHttpJsonTest.java index 752b107c8dc6..8cec4460c100 100644 --- a/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientHttpJsonTest.java +++ b/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientHttpJsonTest.java @@ -17,6 +17,7 @@ package com.google.cloud.redis.v1; import static com.google.cloud.redis.v1.CloudRedisClient.ListInstancesPagedResponse; +import static com.google.cloud.redis.v1.CloudRedisClient.ListLocationsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.httpjson.GaxHttpJsonProperties; @@ -27,6 +28,10 @@ import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.redis.v1.stub.HttpJsonCloudRedisStub; import com.google.common.collect.Lists; import com.google.longrunning.Operation; @@ -211,6 +216,11 @@ public void getInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -279,6 +289,11 @@ public void getInstanceTest2() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -431,6 +446,11 @@ public void createInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -508,6 +528,11 @@ public void createInstanceTest2() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -585,6 +610,11 @@ public void updateInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -622,6 +652,11 @@ public void updateInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Instance actualResponse = client.updateInstanceAsync(updateMask, instance).get(); @@ -678,6 +713,11 @@ public void updateInstanceExceptionTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); client.updateInstanceAsync(updateMask, instance).get(); Assert.fail("No exception raised"); @@ -714,6 +754,11 @@ public void upgradeInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -789,6 +834,11 @@ public void upgradeInstanceTest2() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -864,6 +914,11 @@ public void importInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -939,6 +994,11 @@ public void exportInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1014,6 +1074,11 @@ public void failoverInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1091,6 +1156,11 @@ public void failoverInstanceTest2() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1258,6 +1328,11 @@ public void rescheduleMaintenanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1338,6 +1413,11 @@ public void rescheduleMaintenanceTest2() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1388,4 +1468,120 @@ public void rescheduleMaintenanceExceptionTest2() throws Exception { } catch (ExecutionException e) { } } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java b/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java index 01d8d30cbe2b..3e517a3d4e6b 100644 --- a/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java +++ b/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java @@ -17,6 +17,7 @@ package com.google.cloud.redis.v1; import static com.google.cloud.redis.v1.CloudRedisClient.ListInstancesPagedResponse; +import static com.google.cloud.redis.v1.CloudRedisClient.ListLocationsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -26,6 +27,10 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; @@ -52,6 +57,7 @@ @Generated("by gapic-generator-java") public class CloudRedisClientTest { private static MockCloudRedis mockCloudRedis; + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private CloudRedisClient client; @@ -59,9 +65,11 @@ public class CloudRedisClientTest { @BeforeClass public static void startStaticServer() { mockCloudRedis = new MockCloudRedis(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockCloudRedis)); + UUID.randomUUID().toString(), + Arrays.asList(mockCloudRedis, mockLocations)); mockServiceHelper.start(); } @@ -204,6 +212,11 @@ public void getInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); mockCloudRedis.addResponse(expectedResponse); @@ -266,6 +279,11 @@ public void getInstanceTest2() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); mockCloudRedis.addResponse(expectedResponse); @@ -402,6 +420,11 @@ public void createInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -478,6 +501,11 @@ public void createInstanceTest2() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -554,6 +582,11 @@ public void updateInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -627,6 +660,11 @@ public void upgradeInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -700,6 +738,11 @@ public void upgradeInstanceTest2() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -773,6 +816,11 @@ public void importInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -846,6 +894,11 @@ public void exportInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -919,6 +972,11 @@ public void failoverInstanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -994,6 +1052,11 @@ public void failoverInstanceTest2() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1153,6 +1216,11 @@ public void rescheduleMaintenanceTest() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1233,6 +1301,11 @@ public void rescheduleMaintenanceTest2() throws Exception { .addAllNodes(new ArrayList()) .setReadEndpoint("readEndpoint294053195") .setReadEndpointPort(-1676143102) + .setCustomerManagedKey("customerManagedKey-848978754") + .setPersistenceConfig(PersistenceConfig.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setMaintenanceVersion("maintenanceVersion1355658821") + .addAllAvailableMaintenanceVersions(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1283,4 +1356,105 @@ public void rescheduleMaintenanceExceptionTest2() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/MockLocations.java b/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/MockLocations.java new file mode 100644 index 000000000000..76d352a89b85 --- /dev/null +++ b/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 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. + */ + +package com.google.cloud.redis.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/MockLocationsImpl.java b/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..9a6b4a9d58bb --- /dev/null +++ b/java-redis/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 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. + */ + +package com.google.cloud.redis.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java index f6b4a3bb1293..5d6f857ec491 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java @@ -43,6 +43,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_redis_v1_Instance_RedisConfigsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_redis_v1_Instance_RedisConfigsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_v1_PersistenceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_v1_PersistenceConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_redis_v1_RescheduleMaintenanceRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -158,217 +162,240 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\037google/api/field_behavior.proto\032\031google" + "/api/resource.proto\032#google/longrunning/" + "operations.proto\032\036google/protobuf/durati" - + "on.proto\032 google/protobuf/field_mask.pro" - + "to\032\037google/protobuf/timestamp.proto\032\033goo" - + "gle/type/dayofweek.proto\032\033google/type/ti" - + "meofday.proto\".\n\010NodeInfo\022\017\n\002id\030\001 \001(\tB\003\340" - + "A\003\022\021\n\004zone\030\002 \001(\tB\003\340A\003\"\236\020\n\010Instance\022\021\n\004na" - + "me\030\001 \001(\tB\003\340A\002\022\024\n\014display_name\030\002 \001(\t\022;\n\006l" - + "abels\030\003 \003(\0132+.google.cloud.redis.v1.Inst" - + "ance.LabelsEntry\022\030\n\013location_id\030\004 \001(\tB\003\340" - + "A\001\022$\n\027alternative_location_id\030\005 \001(\tB\003\340A\001" - + "\022\032\n\rredis_version\030\007 \001(\tB\003\340A\001\022\036\n\021reserved" - + "_ip_range\030\t \001(\tB\003\340A\001\022\037\n\022secondary_ip_ran" - + "ge\030\036 \001(\tB\003\340A\001\022\021\n\004host\030\n \001(\tB\003\340A\003\022\021\n\004port" - + "\030\013 \001(\005B\003\340A\003\022 \n\023current_location_id\030\014 \001(\t" - + "B\003\340A\003\0224\n\013create_time\030\r \001(\0132\032.google.prot" - + "obuf.TimestampB\003\340A\003\0229\n\005state\030\016 \001(\0162%.goo" - + "gle.cloud.redis.v1.Instance.StateB\003\340A\003\022\033" - + "\n\016status_message\030\017 \001(\tB\003\340A\003\022M\n\rredis_con" - + "figs\030\020 \003(\01321.google.cloud.redis.v1.Insta" - + "nce.RedisConfigsEntryB\003\340A\001\0227\n\004tier\030\021 \001(\016" - + "2$.google.cloud.redis.v1.Instance.TierB\003" - + "\340A\002\022\033\n\016memory_size_gb\030\022 \001(\005B\003\340A\002\022\037\n\022auth" - + "orized_network\030\024 \001(\tB\003\340A\001\022%\n\030persistence" - + "_iam_identity\030\025 \001(\tB\003\340A\003\022F\n\014connect_mode" - + "\030\026 \001(\0162+.google.cloud.redis.v1.Instance." - + "ConnectModeB\003\340A\001\022\031\n\014auth_enabled\030\027 \001(\010B\003" - + "\340A\001\022C\n\017server_ca_certs\030\031 \003(\0132%.google.cl" - + "oud.redis.v1.TlsCertificateB\003\340A\003\022[\n\027tran" - + "sit_encryption_mode\030\032 \001(\01625.google.cloud" - + ".redis.v1.Instance.TransitEncryptionMode" - + "B\003\340A\001\022I\n\022maintenance_policy\030\033 \001(\0132(.goog" - + "le.cloud.redis.v1.MaintenancePolicyB\003\340A\001" - + "\022M\n\024maintenance_schedule\030\034 \001(\0132*.google." - + "cloud.redis.v1.MaintenanceScheduleB\003\340A\003\022" - + "\032\n\rreplica_count\030\037 \001(\005B\003\340A\001\0223\n\005nodes\030 \003" - + "(\0132\037.google.cloud.redis.v1.NodeInfoB\003\340A\003" - + "\022\032\n\rread_endpoint\030! \001(\tB\003\340A\003\022\037\n\022read_end" - + "point_port\030\" \001(\005B\003\340A\003\022Q\n\022read_replicas_m" - + "ode\030# \001(\01620.google.cloud.redis.v1.Instan" - + "ce.ReadReplicasModeB\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\021Redis" - + "ConfigsEntry\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\010" - + "DELETING\020\004\022\r\n\tREPAIRING\020\005\022\017\n\013MAINTENANCE" - + "\020\006\022\r\n\tIMPORTING\020\010\022\020\n\014FAILING_OVER\020\t\"8\n\004T" - + "ier\022\024\n\020TIER_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\017\n\013" - + "STANDARD_HA\020\003\"[\n\013ConnectMode\022\034\n\030CONNECT_" - + "MODE_UNSPECIFIED\020\000\022\022\n\016DIRECT_PEERING\020\001\022\032" - + "\n\026PRIVATE_SERVICE_ACCESS\020\002\"i\n\025TransitEnc" - + "ryptionMode\022\'\n#TRANSIT_ENCRYPTION_MODE_U" - + "NSPECIFIED\020\000\022\031\n\025SERVER_AUTHENTICATION\020\001\022" - + "\014\n\010DISABLED\020\002\"m\n\020ReadReplicasMode\022\"\n\036REA" - + "D_REPLICAS_MODE_UNSPECIFIED\020\000\022\032\n\026READ_RE" - + "PLICAS_DISABLED\020\001\022\031\n\025READ_REPLICAS_ENABL" - + "ED\020\002:`\352A]\n\035redis.googleapis.com/Instance" - + "\022\202\323\344\223\002/\022-/v1/{parent=projects/*/loca" - + "tions/*}/instances\332A\006parent\022\227\001\n\013GetInsta" - + "nce\022).google.cloud.redis.v1.GetInstanceR" - + "equest\032\037.google.cloud.redis.v1.Instance\"" - + "<\202\323\344\223\002/\022-/v1/{name=projects/*/locations/" - + "*/instances/*}\332A\004name\022\300\001\n\025GetInstanceAut" - + "hString\0223.google.cloud.redis.v1.GetInsta" - + "nceAuthStringRequest\032).google.cloud.redi" - + "s.v1.InstanceAuthString\"G\202\323\344\223\002:\0228/v1/{na" - + "me=projects/*/locations/*/instances/*}/a" - + "uthString\332A\004name\022\211\002\n\016CreateInstance\022,.go" - + "ogle.cloud.redis.v1.CreateInstanceReques" - + "t\032\035.google.longrunning.Operation\"\251\001\202\323\344\223\002" - + "9\"-/v1/{parent=projects/*/locations/*}/i" - + "nstances:\010instance\332A\033parent,instance_id," - + "instance\312AI\n\036google.cloud.redis.v1.Insta" - + "nce\022\'google.cloud.redis.v1.OperationMeta" - + "data\022\213\002\n\016UpdateInstance\022,.google.cloud.r" - + "edis.v1.UpdateInstanceRequest\032\035.google.l" - + "ongrunning.Operation\"\253\001\202\323\344\223\002B26/v1/{inst" - + "ance.name=projects/*/locations/*/instanc" - + "es/*}:\010instance\332A\024update_mask,instance\312A" - + "I\n\036google.cloud.redis.v1.Instance\022\'googl" - + "e.cloud.redis.v1.OperationMetadata\022\203\002\n\017U" - + "pgradeInstance\022-.google.cloud.redis.v1.U" - + "pgradeInstanceRequest\032\035.google.longrunni" - + "ng.Operation\"\241\001\202\323\344\223\002:\"5/v1/{name=project" - + "s/*/locations/*/instances/*}:upgrade:\001*\332" - + "A\022name,redis_version\312AI\n\036google.cloud.re" - + "dis.v1.Instance\022\'google.cloud.redis.v1.O" - + "perationMetadata\022\377\001\n\016ImportInstance\022,.go" - + "ogle.cloud.redis.v1.ImportInstanceReques" - + "t\032\035.google.longrunning.Operation\"\237\001\202\323\344\223\002" - + "9\"4/v1/{name=projects/*/locations/*/inst" - + "ances/*}:import:\001*\332A\021name,input_config\312A" - + "I\n\036google.cloud.redis.v1.Instance\022\'googl" - + "e.cloud.redis.v1.OperationMetadata\022\200\002\n\016E" - + "xportInstance\022,.google.cloud.redis.v1.Ex" - + "portInstanceRequest\032\035.google.longrunning" - + ".Operation\"\240\001\202\323\344\223\0029\"4/v1/{name=projects/" - + "*/locations/*/instances/*}:export:\001*\332A\022n" - + "ame,output_config\312AI\n\036google.cloud.redis" - + ".v1.Instance\022\'google.cloud.redis.v1.Oper" - + "ationMetadata\022\215\002\n\020FailoverInstance\022..goo" + + "ampB\003\340A\003\0224\n\013update_time\030\002 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\022\030\n\013description\030\003 " + + "\001(\tB\003\340A\001\022V\n\031weekly_maintenance_window\030\004 " + + "\003(\0132..google.cloud.redis.v1.WeeklyMainte" + + "nanceWindowB\003\340A\001\"\246\001\n\027WeeklyMaintenanceWi" + + "ndow\022(\n\003day\030\001 \001(\0162\026.google.type.DayOfWee" + + "kB\003\340A\002\022/\n\nstart_time\030\002 \001(\0132\026.google.type" + + ".TimeOfDayB\003\340A\002\0220\n\010duration\030\003 \001(\0132\031.goog" + + "le.protobuf.DurationB\003\340A\003\"\332\001\n\023Maintenanc" + + "eSchedule\0223\n\nstart_time\030\001 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\0221\n\010end_time\030\002 \001(\013" + + "2\032.google.protobuf.TimestampB\003\340A\003\022\032\n\016can" + + "_reschedule\030\003 \001(\010B\002\030\001\022?\n\026schedule_deadli" + + "ne_time\030\005 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\"x\n\024ListInstancesRequest\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_tok" + + "en\030\003 \001(\t\"y\n\025ListInstancesResponse\0222\n\tins" + + "tances\030\001 \003(\0132\037.google.cloud.redis.v1.Ins" + + "tance\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreac" + + "hable\030\003 \003(\t\"I\n\022GetInstanceRequest\0223\n\004nam" + + "e\030\001 \001(\tB%\340A\002\372A\037\n\035redis.googleapis.com/In" + + "stance\"S\n\034GetInstanceAuthStringRequest\0223" + + "\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035redis.googleapis.c" + + "om/Instance\")\n\022InstanceAuthString\022\023\n\013aut" + + "h_string\030\001 \001(\t\"\244\001\n\025CreateInstanceRequest" + + "\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.goog" + + "leapis.com/Location\022\030\n\013instance_id\030\002 \001(\t" + + "B\003\340A\002\0226\n\010instance\030\003 \001(\0132\037.google.cloud.r" + + "edis.v1.InstanceB\003\340A\002\"\205\001\n\025UpdateInstance" + + "Request\0224\n\013update_mask\030\001 \001(\0132\032.google.pr" + + "otobuf.FieldMaskB\003\340A\002\0226\n\010instance\030\002 \001(\0132" + + "\037.google.cloud.redis.v1.InstanceB\003\340A\002\"i\n" + + "\026UpgradeInstanceRequest\0223\n\004name\030\001 \001(\tB%\340" + + "A\002\372A\037\n\035redis.googleapis.com/Instance\022\032\n\r" + + "redis_version\030\002 \001(\tB\003\340A\002\"L\n\025DeleteInstan" + + "ceRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035redis.g" + + "oogleapis.com/Instance\"\035\n\tGcsSource\022\020\n\003u" + + "ri\030\001 \001(\tB\003\340A\002\"O\n\013InputConfig\0226\n\ngcs_sour" + + "ce\030\001 \001(\0132 .google.cloud.redis.v1.GcsSour" + + "ceH\000B\010\n\006source\"i\n\025ImportInstanceRequest\022" + + "\021\n\004name\030\001 \001(\tB\003\340A\002\022=\n\014input_config\030\003 \001(\013" + + "2\".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.v1.GcsDestinationH\000B" + + "\r\n\013destination\"k\n\025ExportInstanceRequest\022" + + "\021\n\004name\030\001 \001(\tB\003\340A\002\022?\n\routput_config\030\003 \001(" + + "\0132#.google.cloud.redis.v1.OutputConfigB\003" + + "\340A\002\"\234\002\n\027FailoverInstanceRequest\0223\n\004name\030" + + "\001 \001(\tB%\340A\002\372A\037\n\035redis.googleapis.com/Inst" + + "ance\022d\n\024data_protection_mode\030\002 \001(\0162A.goo" + "gle.cloud.redis.v1.FailoverInstanceReque" - + "st\032\035.google.longrunning.Operation\"\251\001\202\323\344\223" - + "\002;\"6/v1/{name=projects/*/locations/*/ins" - + "tances/*}:failover:\001*\332A\031name,data_protec" - + "tion_mode\312AI\n\036google.cloud.redis.v1.Inst" - + "ance\022\'google.cloud.redis.v1.OperationMet" - + "adata\022\336\001\n\016DeleteInstance\022,.google.cloud." - + "redis.v1.DeleteInstanceRequest\032\035.google." - + "longrunning.Operation\"\177\202\323\344\223\002/*-/v1/{name" - + "=projects/*/locations/*/instances/*}\332A\004n" - + "ame\312A@\n\025google.protobuf.Empty\022\'google.cl" - + "oud.redis.v1.OperationMetadata\022\257\002\n\025Resch" - + "eduleMaintenance\0223.google.cloud.redis.v1" - + ".RescheduleMaintenanceRequest\032\035.google.l" - + "ongrunning.Operation\"\301\001\202\323\344\223\002H\"C/v1/{name" - + "=projects/*/locations/*/instances/*}:res" - + "cheduleMaintenance:\001*\332A$name, reschedule" - + "_type, schedule_time\312AI\n\036google.cloud.re" - + "dis.v1.Instance\022\'google.cloud.redis.v1.O" - + "perationMetadata\032H\312A\024redis.googleapis.co" - + "m\322A.https://www.googleapis.com/auth/clou" - + "d-platformBh\n\031com.google.cloud.redis.v1B" - + "\030CloudRedisServiceV1ProtoP\001Z/cloud.googl" - + "e.com/go/redis/apiv1/redispb;redispbb\006pr" - + "oto3" + + "st.DataProtectionModeB\003\340A\001\"f\n\022DataProtec" + + "tionMode\022$\n DATA_PROTECTION_MODE_UNSPECI" + + "FIED\020\000\022\025\n\021LIMITED_DATA_LOSS\020\001\022\023\n\017FORCE_D" + + "ATA_LOSS\020\002\"\326\001\n\021OperationMetadata\022/\n\013crea" + + "te_time\030\001 \001(\0132\032.google.protobuf.Timestam" + + "p\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf.Ti" + + "mestamp\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\020Location" + + "Metadata\022Y\n\017available_zones\030\001 \003(\0132;.goog" + + "le.cloud.redis.v1.LocationMetadata.Avail" + + "ableZonesEntryB\003\340A\003\032Z\n\023AvailableZonesEnt" + + "ry\022\013\n\003key\030\001 \001(\t\0222\n\005value\030\002 \001(\0132#.google." + + "cloud.redis.v1.ZoneMetadata:\0028\001\"\016\n\014ZoneM" + + "etadata\"\273\001\n\016TlsCertificate\022\025\n\rserial_num" + + "ber\030\001 \001(\t\022\014\n\004cert\030\002 \001(\t\0224\n\013create_time\030\003" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013expire_time\030\004 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\022\030\n\020sha1_fingerprint\030\005 \001(\t2\250\025" + + "\n\nCloudRedis\022\252\001\n\rListInstances\022+.google." + + "cloud.redis.v1.ListInstancesRequest\032,.go" + + "ogle.cloud.redis.v1.ListInstancesRespons" + + "e\">\202\323\344\223\002/\022-/v1/{parent=projects/*/locati" + + "ons/*}/instances\332A\006parent\022\227\001\n\013GetInstanc" + + "e\022).google.cloud.redis.v1.GetInstanceReq" + + "uest\032\037.google.cloud.redis.v1.Instance\"<\202" + + "\323\344\223\002/\022-/v1/{name=projects/*/locations/*/" + + "instances/*}\332A\004name\022\300\001\n\025GetInstanceAuthS" + + "tring\0223.google.cloud.redis.v1.GetInstanc" + + "eAuthStringRequest\032).google.cloud.redis." + + "v1.InstanceAuthString\"G\202\323\344\223\002:\0228/v1/{name" + + "=projects/*/locations/*/instances/*}/aut" + + "hString\332A\004name\022\211\002\n\016CreateInstance\022,.goog" + + "le.cloud.redis.v1.CreateInstanceRequest\032" + + "\035.google.longrunning.Operation\"\251\001\202\323\344\223\0029\"" + + "-/v1/{parent=projects/*/locations/*}/ins" + + "tances:\010instance\332A\033parent,instance_id,in" + + "stance\312AI\n\036google.cloud.redis.v1.Instanc" + + "e\022\'google.cloud.redis.v1.OperationMetada" + + "ta\022\213\002\n\016UpdateInstance\022,.google.cloud.red" + + "is.v1.UpdateInstanceRequest\032\035.google.lon" + + "grunning.Operation\"\253\001\202\323\344\223\002B26/v1/{instan" + + "ce.name=projects/*/locations/*/instances" + + "/*}:\010instance\332A\024update_mask,instance\312AI\n" + + "\036google.cloud.redis.v1.Instance\022\'google." + + "cloud.redis.v1.OperationMetadata\022\203\002\n\017Upg" + + "radeInstance\022-.google.cloud.redis.v1.Upg" + + "radeInstanceRequest\032\035.google.longrunning" + + ".Operation\"\241\001\202\323\344\223\002:\"5/v1/{name=projects/" + + "*/locations/*/instances/*}:upgrade:\001*\332A\022" + + "name,redis_version\312AI\n\036google.cloud.redi" + + "s.v1.Instance\022\'google.cloud.redis.v1.Ope" + + "rationMetadata\022\377\001\n\016ImportInstance\022,.goog" + + "le.cloud.redis.v1.ImportInstanceRequest\032" + + "\035.google.longrunning.Operation\"\237\001\202\323\344\223\0029\"" + + "4/v1/{name=projects/*/locations/*/instan" + + "ces/*}:import:\001*\332A\021name,input_config\312AI\n" + + "\036google.cloud.redis.v1.Instance\022\'google." + + "cloud.redis.v1.OperationMetadata\022\200\002\n\016Exp" + + "ortInstance\022,.google.cloud.redis.v1.Expo" + + "rtInstanceRequest\032\035.google.longrunning.O" + + "peration\"\240\001\202\323\344\223\0029\"4/v1/{name=projects/*/" + + "locations/*/instances/*}:export:\001*\332A\022nam" + + "e,output_config\312AI\n\036google.cloud.redis.v" + + "1.Instance\022\'google.cloud.redis.v1.Operat" + + "ionMetadata\022\215\002\n\020FailoverInstance\022..googl" + + "e.cloud.redis.v1.FailoverInstanceRequest" + + "\032\035.google.longrunning.Operation\"\251\001\202\323\344\223\002;" + + "\"6/v1/{name=projects/*/locations/*/insta" + + "nces/*}:failover:\001*\332A\031name,data_protecti" + + "on_mode\312AI\n\036google.cloud.redis.v1.Instan" + + "ce\022\'google.cloud.redis.v1.OperationMetad" + + "ata\022\336\001\n\016DeleteInstance\022,.google.cloud.re" + + "dis.v1.DeleteInstanceRequest\032\035.google.lo" + + "ngrunning.Operation\"\177\202\323\344\223\002/*-/v1/{name=p" + + "rojects/*/locations/*/instances/*}\332A\004nam" + + "e\312A@\n\025google.protobuf.Empty\022\'google.clou" + + "d.redis.v1.OperationMetadata\022\257\002\n\025Resched" + + "uleMaintenance\0223.google.cloud.redis.v1.R" + + "escheduleMaintenanceRequest\032\035.google.lon" + + "grunning.Operation\"\301\001\202\323\344\223\002H\"C/v1/{name=p" + + "rojects/*/locations/*/instances/*}:resch" + + "eduleMaintenance:\001*\332A$name, reschedule_t" + + "ype, schedule_time\312AI\n\036google.cloud.redi" + + "s.v1.Instance\022\'google.cloud.redis.v1.Ope" + + "rationMetadata\032H\312A\024redis.googleapis.com\322" + + "A.https://www.googleapis.com/auth/cloud-" + + "platformBh\n\031com.google.cloud.redis.v1B\030C" + + "loudRedisServiceV1ProtoP\001Z/cloud.google." + + "com/go/redis/apiv1/redispb;redispbb\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -380,6 +407,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.type.DayOfWeekProto.getDescriptor(), @@ -429,6 +457,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReadEndpoint", "ReadEndpointPort", "ReadReplicasMode", + "CustomerManagedKey", + "PersistenceConfig", + "SuspensionReasons", + "MaintenanceVersion", + "AvailableMaintenanceVersions", }); internal_static_google_cloud_redis_v1_Instance_LabelsEntry_descriptor = internal_static_google_cloud_redis_v1_Instance_descriptor.getNestedTypes().get(0); @@ -446,8 +479,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_redis_v1_RescheduleMaintenanceRequest_descriptor = + internal_static_google_cloud_redis_v1_PersistenceConfig_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_redis_v1_PersistenceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_v1_PersistenceConfig_descriptor, + new java.lang.String[] { + "PersistenceMode", "RdbSnapshotPeriod", "RdbNextSnapshotTime", "RdbSnapshotStartTime", + }); + internal_static_google_cloud_redis_v1_RescheduleMaintenanceRequest_descriptor = + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_redis_v1_RescheduleMaintenanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_RescheduleMaintenanceRequest_descriptor, @@ -455,7 +496,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "RescheduleType", "ScheduleTime", }); internal_static_google_cloud_redis_v1_MaintenancePolicy_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_redis_v1_MaintenancePolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_MaintenancePolicy_descriptor, @@ -463,7 +504,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CreateTime", "UpdateTime", "Description", "WeeklyMaintenanceWindow", }); internal_static_google_cloud_redis_v1_WeeklyMaintenanceWindow_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_redis_v1_WeeklyMaintenanceWindow_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_WeeklyMaintenanceWindow_descriptor, @@ -471,7 +512,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Day", "StartTime", "Duration", }); internal_static_google_cloud_redis_v1_MaintenanceSchedule_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_redis_v1_MaintenanceSchedule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_MaintenanceSchedule_descriptor, @@ -479,7 +520,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartTime", "EndTime", "CanReschedule", "ScheduleDeadlineTime", }); internal_static_google_cloud_redis_v1_ListInstancesRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_redis_v1_ListInstancesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_ListInstancesRequest_descriptor, @@ -487,7 +528,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_redis_v1_ListInstancesResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_redis_v1_ListInstancesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_ListInstancesResponse_descriptor, @@ -495,7 +536,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Instances", "NextPageToken", "Unreachable", }); internal_static_google_cloud_redis_v1_GetInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_redis_v1_GetInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_GetInstanceRequest_descriptor, @@ -503,7 +544,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_redis_v1_GetInstanceAuthStringRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_redis_v1_GetInstanceAuthStringRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_GetInstanceAuthStringRequest_descriptor, @@ -511,7 +552,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_redis_v1_InstanceAuthString_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_redis_v1_InstanceAuthString_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_InstanceAuthString_descriptor, @@ -519,7 +560,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AuthString", }); internal_static_google_cloud_redis_v1_CreateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_redis_v1_CreateInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_CreateInstanceRequest_descriptor, @@ -527,7 +568,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "InstanceId", "Instance", }); internal_static_google_cloud_redis_v1_UpdateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_redis_v1_UpdateInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_UpdateInstanceRequest_descriptor, @@ -535,7 +576,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateMask", "Instance", }); internal_static_google_cloud_redis_v1_UpgradeInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_redis_v1_UpgradeInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_UpgradeInstanceRequest_descriptor, @@ -543,7 +584,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "RedisVersion", }); internal_static_google_cloud_redis_v1_DeleteInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_redis_v1_DeleteInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_DeleteInstanceRequest_descriptor, @@ -551,7 +592,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_redis_v1_GcsSource_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_redis_v1_GcsSource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_GcsSource_descriptor, @@ -559,7 +600,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Uri", }); internal_static_google_cloud_redis_v1_InputConfig_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_redis_v1_InputConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_InputConfig_descriptor, @@ -567,7 +608,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GcsSource", "Source", }); internal_static_google_cloud_redis_v1_ImportInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_redis_v1_ImportInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_ImportInstanceRequest_descriptor, @@ -575,7 +616,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "InputConfig", }); internal_static_google_cloud_redis_v1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_redis_v1_GcsDestination_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_GcsDestination_descriptor, @@ -583,7 +624,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Uri", }); internal_static_google_cloud_redis_v1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_redis_v1_OutputConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_OutputConfig_descriptor, @@ -591,7 +632,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GcsDestination", "Destination", }); internal_static_google_cloud_redis_v1_ExportInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_redis_v1_ExportInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_ExportInstanceRequest_descriptor, @@ -599,7 +640,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "OutputConfig", }); internal_static_google_cloud_redis_v1_FailoverInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_redis_v1_FailoverInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_FailoverInstanceRequest_descriptor, @@ -607,7 +648,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "DataProtectionMode", }); internal_static_google_cloud_redis_v1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_redis_v1_OperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_OperationMetadata_descriptor, @@ -621,7 +662,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ApiVersion", }); internal_static_google_cloud_redis_v1_LocationMetadata_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_redis_v1_LocationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_LocationMetadata_descriptor, @@ -637,13 +678,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_redis_v1_ZoneMetadata_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_redis_v1_ZoneMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_ZoneMetadata_descriptor, new java.lang.String[] {}); internal_static_google_cloud_redis_v1_TlsCertificate_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_redis_v1_TlsCertificate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_TlsCertificate_descriptor, @@ -668,6 +709,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.type.DayOfWeekProto.getDescriptor(); diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CreateInstanceRequest.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CreateInstanceRequest.java index d95d34859420..f99177895ec8 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CreateInstanceRequest.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CreateInstanceRequest.java @@ -22,7 +22,8 @@ * * *
- * Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
+ * Request for
+ * [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
  * 
* * Protobuf type {@code google.cloud.redis.v1.CreateInstanceRequest} @@ -425,7 +426,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
+   * Request for
+   * [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
    * 
* * Protobuf type {@code google.cloud.redis.v1.CreateInstanceRequest} diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/DeleteInstanceRequest.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/DeleteInstanceRequest.java index 7274f2f67976..2148eaabcc99 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/DeleteInstanceRequest.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/DeleteInstanceRequest.java @@ -22,7 +22,8 @@ * * *
- * Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance].
+ * Request for
+ * [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance].
  * 
* * Protobuf type {@code google.cloud.redis.v1.DeleteInstanceRequest} @@ -289,7 +290,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance].
+   * Request for
+   * [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance].
    * 
* * Protobuf type {@code google.cloud.redis.v1.DeleteInstanceRequest} diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GetInstanceAuthStringRequest.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GetInstanceAuthStringRequest.java index a0e838914dee..702b1ae581be 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GetInstanceAuthStringRequest.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GetInstanceAuthStringRequest.java @@ -22,7 +22,8 @@ * * *
- * Request for [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString].
+ * Request for
+ * [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString].
  * 
* * Protobuf type {@code google.cloud.redis.v1.GetInstanceAuthStringRequest} @@ -290,7 +291,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request for [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString].
+   * Request for
+   * [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString].
    * 
* * Protobuf type {@code google.cloud.redis.v1.GetInstanceAuthStringRequest} diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java index c00d454a2e02..cf7998e58a52 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java @@ -58,6 +58,10 @@ private Instance() { nodes_ = java.util.Collections.emptyList(); readEndpoint_ = ""; readReplicasMode_ = 0; + customerManagedKey_ = ""; + suspensionReasons_ = java.util.Collections.emptyList(); + maintenanceVersion_ = ""; + availableMaintenanceVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @@ -1035,6 +1039,143 @@ private ReadReplicasMode(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1.Instance.ReadReplicasMode) } + /** + * + * + *
+   * Possible reasons for the instance to be in a "SUSPENDED" state.
+   * 
+ * + * Protobuf enum {@code google.cloud.redis.v1.Instance.SuspensionReason} + */ + public enum SuspensionReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * SUSPENSION_REASON_UNSPECIFIED = 0; + */ + SUSPENSION_REASON_UNSPECIFIED(0), + /** + * + * + *
+     * Something wrong with the CMEK key provided by customer.
+     * 
+ * + * CUSTOMER_MANAGED_KEY_ISSUE = 1; + */ + CUSTOMER_MANAGED_KEY_ISSUE(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * SUSPENSION_REASON_UNSPECIFIED = 0; + */ + public static final int SUSPENSION_REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Something wrong with the CMEK key provided by customer.
+     * 
+ * + * CUSTOMER_MANAGED_KEY_ISSUE = 1; + */ + public static final int CUSTOMER_MANAGED_KEY_ISSUE_VALUE = 1; + + 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 SuspensionReason 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 SuspensionReason forNumber(int value) { + switch (value) { + case 0: + return SUSPENSION_REASON_UNSPECIFIED; + case 1: + return CUSTOMER_MANAGED_KEY_ISSUE; + 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 SuspensionReason findValueByNumber(int number) { + return SuspensionReason.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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(5); + } + + private static final SuspensionReason[] VALUES = values(); + + public static SuspensionReason 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 SuspensionReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1.Instance.SuspensionReason) + } + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -1049,8 +1190,10 @@ private ReadReplicasMode(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][google.cloud.redis.v1.Instance.location_id] and - * [alternative_location_id][google.cloud.redis.v1.Instance.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]; @@ -1079,8 +1222,10 @@ 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][google.cloud.redis.v1.Instance.location_id] and - * [alternative_location_id][google.cloud.redis.v1.Instance.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]; @@ -1507,11 +1652,11 @@ public com.google.protobuf.ByteString getReservedIpRangeBytes() { * * *
-   * Optional. Additional IP range for node placement. Required when enabling read
-   * replicas on an existing instance. For DIRECT_PEERING mode value must be a
-   * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
-   * must be the name of an allocated address range associated with the private
-   * service access connection, or "auto".
+   * Optional. Additional IP range for node placement. Required when enabling
+   * read replicas on an existing instance. For DIRECT_PEERING mode value must
+   * be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode
+   * value must be the name of an allocated address range associated with the
+   * private service access connection, or "auto".
    * 
* * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; @@ -1534,11 +1679,11 @@ public java.lang.String getSecondaryIpRange() { * * *
-   * Optional. Additional IP range for node placement. Required when enabling read
-   * replicas on an existing instance. For DIRECT_PEERING mode value must be a
-   * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
-   * must be the name of an allocated address range associated with the private
-   * service access connection, or "auto".
+   * Optional. Additional IP range for node placement. Required when enabling
+   * read replicas on an existing instance. For DIRECT_PEERING mode value must
+   * be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode
+   * value must be the name of an allocated address range associated with the
+   * private service access connection, or "auto".
    * 
* * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; @@ -2203,9 +2348,9 @@ public com.google.cloud.redis.v1.Instance.ConnectMode getConnectMode() { * * *
-   * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to
-   * "true" AUTH is enabled on the instance. Default value is "false" meaning
-   * AUTH is disabled.
+   * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If
+   * set to "true" AUTH is enabled on the instance. Default value is "false"
+   * meaning AUTH is disabled.
    * 
* * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; @@ -2465,11 +2610,11 @@ public com.google.cloud.redis.v1.MaintenanceScheduleOrBuilder getMaintenanceSche * * *
-   * Optional. The number of replica nodes. The valid range for the Standard Tier with
-   * read replicas enabled is [1-5] and defaults to 2. If read replicas are not
-   * enabled for a Standard Tier instance, the only valid value is 1 and the
-   * default is 1. The valid value for basic tier is 0 and the default is also
-   * 0.
+   * Optional. The number of replica nodes. The valid range for the Standard
+   * Tier with read replicas enabled is [1-5] and defaults to 2. If read
+   * replicas are not enabled for a Standard Tier instance, the only valid value
+   * is 1 and the default is 1. The valid value for basic tier is 0 and the
+   * default is also 0.
    * 
* * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; @@ -2644,7 +2789,8 @@ public int getReadEndpointPort() { * * *
-   * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
+   * Optional. Read replicas mode for the instance. Defaults to
+   * READ_REPLICAS_DISABLED.
    * 
* * @@ -2661,7 +2807,8 @@ public int getReadReplicasModeValue() { * * *
-   * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
+   * Optional. Read replicas mode for the instance. Defaults to
+   * READ_REPLICAS_DISABLED.
    * 
* * @@ -2679,213 +2826,583 @@ public com.google.cloud.redis.v1.Instance.ReadReplicasMode getReadReplicasMode() : result; } - private byte memoizedIsInitialized = -1; + public static final int CUSTOMER_MANAGED_KEY_FIELD_NUMBER = 36; + @SuppressWarnings("serial") + private volatile java.lang.Object customerManagedKey_ = ""; + /** + * + * + *
+   * Optional. The KMS key reference that the customer provides when trying to
+   * create the instance.
+   * 
+ * + * string customer_managed_key = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customerManagedKey. + */ @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; + public java.lang.String getCustomerManagedKey() { + java.lang.Object ref = customerManagedKey_; + 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(); + customerManagedKey_ = s; + return s; + } } - + /** + * + * + *
+   * Optional. The KMS key reference that the customer provides when trying to
+   * create the instance.
+   * 
+ * + * string customer_managed_key = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customerManagedKey. + */ @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alternativeLocationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, alternativeLocationId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redisVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, redisVersion_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reservedIpRange_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, reservedIpRange_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, host_); - } - if (port_ != 0) { - output.writeInt32(11, port_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentLocationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, currentLocationId_); - } - if (createTime_ != null) { - output.writeMessage(13, getCreateTime()); - } - if (state_ != com.google.cloud.redis.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(14, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 15, statusMessage_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetRedisConfigs(), RedisConfigsDefaultEntryHolder.defaultEntry, 16); - if (tier_ != com.google.cloud.redis.v1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { - output.writeEnum(17, tier_); - } - if (memorySizeGb_ != 0) { - output.writeInt32(18, memorySizeGb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedNetwork_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 20, authorizedNetwork_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(persistenceIamIdentity_)) { - 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_); - } - if (authEnabled_ != false) { - output.writeBool(23, authEnabled_); - } - for (int i = 0; i < serverCaCerts_.size(); i++) { - output.writeMessage(25, serverCaCerts_.get(i)); - } - if (transitEncryptionMode_ - != com.google.cloud.redis.v1.Instance.TransitEncryptionMode - .TRANSIT_ENCRYPTION_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(26, transitEncryptionMode_); - } - if (maintenancePolicy_ != null) { - output.writeMessage(27, getMaintenancePolicy()); - } - if (maintenanceSchedule_ != null) { - output.writeMessage(28, getMaintenanceSchedule()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secondaryIpRange_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 30, secondaryIpRange_); - } - if (replicaCount_ != 0) { - output.writeInt32(31, replicaCount_); - } - for (int i = 0; i < nodes_.size(); i++) { - output.writeMessage(32, nodes_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(readEndpoint_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 33, readEndpoint_); - } - if (readEndpointPort_ != 0) { - output.writeInt32(34, readEndpointPort_); - } - if (readReplicasMode_ - != com.google.cloud.redis.v1.Instance.ReadReplicasMode.READ_REPLICAS_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(35, readReplicasMode_); + public com.google.protobuf.ByteString getCustomerManagedKeyBytes() { + java.lang.Object ref = customerManagedKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerManagedKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - getUnknownFields().writeTo(output); } + public static final int PERSISTENCE_CONFIG_FIELD_NUMBER = 37; + private com.google.cloud.redis.v1.PersistenceConfig persistenceConfig_; + /** + * + * + *
+   * Optional. Persistence configuration parameters
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the persistenceConfig field is set. + */ @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public boolean hasPersistenceConfig() { + return persistenceConfig_ != null; + } + /** + * + * + *
+   * Optional. Persistence configuration parameters
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The persistenceConfig. + */ + @java.lang.Override + public com.google.cloud.redis.v1.PersistenceConfig getPersistenceConfig() { + return persistenceConfig_ == null + ? com.google.cloud.redis.v1.PersistenceConfig.getDefaultInstance() + : persistenceConfig_; + } + /** + * + * + *
+   * Optional. Persistence configuration parameters
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.redis.v1.PersistenceConfigOrBuilder getPersistenceConfigOrBuilder() { + return persistenceConfig_ == null + ? com.google.cloud.redis.v1.PersistenceConfig.getDefaultInstance() + : persistenceConfig_; + } - size = 0; + public static final int SUSPENSION_REASONS_FIELD_NUMBER = 38; + + @SuppressWarnings("serial") + private java.util.List suspensionReasons_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.redis.v1.Instance.SuspensionReason> + suspensionReasons_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.redis.v1.Instance.SuspensionReason>() { + public com.google.cloud.redis.v1.Instance.SuspensionReason convert( + java.lang.Integer from) { + com.google.cloud.redis.v1.Instance.SuspensionReason result = + com.google.cloud.redis.v1.Instance.SuspensionReason.forNumber(from); + return result == null + ? com.google.cloud.redis.v1.Instance.SuspensionReason.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Optional. reasons that causes instance in "SUSPENDED" state.
+   * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the suspensionReasons. + */ + @java.lang.Override + public java.util.List + getSuspensionReasonsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.redis.v1.Instance.SuspensionReason>( + suspensionReasons_, suspensionReasons_converter_); + } + /** + * + * + *
+   * Optional. reasons that causes instance in "SUSPENDED" state.
+   * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of suspensionReasons. + */ + @java.lang.Override + public int getSuspensionReasonsCount() { + return suspensionReasons_.size(); + } + /** + * + * + *
+   * Optional. reasons that causes instance in "SUSPENDED" state.
+   * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The suspensionReasons at the given index. + */ + @java.lang.Override + public com.google.cloud.redis.v1.Instance.SuspensionReason getSuspensionReasons(int index) { + return suspensionReasons_converter_.convert(suspensionReasons_.get(index)); + } + /** + * + * + *
+   * Optional. reasons that causes instance in "SUSPENDED" state.
+   * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for suspensionReasons. + */ + @java.lang.Override + public java.util.List getSuspensionReasonsValueList() { + return suspensionReasons_; + } + /** + * + * + *
+   * Optional. reasons that causes instance in "SUSPENDED" state.
+   * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of suspensionReasons at the given index. + */ + @java.lang.Override + public int getSuspensionReasonsValue(int index) { + return suspensionReasons_.get(index); + } + + private int suspensionReasonsMemoizedSerializedSize; + + public static final int MAINTENANCE_VERSION_FIELD_NUMBER = 39; + + @SuppressWarnings("serial") + private volatile java.lang.Object maintenanceVersion_ = ""; + /** + * + * + *
+   * Optional. The self service update maintenance version.
+   * The version is date based such as "20210712_00_00".
+   * 
+ * + * string maintenance_version = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maintenanceVersion. + */ + @java.lang.Override + public java.lang.String getMaintenanceVersion() { + java.lang.Object ref = maintenanceVersion_; + 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(); + maintenanceVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The self service update maintenance version.
+   * The version is date based such as "20210712_00_00".
+   * 
+ * + * string maintenance_version = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for maintenanceVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMaintenanceVersionBytes() { + java.lang.Object ref = maintenanceVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + maintenanceVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVAILABLE_MAINTENANCE_VERSIONS_FIELD_NUMBER = 40; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList availableMaintenanceVersions_; + /** + * + * + *
+   * Optional. The available maintenance versions that an instance could update
+   * to.
+   * 
+ * + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the availableMaintenanceVersions. + */ + public com.google.protobuf.ProtocolStringList getAvailableMaintenanceVersionsList() { + return availableMaintenanceVersions_; + } + /** + * + * + *
+   * Optional. The available maintenance versions that an instance could update
+   * to.
+   * 
+ * + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of availableMaintenanceVersions. + */ + public int getAvailableMaintenanceVersionsCount() { + return availableMaintenanceVersions_.size(); + } + /** + * + * + *
+   * Optional. The available maintenance versions that an instance could update
+   * to.
+   * 
+ * + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The availableMaintenanceVersions at the given index. + */ + public java.lang.String getAvailableMaintenanceVersions(int index) { + return availableMaintenanceVersions_.get(index); + } + /** + * + * + *
+   * Optional. The available maintenance versions that an instance could update
+   * to.
+   * 
+ * + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the availableMaintenanceVersions at the given index. + */ + public com.google.protobuf.ByteString getAvailableMaintenanceVersionsBytes(int index) { + return availableMaintenanceVersions_.getByteString(index); + } + + 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 { + getSerializedSize(); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alternativeLocationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, alternativeLocationId_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, alternativeLocationId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redisVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, redisVersion_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, redisVersion_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reservedIpRange_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, reservedIpRange_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, reservedIpRange_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, host_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, host_); } if (port_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(11, port_); + output.writeInt32(11, port_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentLocationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, currentLocationId_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, currentLocationId_); } if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getCreateTime()); + output.writeMessage(13, getCreateTime()); } if (state_ != com.google.cloud.redis.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, state_); + output.writeEnum(14, state_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, statusMessage_); - } - for (java.util.Map.Entry entry : - internalGetRedisConfigs().getMap().entrySet()) { - com.google.protobuf.MapEntry redisConfigs__ = - RedisConfigsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, redisConfigs__); + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, statusMessage_); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetRedisConfigs(), RedisConfigsDefaultEntryHolder.defaultEntry, 16); if (tier_ != com.google.cloud.redis.v1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(17, tier_); + output.writeEnum(17, tier_); } if (memorySizeGb_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(18, memorySizeGb_); + output.writeInt32(18, memorySizeGb_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedNetwork_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, authorizedNetwork_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, authorizedNetwork_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(persistenceIamIdentity_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, persistenceIamIdentity_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 21, persistenceIamIdentity_); } if (connectMode_ != com.google.cloud.redis.v1.Instance.ConnectMode.CONNECT_MODE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, connectMode_); + output.writeEnum(22, connectMode_); } if (authEnabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(23, authEnabled_); + output.writeBool(23, authEnabled_); } for (int i = 0; i < serverCaCerts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, serverCaCerts_.get(i)); + output.writeMessage(25, serverCaCerts_.get(i)); } if (transitEncryptionMode_ != com.google.cloud.redis.v1.Instance.TransitEncryptionMode .TRANSIT_ENCRYPTION_MODE_UNSPECIFIED .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(26, transitEncryptionMode_); + output.writeEnum(26, transitEncryptionMode_); } if (maintenancePolicy_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getMaintenancePolicy()); + output.writeMessage(27, getMaintenancePolicy()); } if (maintenanceSchedule_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(28, getMaintenanceSchedule()); + output.writeMessage(28, getMaintenanceSchedule()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secondaryIpRange_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 30, secondaryIpRange_); + } + if (replicaCount_ != 0) { + output.writeInt32(31, replicaCount_); + } + for (int i = 0; i < nodes_.size(); i++) { + output.writeMessage(32, nodes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(readEndpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 33, readEndpoint_); + } + if (readEndpointPort_ != 0) { + output.writeInt32(34, readEndpointPort_); + } + if (readReplicasMode_ + != com.google.cloud.redis.v1.Instance.ReadReplicasMode.READ_REPLICAS_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(35, readReplicasMode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customerManagedKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 36, customerManagedKey_); + } + if (persistenceConfig_ != null) { + output.writeMessage(37, getPersistenceConfig()); + } + if (getSuspensionReasonsList().size() > 0) { + output.writeUInt32NoTag(306); + output.writeUInt32NoTag(suspensionReasonsMemoizedSerializedSize); + } + for (int i = 0; i < suspensionReasons_.size(); i++) { + output.writeEnumNoTag(suspensionReasons_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintenanceVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 39, maintenanceVersion_); + } + for (int i = 0; i < availableMaintenanceVersions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 40, availableMaintenanceVersions_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alternativeLocationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, alternativeLocationId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redisVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, redisVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reservedIpRange_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, reservedIpRange_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, host_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(11, port_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentLocationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, currentLocationId_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getCreateTime()); + } + if (state_ != com.google.cloud.redis.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, statusMessage_); + } + for (java.util.Map.Entry entry : + internalGetRedisConfigs().getMap().entrySet()) { + com.google.protobuf.MapEntry redisConfigs__ = + RedisConfigsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, redisConfigs__); + } + if (tier_ != com.google.cloud.redis.v1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(17, tier_); + } + if (memorySizeGb_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(18, memorySizeGb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedNetwork_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, authorizedNetwork_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(persistenceIamIdentity_)) { + 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_); + } + if (authEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(23, authEnabled_); + } + for (int i = 0; i < serverCaCerts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, serverCaCerts_.get(i)); + } + if (transitEncryptionMode_ + != com.google.cloud.redis.v1.Instance.TransitEncryptionMode + .TRANSIT_ENCRYPTION_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(26, transitEncryptionMode_); + } + if (maintenancePolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getMaintenancePolicy()); + } + if (maintenanceSchedule_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(28, getMaintenanceSchedule()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secondaryIpRange_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(30, secondaryIpRange_); @@ -2907,6 +3424,36 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(35, readReplicasMode_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customerManagedKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(36, customerManagedKey_); + } + if (persistenceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(37, getPersistenceConfig()); + } + { + int dataSize = 0; + for (int i = 0; i < suspensionReasons_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(suspensionReasons_.get(i)); + } + size += dataSize; + if (!getSuspensionReasonsList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + suspensionReasonsMemoizedSerializedSize = dataSize; + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maintenanceVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(39, maintenanceVersion_); + } + { + int dataSize = 0; + for (int i = 0; i < availableMaintenanceVersions_.size(); i++) { + dataSize += computeStringSizeNoTag(availableMaintenanceVersions_.getRaw(i)); + } + size += dataSize; + size += 2 * getAvailableMaintenanceVersionsList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2961,6 +3508,15 @@ public boolean equals(final java.lang.Object obj) { if (!getReadEndpoint().equals(other.getReadEndpoint())) return false; if (getReadEndpointPort() != other.getReadEndpointPort()) return false; if (readReplicasMode_ != other.readReplicasMode_) return false; + if (!getCustomerManagedKey().equals(other.getCustomerManagedKey())) return false; + if (hasPersistenceConfig() != other.hasPersistenceConfig()) return false; + if (hasPersistenceConfig()) { + if (!getPersistenceConfig().equals(other.getPersistenceConfig())) return false; + } + if (!suspensionReasons_.equals(other.suspensionReasons_)) return false; + if (!getMaintenanceVersion().equals(other.getMaintenanceVersion())) return false; + if (!getAvailableMaintenanceVersionsList().equals(other.getAvailableMaintenanceVersionsList())) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3046,6 +3602,22 @@ public int hashCode() { hash = (53 * hash) + getReadEndpointPort(); hash = (37 * hash) + READ_REPLICAS_MODE_FIELD_NUMBER; hash = (53 * hash) + readReplicasMode_; + hash = (37 * hash) + CUSTOMER_MANAGED_KEY_FIELD_NUMBER; + hash = (53 * hash) + getCustomerManagedKey().hashCode(); + if (hasPersistenceConfig()) { + hash = (37 * hash) + PERSISTENCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPersistenceConfig().hashCode(); + } + if (getSuspensionReasonsCount() > 0) { + hash = (37 * hash) + SUSPENSION_REASONS_FIELD_NUMBER; + hash = (53 * hash) + suspensionReasons_.hashCode(); + } + hash = (37 * hash) + MAINTENANCE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getMaintenanceVersion().hashCode(); + if (getAvailableMaintenanceVersionsCount() > 0) { + hash = (37 * hash) + AVAILABLE_MAINTENANCE_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getAvailableMaintenanceVersionsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3208,6 +3780,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; + bitField1_ = 0; name_ = ""; displayName_ = ""; internalGetMutableLabels().clear(); @@ -3262,6 +3835,17 @@ public Builder clear() { readEndpoint_ = ""; readEndpointPort_ = 0; readReplicasMode_ = 0; + customerManagedKey_ = ""; + persistenceConfig_ = null; + if (persistenceConfigBuilder_ != null) { + persistenceConfigBuilder_.dispose(); + persistenceConfigBuilder_ = null; + } + suspensionReasons_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00000001); + maintenanceVersion_ = ""; + availableMaintenanceVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField1_ = (bitField1_ & ~0x00000004); return this; } @@ -3292,6 +3876,9 @@ public com.google.cloud.redis.v1.Instance buildPartial() { if (bitField0_ != 0) { buildPartial0(result); } + if (bitField1_ != 0) { + buildPartial1(result); + } onBuilt(); return result; } @@ -3315,6 +3902,16 @@ private void buildPartialRepeatedFields(com.google.cloud.redis.v1.Instance resul } else { result.nodes_ = nodesBuilder_.build(); } + if (((bitField1_ & 0x00000001) != 0)) { + suspensionReasons_ = java.util.Collections.unmodifiableList(suspensionReasons_); + bitField1_ = (bitField1_ & ~0x00000001); + } + result.suspensionReasons_ = suspensionReasons_; + if (((bitField1_ & 0x00000004) != 0)) { + availableMaintenanceVersions_ = availableMaintenanceVersions_.getUnmodifiableView(); + bitField1_ = (bitField1_ & ~0x00000004); + } + result.availableMaintenanceVersions_ = availableMaintenanceVersions_; } private void buildPartial0(com.google.cloud.redis.v1.Instance result) { @@ -3411,6 +4008,22 @@ private void buildPartial0(com.google.cloud.redis.v1.Instance result) { if (((from_bitField0_ & 0x20000000) != 0)) { result.readReplicasMode_ = readReplicasMode_; } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.customerManagedKey_ = customerManagedKey_; + } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.persistenceConfig_ = + persistenceConfigBuilder_ == null + ? persistenceConfig_ + : persistenceConfigBuilder_.build(); + } + } + + private void buildPartial1(com.google.cloud.redis.v1.Instance result) { + int from_bitField1_ = bitField1_; + if (((from_bitField1_ & 0x00000002) != 0)) { + result.maintenanceVersion_ = maintenanceVersion_; + } } @java.lang.Override @@ -3620,6 +4233,39 @@ public Builder mergeFrom(com.google.cloud.redis.v1.Instance other) { if (other.readReplicasMode_ != 0) { setReadReplicasModeValue(other.getReadReplicasModeValue()); } + if (!other.getCustomerManagedKey().isEmpty()) { + customerManagedKey_ = other.customerManagedKey_; + bitField0_ |= 0x40000000; + onChanged(); + } + if (other.hasPersistenceConfig()) { + mergePersistenceConfig(other.getPersistenceConfig()); + } + if (!other.suspensionReasons_.isEmpty()) { + if (suspensionReasons_.isEmpty()) { + suspensionReasons_ = other.suspensionReasons_; + bitField1_ = (bitField1_ & ~0x00000001); + } else { + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.addAll(other.suspensionReasons_); + } + onChanged(); + } + if (!other.getMaintenanceVersion().isEmpty()) { + maintenanceVersion_ = other.maintenanceVersion_; + bitField1_ |= 0x00000002; + onChanged(); + } + if (!other.availableMaintenanceVersions_.isEmpty()) { + if (availableMaintenanceVersions_.isEmpty()) { + availableMaintenanceVersions_ = other.availableMaintenanceVersions_; + bitField1_ = (bitField1_ & ~0x00000004); + } else { + ensureAvailableMaintenanceVersionsIsMutable(); + availableMaintenanceVersions_.addAll(other.availableMaintenanceVersions_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3854,6 +4500,51 @@ public Builder mergeFrom( bitField0_ |= 0x20000000; break; } // case 280 + case 290: + { + customerManagedKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x40000000; + break; + } // case 290 + case 298: + { + input.readMessage( + getPersistenceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x80000000; + break; + } // case 298 + case 304: + { + int tmpRaw = input.readEnum(); + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.add(tmpRaw); + break; + } // case 304 + case 306: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 306 + case 314: + { + maintenanceVersion_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000002; + break; + } // case 314 + case 322: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAvailableMaintenanceVersionsIsMutable(); + availableMaintenanceVersions_.add(s); + break; + } // case 322 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3872,32 +4563,841 @@ public Builder mergeFrom( } private int bitField0_; + private int bitField1_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * 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}`
+     * 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][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]; + * + * @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. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+     * 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][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]; + * + * @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. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
+     * 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][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]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * 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}`
+     * 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][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]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * 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}`
+     * 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][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]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * An arbitrary and optional user-provided name for the instance.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An arbitrary and optional user-provided name for the instance.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An arbitrary and optional user-provided name for the instance.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * An arbitrary and optional user-provided name for the instance.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * An arbitrary and optional user-provided name for the instance.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000004; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private java.lang.Object locationId_ = ""; + /** + * + * + *
+     * Optional. The zone where the instance will be provisioned. If not provided,
+     * the service will choose a zone from the specified region for the instance.
+     * For standard tier, additional nodes will be added across multiple zones for
+     * protection against zonal failures. If specified, at least one node will be
+     * provisioned in this zone.
+     * 
+ * + * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The zone where the instance will be provisioned. If not provided,
+     * the service will choose a zone from the specified region for the instance.
+     * For standard tier, additional nodes will be added across multiple zones for
+     * protection against zonal failures. If specified, at least one node will be
+     * provisioned in this zone.
+     * 
+ * + * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The zone where the instance will be provisioned. If not provided,
+     * the service will choose a zone from the specified region for the instance.
+     * For standard tier, additional nodes will be added across multiple zones for
+     * protection against zonal failures. If specified, at least one node will be
+     * provisioned in this zone.
+     * 
+ * + * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + locationId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The zone where the instance will be provisioned. If not provided,
+     * the service will choose a zone from the specified region for the instance.
+     * For standard tier, additional nodes will be added across multiple zones for
+     * protection against zonal failures. If specified, at least one node will be
+     * provisioned in this zone.
+     * 
+ * + * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLocationId() { + locationId_ = getDefaultInstance().getLocationId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The zone where the instance will be provisioned. If not provided,
+     * the service will choose a zone from the specified region for the instance.
+     * For standard tier, additional nodes will be added across multiple zones for
+     * protection against zonal failures. If specified, at least one node will be
+     * provisioned in this zone.
+     * 
+ * + * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + locationId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object alternativeLocationId_ = ""; + /** + * + * + *
+     * Optional. If specified, at least one node will be provisioned in this zone
+     * in addition to the zone specified in location_id. Only applicable to
+     * standard tier. If provided, it must be a different zone from the one
+     * provided in [location_id]. Additional nodes beyond the first 2 will be
+     * placed in zones selected by the service.
+     * 
+ * + * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The alternativeLocationId. + */ + public java.lang.String getAlternativeLocationId() { + java.lang.Object ref = alternativeLocationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alternativeLocationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. If specified, at least one node will be provisioned in this zone
+     * in addition to the zone specified in location_id. Only applicable to
+     * standard tier. If provided, it must be a different zone from the one
+     * provided in [location_id]. Additional nodes beyond the first 2 will be
+     * placed in zones selected by the service.
+     * 
+ * + * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for alternativeLocationId. + */ + public com.google.protobuf.ByteString getAlternativeLocationIdBytes() { + java.lang.Object ref = alternativeLocationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + alternativeLocationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. If specified, at least one node will be provisioned in this zone
+     * in addition to the zone specified in location_id. Only applicable to
+     * standard tier. If provided, it must be a different zone from the one
+     * provided in [location_id]. Additional nodes beyond the first 2 will be
+     * placed in zones selected by the service.
+     * 
+ * + * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The alternativeLocationId to set. + * @return This builder for chaining. + */ + public Builder setAlternativeLocationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + alternativeLocationId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If specified, at least one node will be provisioned in this zone
+     * in addition to the zone specified in location_id. Only applicable to
+     * standard tier. If provided, it must be a different zone from the one
+     * provided in [location_id]. Additional nodes beyond the first 2 will be
+     * placed in zones selected by the service.
+     * 
+ * + * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAlternativeLocationId() { + alternativeLocationId_ = getDefaultInstance().getAlternativeLocationId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If specified, at least one node will be provisioned in this zone
+     * in addition to the zone specified in location_id. Only applicable to
+     * standard tier. If provided, it must be a different zone from the one
+     * provided in [location_id]. Additional nodes beyond the first 2 will be
+     * placed in zones selected by the service.
+     * 
+ * + * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for alternativeLocationId to set. + * @return This builder for chaining. + */ + public Builder setAlternativeLocationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + alternativeLocationId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object redisVersion_ = ""; + /** + * + * + *
+     * Optional. The version of Redis software.
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
+     *  *   `REDIS_3_2` for Redis 3.2 compatibility
+     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
+     *  *   `REDIS_5_0` for Redis 5.0 compatibility
+     *  *   `REDIS_6_X` for Redis 6.x compatibility
+     * 
+ * + * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. The version of Redis software.
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
+     *  *   `REDIS_3_2` for Redis 3.2 compatibility
+     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
+     *  *   `REDIS_5_0` for Redis 5.0 compatibility
+     *  *   `REDIS_6_X` for Redis 6.x compatibility
+     * 
+ * + * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. The version of Redis software.
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
+     *  *   `REDIS_3_2` for Redis 3.2 compatibility
+     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
+     *  *   `REDIS_5_0` for Redis 5.0 compatibility
+     *  *   `REDIS_6_X` for Redis 6.x compatibility
+     * 
+ * + * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The version of Redis software.
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
+     *  *   `REDIS_3_2` for Redis 3.2 compatibility
+     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
+     *  *   `REDIS_5_0` for Redis 5.0 compatibility
+     *  *   `REDIS_6_X` for Redis 6.x compatibility
+     * 
+ * + * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRedisVersion() { + redisVersion_ = getDefaultInstance().getRedisVersion(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The version of Redis software.
+     * If not provided, latest supported version will be used. Currently, the
+     * supported values are:
+     *  *   `REDIS_3_2` for Redis 3.2 compatibility
+     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
+     *  *   `REDIS_5_0` for Redis 5.0 compatibility
+     *  *   `REDIS_6_X` for Redis 6.x compatibility
+     * 
+ * + * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } - private java.lang.Object name_ = ""; + private java.lang.Object reservedIpRange_ = ""; /** * * *
-     * 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}`
-     * 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][google.cloud.redis.v1.Instance.location_id] and
-     * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details.
+     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
+     * that are reserved for this instance. Range must
+     * be unique and non-overlapping with existing subnets in an authorized
+     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
+     * address ranges associated with this private service access connection.
+     * If not provided, the service will choose an unused /29 block, for
+     * example, 10.0.0.0/29 or 192.168.0.0/29.  For READ_REPLICAS_ENABLED
+     * the default block size is /28.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The name. + * @return The reservedIpRange. */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getReservedIpRange() { + java.lang.Object ref = reservedIpRange_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + reservedIpRange_ = s; return s; } else { return (java.lang.String) ref; @@ -3907,26 +5407,26 @@ public java.lang.String getName() { * * *
-     * 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}`
-     * 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][google.cloud.redis.v1.Instance.location_id] and
-     * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details.
+     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
+     * that are reserved for this instance. Range must
+     * be unique and non-overlapping with existing subnets in an authorized
+     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
+     * address ranges associated with this private service access connection.
+     * If not provided, the service will choose an unused /29 block, for
+     * example, 10.0.0.0/29 or 192.168.0.0/29.  For READ_REPLICAS_ENABLED
+     * the default block size is /28.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The bytes for name. + * @return The bytes for reservedIpRange. */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; + public com.google.protobuf.ByteString getReservedIpRangeBytes() { + java.lang.Object ref = reservedIpRange_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; + reservedIpRange_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -3936,27 +5436,27 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * 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}`
-     * 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][google.cloud.redis.v1.Instance.location_id] and
-     * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details.
+     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
+     * that are reserved for this instance. Range must
+     * be unique and non-overlapping with existing subnets in an authorized
+     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
+     * address ranges associated with this private service access connection.
+     * If not provided, the service will choose an unused /29 block, for
+     * example, 10.0.0.0/29 or 192.168.0.0/29.  For READ_REPLICAS_ENABLED
+     * the default block size is /28.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The name to set. + * @param value The reservedIpRange to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setReservedIpRange(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; + reservedIpRange_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3964,23 +5464,23 @@ public Builder setName(java.lang.String value) { * * *
-     * 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}`
-     * 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][google.cloud.redis.v1.Instance.location_id] and
-     * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details.
+     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
+     * that are reserved for this instance. Range must
+     * be unique and non-overlapping with existing subnets in an authorized
+     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
+     * address ranges associated with this private service access connection.
+     * If not provided, the service will choose an unused /29 block, for
+     * example, 10.0.0.0/29 or 192.168.0.0/29.  For READ_REPLICAS_ENABLED
+     * the default block size is /28.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearReservedIpRange() { + reservedIpRange_ = getDefaultInstance().getReservedIpRange(); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -3988,50 +5488,54 @@ public Builder clearName() { * * *
-     * 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}`
-     * 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][google.cloud.redis.v1.Instance.location_id] and
-     * [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details.
+     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
+     * that are reserved for this instance. Range must
+     * be unique and non-overlapping with existing subnets in an authorized
+     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
+     * address ranges associated with this private service access connection.
+     * If not provided, the service will choose an unused /29 block, for
+     * example, 10.0.0.0/29 or 192.168.0.0/29.  For READ_REPLICAS_ENABLED
+     * the default block size is /28.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes for name to set. + * @param value The bytes for reservedIpRange to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setReservedIpRangeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; + reservedIpRange_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } - private java.lang.Object displayName_ = ""; + private java.lang.Object secondaryIpRange_ = ""; /** * * *
-     * An arbitrary and optional user-provided name for the instance.
+     * Optional. Additional IP range for node placement. Required when enabling
+     * read replicas on an existing instance. For DIRECT_PEERING mode value must
+     * be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode
+     * value must be the name of an allocated address range associated with the
+     * private service access connection, or "auto".
      * 
* - * string display_name = 2; + * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The displayName. + * @return The secondaryIpRange. */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; + public java.lang.String getSecondaryIpRange() { + java.lang.Object ref = secondaryIpRange_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - displayName_ = s; + secondaryIpRange_ = s; return s; } else { return (java.lang.String) ref; @@ -4041,19 +5545,23 @@ public java.lang.String getDisplayName() { * * *
-     * An arbitrary and optional user-provided name for the instance.
+     * Optional. Additional IP range for node placement. Required when enabling
+     * read replicas on an existing instance. For DIRECT_PEERING mode value must
+     * be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode
+     * value must be the name of an allocated address range associated with the
+     * private service access connection, or "auto".
      * 
* - * string display_name = 2; + * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The bytes for displayName. + * @return The bytes for secondaryIpRange. */ - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; + public com.google.protobuf.ByteString getSecondaryIpRangeBytes() { + java.lang.Object ref = secondaryIpRange_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; + secondaryIpRange_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -4063,20 +5571,24 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * *
-     * An arbitrary and optional user-provided name for the instance.
+     * Optional. Additional IP range for node placement. Required when enabling
+     * read replicas on an existing instance. For DIRECT_PEERING mode value must
+     * be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode
+     * value must be the name of an allocated address range associated with the
+     * private service access connection, or "auto".
      * 
* - * string display_name = 2; + * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The displayName to set. + * @param value The secondaryIpRange to set. * @return This builder for chaining. */ - public Builder setDisplayName(java.lang.String value) { + public Builder setSecondaryIpRange(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - displayName_ = value; - bitField0_ |= 0x00000002; + secondaryIpRange_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -4084,16 +5596,20 @@ public Builder setDisplayName(java.lang.String value) { * * *
-     * An arbitrary and optional user-provided name for the instance.
+     * Optional. Additional IP range for node placement. Required when enabling
+     * read replicas on an existing instance. For DIRECT_PEERING mode value must
+     * be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode
+     * value must be the name of an allocated address range associated with the
+     * private service access connection, or "auto".
      * 
* - * string display_name = 2; + * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearSecondaryIpRange() { + secondaryIpRange_ = getDefaultInstance().getSecondaryIpRange(); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } @@ -4101,210 +5617,213 @@ public Builder clearDisplayName() { * * *
-     * An arbitrary and optional user-provided name for the instance.
+     * Optional. Additional IP range for node placement. Required when enabling
+     * read replicas on an existing instance. For DIRECT_PEERING mode value must
+     * be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode
+     * value must be the name of an allocated address range associated with the
+     * private service access connection, or "auto".
      * 
* - * string display_name = 2; + * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes for displayName to set. + * @param value The bytes for secondaryIpRange to set. * @return This builder for chaining. */ - public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + public Builder setSecondaryIpRangeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - displayName_ = value; - bitField0_ |= 0x00000002; + secondaryIpRange_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); + private java.lang.Object host_ = ""; + /** + * + * + *
+     * Output only. Hostname or IP address of the exposed Redis endpoint used by
+     * clients to connect to the service.
+     * 
+ * + * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; } - bitField0_ |= 0x00000004; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); } /** * * *
-     * Resource labels to represent user provided metadata
+     * Output only. Hostname or IP address of the exposed Redis endpoint used by
+     * clients to connect to the service.
      * 
* - * map<string, string> labels = 3; + * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for host. */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); } /** * * *
-     * Resource labels to represent user provided metadata
+     * Output only. Hostname or IP address of the exposed Redis endpoint used by
+     * clients to connect to the service.
      * 
* - * map<string, string> labels = 3; + * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The host to set. + * @return This builder for chaining. */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); + public Builder setHost(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + host_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; } /** * * *
-     * Resource labels to represent user provided metadata
+     * Output only. Hostname or IP address of the exposed Redis endpoint used by
+     * clients to connect to the service.
      * 
* - * map<string, string> labels = 3; + * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + public Builder clearHost() { + host_ = getDefaultInstance().getHost(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; } /** * * *
-     * Resource labels to represent user provided metadata
+     * Output only. Hostname or IP address of the exposed Redis endpoint used by
+     * clients to connect to the service.
      * 
* - * map<string, string> labels = 3; + * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for host to set. + * @return This builder for chaining. */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + public Builder setHostBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return map.get(key); - } - - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000004); - internalGetMutableLabels().getMutableMap().clear(); + checkByteStringIsUtf8(value); + host_ = value; + bitField0_ |= 0x00000100; + onChanged(); return this; } + + private int port_; /** * * *
-     * Resource labels to represent user provided metadata
+     * Output only. The port number of the exposed Redis endpoint.
      * 
* - * map<string, string> labels = 3; + * int32 port = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The port. */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000004; - return internalGetMutableLabels().getMutableMap(); + @java.lang.Override + public int getPort() { + return port_; } /** * * *
-     * Resource labels to represent user provided metadata
+     * Output only. The port number of the exposed Redis endpoint.
      * 
* - * map<string, string> labels = 3; + * int32 port = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The port to set. + * @return This builder for chaining. */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000004; + public Builder setPort(int value) { + + port_ = value; + bitField0_ |= 0x00000200; + onChanged(); return this; } /** * * *
-     * Resource labels to represent user provided metadata
+     * Output only. The port number of the exposed Redis endpoint.
      * 
* - * map<string, string> labels = 3; + * int32 port = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000004; + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000200); + port_ = 0; + onChanged(); return this; } - private java.lang.Object locationId_ = ""; + private java.lang.Object currentLocationId_ = ""; /** * * *
-     * Optional. The zone where the instance will be provisioned. If not provided,
-     * the service will choose a zone from the specified region for the instance.
-     * For standard tier, additional nodes will be added across multiple zones for
-     * protection against zonal failures. If specified, at least one node will be
-     * provisioned in this zone.
+     * Output only. The current zone where the Redis primary node is located. In
+     * basic tier, this will always be the same as [location_id]. In
+     * standard tier, this can be the zone of any node in the instance.
      * 
* - * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The locationId. + * @return The currentLocationId. */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; + public java.lang.String getCurrentLocationId() { + java.lang.Object ref = currentLocationId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - locationId_ = s; + currentLocationId_ = s; return s; } else { return (java.lang.String) ref; @@ -4314,23 +5833,21 @@ public java.lang.String getLocationId() { * * *
-     * Optional. The zone where the instance will be provisioned. If not provided,
-     * the service will choose a zone from the specified region for the instance.
-     * For standard tier, additional nodes will be added across multiple zones for
-     * protection against zonal failures. If specified, at least one node will be
-     * provisioned in this zone.
+     * Output only. The current zone where the Redis primary node is located. In
+     * basic tier, this will always be the same as [location_id]. In
+     * standard tier, this can be the zone of any node in the instance.
      * 
* - * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The bytes for locationId. + * @return The bytes for currentLocationId. */ - public com.google.protobuf.ByteString getLocationIdBytes() { - java.lang.Object ref = locationId_; + public com.google.protobuf.ByteString getCurrentLocationIdBytes() { + java.lang.Object ref = currentLocationId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - locationId_ = b; + currentLocationId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -4340,24 +5857,22 @@ public com.google.protobuf.ByteString getLocationIdBytes() { * * *
-     * Optional. The zone where the instance will be provisioned. If not provided,
-     * the service will choose a zone from the specified region for the instance.
-     * For standard tier, additional nodes will be added across multiple zones for
-     * protection against zonal failures. If specified, at least one node will be
-     * provisioned in this zone.
+     * Output only. The current zone where the Redis primary node is located. In
+     * basic tier, this will always be the same as [location_id]. In
+     * standard tier, this can be the zone of any node in the instance.
      * 
* - * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @param value The locationId to set. + * @param value The currentLocationId to set. * @return This builder for chaining. */ - public Builder setLocationId(java.lang.String value) { + public Builder setCurrentLocationId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - locationId_ = value; - bitField0_ |= 0x00000008; + currentLocationId_ = value; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4365,125 +5880,180 @@ 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 from the specified region for the instance.
-     * For standard tier, additional nodes will be added across multiple zones for
-     * protection against zonal failures. If specified, at least one node will be
-     * provisioned in this zone.
+     * Output only. The current zone where the Redis primary node is located. In
+     * basic tier, this will always be the same as [location_id]. In
+     * standard tier, this can be the zone of any node in the instance.
      * 
* - * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ - public Builder clearLocationId() { - locationId_ = getDefaultInstance().getLocationId(); - bitField0_ = (bitField0_ & ~0x00000008); + public Builder clearCurrentLocationId() { + currentLocationId_ = getDefaultInstance().getCurrentLocationId(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current zone where the Redis primary node is located. In
+     * basic tier, this will always be the same as [location_id]. In
+     * standard tier, this can be the zone of any node in the instance.
+     * 
+ * + * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for currentLocationId to set. + * @return This builder for chaining. + */ + public Builder setCurrentLocationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + currentLocationId_ = value; + bitField0_ |= 0x00000400; onChanged(); return this; } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } /** * * *
-     * Optional. The zone where the instance will be provisioned. If not provided,
-     * the service will choose a zone from the specified region for the instance.
-     * For standard tier, additional nodes will be added across multiple zones for
-     * protection against zonal failures. If specified, at least one node will be
-     * provisioned in this zone.
+     * Output only. The time the instance was created.
      * 
* - * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for locationId to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); } - checkByteStringIsUtf8(value); - locationId_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000800; onChanged(); return this; } - - private java.lang.Object alternativeLocationId_ = ""; /** * * *
-     * Optional. If specified, at least one node will be provisioned in this zone
-     * in addition to the zone specified in location_id. Only applicable to
-     * standard tier. If provided, it must be a different zone from the one
-     * provided in [location_id]. Additional nodes beyond the first 2 will be
-     * placed in zones selected by the service.
+     * Output only. The time the instance was created.
      * 
* - * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The alternativeLocationId. + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public java.lang.String getAlternativeLocationId() { - java.lang.Object ref = alternativeLocationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - alternativeLocationId_ = s; - return s; + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); } else { - return (java.lang.String) ref; + createTimeBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000800; + onChanged(); + return this; } /** * * *
-     * Optional. If specified, at least one node will be provisioned in this zone
-     * in addition to the zone specified in location_id. Only applicable to
-     * standard tier. If provided, it must be a different zone from the one
-     * provided in [location_id]. Additional nodes beyond the first 2 will be
-     * placed in zones selected by the service.
+     * Output only. The time the instance was created.
      * 
* - * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for alternativeLocationId. + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.protobuf.ByteString getAlternativeLocationIdBytes() { - java.lang.Object ref = alternativeLocationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - alternativeLocationId_ = b; - return b; + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } } else { - return (com.google.protobuf.ByteString) ref; + createTimeBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000800; + onChanged(); + return this; } /** * * *
-     * Optional. If specified, at least one node will be provisioned in this zone
-     * in addition to the zone specified in location_id. Only applicable to
-     * standard tier. If provided, it must be a different zone from the one
-     * provided in [location_id]. Additional nodes beyond the first 2 will be
-     * placed in zones selected by the service.
+     * Output only. The time the instance was created.
      * 
* - * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The alternativeLocationId to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setAlternativeLocationId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000800); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; } - alternativeLocationId_ = value; - bitField0_ |= 0x00000010; onChanged(); return this; } @@ -4491,131 +6061,101 @@ public Builder setAlternativeLocationId(java.lang.String value) { * * *
-     * Optional. If specified, at least one node will be provisioned in this zone
-     * in addition to the zone specified in location_id. Only applicable to
-     * standard tier. If provided, it must be a different zone from the one
-     * provided in [location_id]. Additional nodes beyond the first 2 will be
-     * placed in zones selected by the service.
+     * Output only. The time the instance was created.
      * 
* - * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearAlternativeLocationId() { - alternativeLocationId_ = getDefaultInstance().getAlternativeLocationId(); - bitField0_ = (bitField0_ & ~0x00000010); + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000800; onChanged(); - return this; + return getCreateTimeFieldBuilder().getBuilder(); } /** * * *
-     * Optional. If specified, at least one node will be provisioned in this zone
-     * in addition to the zone specified in location_id. Only applicable to
-     * standard tier. If provided, it must be a different zone from the one
-     * provided in [location_id]. Additional nodes beyond the first 2 will be
-     * placed in zones selected by the service.
+     * Output only. The time the instance was created.
      * 
* - * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for alternativeLocationId to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setAlternativeLocationIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; } - checkByteStringIsUtf8(value); - alternativeLocationId_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; } - - private java.lang.Object redisVersion_ = ""; /** * * *
-     * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Currently, the
-     * supported values are:
-     *  *   `REDIS_3_2` for Redis 3.2 compatibility
-     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
-     *  *   `REDIS_5_0` for Redis 5.0 compatibility
-     *  *   `REDIS_6_X` for Redis 6.x compatibility
+     * Output only. The time the instance was created.
      * 
* - * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The redisVersion. + * + * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - 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; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; } + return createTimeBuilder_; } + + private int state_ = 0; /** * * *
-     * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Currently, the
-     * supported values are:
-     *  *   `REDIS_3_2` for Redis 3.2 compatibility
-     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
-     *  *   `REDIS_5_0` for Redis 5.0 compatibility
-     *  *   `REDIS_6_X` for Redis 6.x compatibility
+     * Output only. The current state of this instance.
      * 
* - * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.redis.v1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The bytes for redisVersion. + * @return The enum numeric value on the wire for state. */ - 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; - } + @java.lang.Override + public int getStateValue() { + return state_; } /** * * *
-     * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Currently, the
-     * supported values are:
-     *  *   `REDIS_3_2` for Redis 3.2 compatibility
-     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
-     *  *   `REDIS_5_0` for Redis 5.0 compatibility
-     *  *   `REDIS_6_X` for Redis 6.x compatibility
+     * Output only. The current state of this instance.
      * 
* - * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.redis.v1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @param value The redisVersion to set. + * @param value The enum numeric value on the wire for state to set. * @return This builder for chaining. */ - public Builder setRedisVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - redisVersion_ = value; - bitField0_ |= 0x00000020; + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4623,79 +6163,83 @@ public Builder setRedisVersion(java.lang.String value) { * * *
-     * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Currently, the
-     * supported values are:
-     *  *   `REDIS_3_2` for Redis 3.2 compatibility
-     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
-     *  *   `REDIS_5_0` for Redis 5.0 compatibility
-     *  *   `REDIS_6_X` for Redis 6.x compatibility
+     * Output only. The current state of this instance.
      * 
* - * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.redis.v1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return This builder for chaining. + * @return The state. */ - public Builder clearRedisVersion() { - redisVersion_ = getDefaultInstance().getRedisVersion(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; + @java.lang.Override + public com.google.cloud.redis.v1.Instance.State getState() { + com.google.cloud.redis.v1.Instance.State result = + com.google.cloud.redis.v1.Instance.State.forNumber(state_); + return result == null ? com.google.cloud.redis.v1.Instance.State.UNRECOGNIZED : result; } /** * * *
-     * Optional. The version of Redis software.
-     * If not provided, latest supported version will be used. Currently, the
-     * supported values are:
-     *  *   `REDIS_3_2` for Redis 3.2 compatibility
-     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
-     *  *   `REDIS_5_0` for Redis 5.0 compatibility
-     *  *   `REDIS_6_X` for Redis 6.x compatibility
+     * Output only. The current state of this instance.
      * 
* - * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.redis.v1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @param value The bytes for redisVersion to set. + * @param value The state to set. * @return This builder for chaining. */ - public Builder setRedisVersionBytes(com.google.protobuf.ByteString value) { + public Builder setState(com.google.cloud.redis.v1.Instance.State value) { if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - redisVersion_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00001000; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of this instance.
+     * 
+ * + * + * .google.cloud.redis.v1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00001000); + state_ = 0; onChanged(); return this; } - private java.lang.Object reservedIpRange_ = ""; + private java.lang.Object statusMessage_ = ""; /** * * *
-     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
-     * that are reserved for this instance. Range must
-     * be unique and non-overlapping with existing subnets in an authorized
-     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
-     * address ranges associated with this private service access connection.
-     * If not provided, the service will choose an unused /29 block, for
-     * example, 10.0.0.0/29 or 192.168.0.0/29.  For READ_REPLICAS_ENABLED
-     * the default block size is /28.
+     * Output only. Additional information about the current status of this
+     * instance, if available.
      * 
* - * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; + * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The reservedIpRange. + * @return The statusMessage. */ - public java.lang.String getReservedIpRange() { - java.lang.Object ref = reservedIpRange_; + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - reservedIpRange_ = s; + statusMessage_ = s; return s; } else { return (java.lang.String) ref; @@ -4705,26 +6249,20 @@ public java.lang.String getReservedIpRange() { * * *
-     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
-     * that are reserved for this instance. Range must
-     * be unique and non-overlapping with existing subnets in an authorized
-     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
-     * address ranges associated with this private service access connection.
-     * If not provided, the service will choose an unused /29 block, for
-     * example, 10.0.0.0/29 or 192.168.0.0/29.  For READ_REPLICAS_ENABLED
-     * the default block size is /28.
+     * Output only. Additional information about the current status of this
+     * instance, if available.
      * 
* - * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; + * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The bytes for reservedIpRange. + * @return The bytes for statusMessage. */ - public com.google.protobuf.ByteString getReservedIpRangeBytes() { - java.lang.Object ref = reservedIpRange_; + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - reservedIpRange_ = b; + statusMessage_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -4734,27 +6272,21 @@ public com.google.protobuf.ByteString getReservedIpRangeBytes() { * * *
-     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
-     * that are reserved for this instance. Range must
-     * be unique and non-overlapping with existing subnets in an authorized
-     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
-     * address ranges associated with this private service access connection.
-     * If not provided, the service will choose an unused /29 block, for
-     * example, 10.0.0.0/29 or 192.168.0.0/29.  For READ_REPLICAS_ENABLED
-     * the default block size is /28.
+     * Output only. Additional information about the current status of this
+     * instance, if available.
      * 
* - * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; + * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @param value The reservedIpRange to set. + * @param value The statusMessage to set. * @return This builder for chaining. */ - public Builder setReservedIpRange(java.lang.String value) { + public Builder setStatusMessage(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - reservedIpRange_ = value; - bitField0_ |= 0x00000040; + statusMessage_ = value; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4762,23 +6294,17 @@ public Builder setReservedIpRange(java.lang.String value) { * * *
-     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
-     * that are reserved for this instance. Range must
-     * be unique and non-overlapping with existing subnets in an authorized
-     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
-     * address ranges associated with this private service access connection.
-     * If not provided, the service will choose an unused /29 block, for
-     * example, 10.0.0.0/29 or 192.168.0.0/29.  For READ_REPLICAS_ENABLED
-     * the default block size is /28.
+     * Output only. Additional information about the current status of this
+     * instance, if available.
      * 
* - * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; + * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ - public Builder clearReservedIpRange() { - reservedIpRange_ = getDefaultInstance().getReservedIpRange(); - bitField0_ = (bitField0_ & ~0x00000040); + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); return this; } @@ -4786,224 +6312,325 @@ public Builder clearReservedIpRange() { * * *
-     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
-     * that are reserved for this instance. Range must
-     * be unique and non-overlapping with existing subnets in an authorized
-     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
-     * address ranges associated with this private service access connection.
-     * If not provided, the service will choose an unused /29 block, for
-     * example, 10.0.0.0/29 or 192.168.0.0/29.  For READ_REPLICAS_ENABLED
-     * the default block size is /28.
+     * Output only. Additional information about the current status of this
+     * instance, if available.
      * 
* - * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; + * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @param value The bytes for reservedIpRange to set. + * @param value The bytes for statusMessage to set. * @return This builder for chaining. */ - public Builder setReservedIpRangeBytes(com.google.protobuf.ByteString value) { + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - reservedIpRange_ = value; - bitField0_ |= 0x00000040; + statusMessage_ = value; + bitField0_ |= 0x00002000; onChanged(); return this; } - private java.lang.Object secondaryIpRange_ = ""; + private com.google.protobuf.MapField redisConfigs_; + + private com.google.protobuf.MapField + internalGetRedisConfigs() { + if (redisConfigs_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RedisConfigsDefaultEntryHolder.defaultEntry); + } + return redisConfigs_; + } + + private com.google.protobuf.MapField + internalGetMutableRedisConfigs() { + if (redisConfigs_ == null) { + redisConfigs_ = + com.google.protobuf.MapField.newMapField(RedisConfigsDefaultEntryHolder.defaultEntry); + } + if (!redisConfigs_.isMutable()) { + redisConfigs_ = redisConfigs_.copy(); + } + bitField0_ |= 0x00004000; + onChanged(); + return redisConfigs_; + } + + public int getRedisConfigsCount() { + return internalGetRedisConfigs().getMap().size(); + } /** * * *
-     * Optional. Additional IP range for node placement. Required when enabling read
-     * replicas on an existing instance. For DIRECT_PEERING mode value must be a
-     * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
-     * must be the name of an allocated address range associated with the private
-     * service access connection, or "auto".
+     * Optional. Redis configuration parameters, according to
+     * http://redis.io/topics/config. Currently, the only supported parameters
+     * are:
+     *  Redis version 3.2 and newer:
+     *  *   maxmemory-policy
+     *  *   notify-keyspace-events
+     *  Redis version 4.0 and newer:
+     *  *   activedefrag
+     *  *   lfu-decay-time
+     *  *   lfu-log-factor
+     *  *   maxmemory-gb
+     *  Redis version 5.0 and newer:
+     *  *   stream-node-max-bytes
+     *  *   stream-node-max-entries
      * 
* - * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The secondaryIpRange. + * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getSecondaryIpRange() { - java.lang.Object ref = secondaryIpRange_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - secondaryIpRange_ = s; - return s; - } else { - return (java.lang.String) ref; + @java.lang.Override + public boolean containsRedisConfigs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } + return internalGetRedisConfigs().getMap().containsKey(key); + } + /** Use {@link #getRedisConfigsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRedisConfigs() { + return getRedisConfigsMap(); + } + /** + * + * + *
+     * Optional. Redis configuration parameters, according to
+     * http://redis.io/topics/config. Currently, the only supported parameters
+     * are:
+     *  Redis version 3.2 and newer:
+     *  *   maxmemory-policy
+     *  *   notify-keyspace-events
+     *  Redis version 4.0 and newer:
+     *  *   activedefrag
+     *  *   lfu-decay-time
+     *  *   lfu-log-factor
+     *  *   maxmemory-gb
+     *  Redis version 5.0 and newer:
+     *  *   stream-node-max-bytes
+     *  *   stream-node-max-entries
+     * 
+ * + * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getRedisConfigsMap() { + return internalGetRedisConfigs().getMap(); } /** * * *
-     * Optional. Additional IP range for node placement. Required when enabling read
-     * replicas on an existing instance. For DIRECT_PEERING mode value must be a
-     * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
-     * must be the name of an allocated address range associated with the private
-     * service access connection, or "auto".
+     * Optional. Redis configuration parameters, according to
+     * http://redis.io/topics/config. Currently, the only supported parameters
+     * are:
+     *  Redis version 3.2 and newer:
+     *  *   maxmemory-policy
+     *  *   notify-keyspace-events
+     *  Redis version 4.0 and newer:
+     *  *   activedefrag
+     *  *   lfu-decay-time
+     *  *   lfu-log-factor
+     *  *   maxmemory-gb
+     *  Redis version 5.0 and newer:
+     *  *   stream-node-max-bytes
+     *  *   stream-node-max-entries
      * 
* - * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for secondaryIpRange. + * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getSecondaryIpRangeBytes() { - java.lang.Object ref = secondaryIpRange_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - secondaryIpRange_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + public /* nullable */ java.lang.String getRedisConfigsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } + java.util.Map map = internalGetRedisConfigs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Optional. Additional IP range for node placement. Required when enabling read
-     * replicas on an existing instance. For DIRECT_PEERING mode value must be a
-     * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
-     * must be the name of an allocated address range associated with the private
-     * service access connection, or "auto".
+     * Optional. Redis configuration parameters, according to
+     * http://redis.io/topics/config. Currently, the only supported parameters
+     * are:
+     *  Redis version 3.2 and newer:
+     *  *   maxmemory-policy
+     *  *   notify-keyspace-events
+     *  Redis version 4.0 and newer:
+     *  *   activedefrag
+     *  *   lfu-decay-time
+     *  *   lfu-log-factor
+     *  *   maxmemory-gb
+     *  Redis version 5.0 and newer:
+     *  *   stream-node-max-bytes
+     *  *   stream-node-max-entries
      * 
* - * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The secondaryIpRange to set. - * @return This builder for chaining. + * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setSecondaryIpRange(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public java.lang.String getRedisConfigsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - secondaryIpRange_ = value; - bitField0_ |= 0x00000080; - onChanged(); + java.util.Map map = internalGetRedisConfigs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRedisConfigs() { + bitField0_ = (bitField0_ & ~0x00004000); + internalGetMutableRedisConfigs().getMutableMap().clear(); return this; } /** * * *
-     * Optional. Additional IP range for node placement. Required when enabling read
-     * replicas on an existing instance. For DIRECT_PEERING mode value must be a
-     * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
-     * must be the name of an allocated address range associated with the private
-     * service access connection, or "auto".
+     * Optional. Redis configuration parameters, according to
+     * http://redis.io/topics/config. Currently, the only supported parameters
+     * are:
+     *  Redis version 3.2 and newer:
+     *  *   maxmemory-policy
+     *  *   notify-keyspace-events
+     *  Redis version 4.0 and newer:
+     *  *   activedefrag
+     *  *   lfu-decay-time
+     *  *   lfu-log-factor
+     *  *   maxmemory-gb
+     *  Redis version 5.0 and newer:
+     *  *   stream-node-max-bytes
+     *  *   stream-node-max-entries
      * 
* - * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. + * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearSecondaryIpRange() { - secondaryIpRange_ = getDefaultInstance().getSecondaryIpRange(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); + public Builder removeRedisConfigs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableRedisConfigs().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableRedisConfigs() { + bitField0_ |= 0x00004000; + return internalGetMutableRedisConfigs().getMutableMap(); + } /** * * *
-     * Optional. Additional IP range for node placement. Required when enabling read
-     * replicas on an existing instance. For DIRECT_PEERING mode value must be a
-     * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
-     * must be the name of an allocated address range associated with the private
-     * service access connection, or "auto".
+     * Optional. Redis configuration parameters, according to
+     * http://redis.io/topics/config. Currently, the only supported parameters
+     * are:
+     *  Redis version 3.2 and newer:
+     *  *   maxmemory-policy
+     *  *   notify-keyspace-events
+     *  Redis version 4.0 and newer:
+     *  *   activedefrag
+     *  *   lfu-decay-time
+     *  *   lfu-log-factor
+     *  *   maxmemory-gb
+     *  Redis version 5.0 and newer:
+     *  *   stream-node-max-bytes
+     *  *   stream-node-max-entries
      * 
* - * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for secondaryIpRange to set. - * @return This builder for chaining. + * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setSecondaryIpRangeBytes(com.google.protobuf.ByteString value) { + public Builder putRedisConfigs(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } if (value == null) { - throw new NullPointerException(); + throw new NullPointerException("map value"); } - checkByteStringIsUtf8(value); - secondaryIpRange_ = value; - bitField0_ |= 0x00000080; - onChanged(); + internalGetMutableRedisConfigs().getMutableMap().put(key, value); + bitField0_ |= 0x00004000; return this; } - - private java.lang.Object host_ = ""; /** * * *
-     * Output only. Hostname or IP address of the exposed Redis endpoint used by
-     * clients to connect to the service.
+     * Optional. Redis configuration parameters, according to
+     * http://redis.io/topics/config. Currently, the only supported parameters
+     * are:
+     *  Redis version 3.2 and newer:
+     *  *   maxmemory-policy
+     *  *   notify-keyspace-events
+     *  Redis version 4.0 and newer:
+     *  *   activedefrag
+     *  *   lfu-decay-time
+     *  *   lfu-log-factor
+     *  *   maxmemory-gb
+     *  Redis version 5.0 and newer:
+     *  *   stream-node-max-bytes
+     *  *   stream-node-max-entries
      * 
* - * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The host. + * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getHost() { - java.lang.Object ref = host_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - host_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public Builder putAllRedisConfigs(java.util.Map values) { + internalGetMutableRedisConfigs().getMutableMap().putAll(values); + bitField0_ |= 0x00004000; + return this; } + + private int tier_ = 0; /** * * *
-     * Output only. Hostname or IP address of the exposed Redis endpoint used by
-     * clients to connect to the service.
+     * Required. The service tier of the instance.
      * 
* - * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.redis.v1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; + * * - * @return The bytes for host. + * @return The enum numeric value on the wire for tier. */ - public com.google.protobuf.ByteString getHostBytes() { - java.lang.Object ref = host_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - host_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + @java.lang.Override + public int getTierValue() { + return tier_; } /** * * *
-     * Output only. Hostname or IP address of the exposed Redis endpoint used by
-     * clients to connect to the service.
+     * Required. The service tier of the instance.
      * 
* - * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.redis.v1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; + * * - * @param value The host to set. + * @param value The enum numeric value on the wire for tier to set. * @return This builder for chaining. */ - public Builder setHost(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - host_ = value; - bitField0_ |= 0x00000100; + public Builder setTierValue(int value) { + tier_ = value; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -5011,17 +6638,41 @@ public Builder setHost(java.lang.String value) { * * *
-     * Output only. Hostname or IP address of the exposed Redis endpoint used by
-     * clients to connect to the service.
+     * Required. The service tier of the instance.
      * 
* - * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.redis.v1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; + * * - * @return This builder for chaining. + * @return The tier. */ - public Builder clearHost() { - host_ = getDefaultInstance().getHost(); - bitField0_ = (bitField0_ & ~0x00000100); + @java.lang.Override + public com.google.cloud.redis.v1.Instance.Tier getTier() { + com.google.cloud.redis.v1.Instance.Tier result = + com.google.cloud.redis.v1.Instance.Tier.forNumber(tier_); + return result == null ? com.google.cloud.redis.v1.Instance.Tier.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. The service tier of the instance.
+     * 
+ * + * + * .google.cloud.redis.v1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The tier to set. + * @return This builder for chaining. + */ + public Builder setTier(com.google.cloud.redis.v1.Instance.Tier value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00008000; + tier_ = value.getNumber(); onChanged(); return this; } @@ -5029,58 +6680,54 @@ public Builder clearHost() { * * *
-     * Output only. Hostname or IP address of the exposed Redis endpoint used by
-     * clients to connect to the service.
+     * Required. The service tier of the instance.
      * 
* - * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.redis.v1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; + * * - * @param value The bytes for host to set. * @return This builder for chaining. */ - public Builder setHostBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - host_ = value; - bitField0_ |= 0x00000100; + public Builder clearTier() { + bitField0_ = (bitField0_ & ~0x00008000); + tier_ = 0; onChanged(); return this; } - private int port_; + private int memorySizeGb_; /** * * *
-     * Output only. The port number of the exposed Redis endpoint.
+     * Required. Redis memory size in GiB.
      * 
* - * int32 port = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * int32 memory_size_gb = 18 [(.google.api.field_behavior) = REQUIRED]; * - * @return The port. + * @return The memorySizeGb. */ @java.lang.Override - public int getPort() { - return port_; + public int getMemorySizeGb() { + return memorySizeGb_; } /** * * *
-     * Output only. The port number of the exposed Redis endpoint.
+     * Required. Redis memory size in GiB.
      * 
* - * int32 port = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * int32 memory_size_gb = 18 [(.google.api.field_behavior) = REQUIRED]; * - * @param value The port to set. + * @param value The memorySizeGb to set. * @return This builder for chaining. */ - public Builder setPort(int value) { + public Builder setMemorySizeGb(int value) { - port_ = value; - bitField0_ |= 0x00000200; + memorySizeGb_ = value; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5088,40 +6735,41 @@ public Builder setPort(int value) { * * *
-     * Output only. The port number of the exposed Redis endpoint.
+     * Required. Redis memory size in GiB.
      * 
* - * int32 port = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * int32 memory_size_gb = 18 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ - public Builder clearPort() { - bitField0_ = (bitField0_ & ~0x00000200); - port_ = 0; + public Builder clearMemorySizeGb() { + bitField0_ = (bitField0_ & ~0x00010000); + memorySizeGb_ = 0; onChanged(); return this; } - private java.lang.Object currentLocationId_ = ""; + private java.lang.Object authorizedNetwork_ = ""; /** * * *
-     * Output only. The current zone where the Redis primary node is located. In
-     * basic tier, this will always be the same as [location_id]. In
-     * standard tier, this can be the zone of any node in the instance.
+     * Optional. The full name of the Google Compute Engine
+     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
+     * instance is connected. If left unspecified, the `default` network
+     * will be used.
      * 
* - * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The currentLocationId. + * @return The authorizedNetwork. */ - public java.lang.String getCurrentLocationId() { - java.lang.Object ref = currentLocationId_; + public java.lang.String getAuthorizedNetwork() { + java.lang.Object ref = authorizedNetwork_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - currentLocationId_ = s; + authorizedNetwork_ = s; return s; } else { return (java.lang.String) ref; @@ -5131,21 +6779,22 @@ public java.lang.String getCurrentLocationId() { * * *
-     * Output only. The current zone where the Redis primary node is located. In
-     * basic tier, this will always be the same as [location_id]. In
-     * standard tier, this can be the zone of any node in the instance.
+     * Optional. The full name of the Google Compute Engine
+     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
+     * instance is connected. If left unspecified, the `default` network
+     * will be used.
      * 
* - * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The bytes for currentLocationId. + * @return The bytes for authorizedNetwork. */ - public com.google.protobuf.ByteString getCurrentLocationIdBytes() { - java.lang.Object ref = currentLocationId_; + public com.google.protobuf.ByteString getAuthorizedNetworkBytes() { + java.lang.Object ref = authorizedNetwork_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - currentLocationId_ = b; + authorizedNetwork_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -5155,22 +6804,23 @@ public com.google.protobuf.ByteString getCurrentLocationIdBytes() { * * *
-     * Output only. The current zone where the Redis primary node is located. In
-     * basic tier, this will always be the same as [location_id]. In
-     * standard tier, this can be the zone of any node in the instance.
+     * Optional. The full name of the Google Compute Engine
+     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
+     * instance is connected. If left unspecified, the `default` network
+     * will be used.
      * 
* - * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The currentLocationId to set. + * @param value The authorizedNetwork to set. * @return This builder for chaining. */ - public Builder setCurrentLocationId(java.lang.String value) { + public Builder setAuthorizedNetwork(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - currentLocationId_ = value; - bitField0_ |= 0x00000400; + authorizedNetwork_ = value; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5178,18 +6828,19 @@ public Builder setCurrentLocationId(java.lang.String value) { * * *
-     * Output only. The current zone where the Redis primary node is located. In
-     * basic tier, this will always be the same as [location_id]. In
-     * standard tier, this can be the zone of any node in the instance.
+     * Optional. The full name of the Google Compute Engine
+     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
+     * instance is connected. If left unspecified, the `default` network
+     * will be used.
      * 
* - * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearCurrentLocationId() { - currentLocationId_ = getDefaultInstance().getCurrentLocationId(); - bitField0_ = (bitField0_ & ~0x00000400); + public Builder clearAuthorizedNetwork() { + authorizedNetwork_ = getDefaultInstance().getAuthorizedNetwork(); + bitField0_ = (bitField0_ & ~0x00020000); onChanged(); return this; } @@ -5197,161 +6848,106 @@ public Builder clearCurrentLocationId() { * * *
-     * Output only. The current zone where the Redis primary node is located. In
-     * basic tier, this will always be the same as [location_id]. In
-     * standard tier, this can be the zone of any node in the instance.
+     * Optional. The full name of the Google Compute Engine
+     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
+     * instance is connected. If left unspecified, the `default` network
+     * will be used.
      * 
* - * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes for currentLocationId to set. + * @param value The bytes for authorizedNetwork to set. * @return This builder for chaining. */ - public Builder setCurrentLocationIdBytes(com.google.protobuf.ByteString value) { + public Builder setAuthorizedNetworkBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - currentLocationId_ = value; - bitField0_ |= 0x00000400; + authorizedNetwork_ = value; + bitField0_ |= 0x00020000; onChanged(); return this; } - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time the instance was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000800) != 0); - } + private java.lang.Object persistenceIamIdentity_ = ""; /** * * *
-     * Output only. The time the instance was created.
+     * Output only. Cloud IAM identity used by import / export operations to
+     * transfer data to/from Cloud Storage. Format is
+     * "serviceAccount:<service_account_email>". The value may change over time
+     * for a given instance so should be checked before each import/export
+     * operation.
      * 
* - * - * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time the instance was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @return The persistenceIamIdentity. */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; + public java.lang.String getPersistenceIamIdentity() { + java.lang.Object ref = persistenceIamIdentity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + persistenceIamIdentity_ = s; + return s; } else { - createTimeBuilder_.setMessage(value); + return (java.lang.String) ref; } - bitField0_ |= 0x00000800; - onChanged(); - return this; } /** * * *
-     * Output only. The time the instance was created.
+     * Output only. Cloud IAM identity used by import / export operations to
+     * transfer data to/from Cloud Storage. Format is
+     * "serviceAccount:<service_account_email>". The value may change over time
+     * for a given instance so should be checked before each import/export
+     * operation.
      * 
* - * - * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the instance was created.
-     * 
* - * - * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @return The bytes for persistenceIamIdentity. */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } + public com.google.protobuf.ByteString getPersistenceIamIdentityBytes() { + java.lang.Object ref = persistenceIamIdentity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + persistenceIamIdentity_ = b; + return b; } else { - createTimeBuilder_.mergeFrom(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000800; - onChanged(); - return this; } /** * * *
-     * Output only. The time the instance was created.
+     * Output only. Cloud IAM identity used by import / export operations to
+     * transfer data to/from Cloud Storage. Format is
+     * "serviceAccount:<service_account_email>". The value may change over time
+     * for a given instance so should be checked before each import/export
+     * operation.
      * 
* - * - * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param value The persistenceIamIdentity to set. + * @return This builder for chaining. */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000800); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + public Builder setPersistenceIamIdentity(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + persistenceIamIdentity_ = value; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -5359,101 +6955,89 @@ public Builder clearCreateTime() { * * *
-     * Output only. The time the instance was created.
+     * Output only. Cloud IAM identity used by import / export operations to
+     * transfer data to/from Cloud Storage. Format is
+     * "serviceAccount:<service_account_email>". The value may change over time
+     * for a given instance so should be checked before each import/export
+     * operation.
      * 
* - * - * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return This builder for chaining. */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000800; + public Builder clearPersistenceIamIdentity() { + persistenceIamIdentity_ = getDefaultInstance().getPersistenceIamIdentity(); + bitField0_ = (bitField0_ & ~0x00040000); onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return this; } /** * * *
-     * Output only. The time the instance was created.
+     * Output only. Cloud IAM identity used by import / export operations to
+     * transfer data to/from Cloud Storage. Format is
+     * "serviceAccount:<service_account_email>". The value may change over time
+     * for a given instance so should be checked before each import/export
+     * operation.
      * 
* - * - * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time the instance was created.
-     * 
* - * - * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @param value The bytes for persistenceIamIdentity to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; + public Builder setPersistenceIamIdentityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return createTimeBuilder_; + checkByteStringIsUtf8(value); + persistenceIamIdentity_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; } - private int state_ = 0; + private int connectMode_ = 0; /** * * *
-     * Output only. The current state of this instance.
+     * Optional. The network connect mode of the Redis instance.
+     * If not provided, the connect mode defaults to DIRECT_PEERING.
      * 
* * - * .google.cloud.redis.v1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The enum numeric value on the wire for state. + * @return The enum numeric value on the wire for connectMode. */ @java.lang.Override - public int getStateValue() { - return state_; + public int getConnectModeValue() { + return connectMode_; } /** * * *
-     * Output only. The current state of this instance.
+     * Optional. The network connect mode of the Redis instance.
+     * If not provided, the connect mode defaults to DIRECT_PEERING.
      * 
* * - * .google.cloud.redis.v1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * - * @param value The enum numeric value on the wire for state to set. + * @param value The enum numeric value on the wire for connectMode to set. * @return This builder for chaining. */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00001000; + public Builder setConnectModeValue(int value) { + connectMode_ = value; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -5461,41 +7045,43 @@ public Builder setStateValue(int value) { * * *
-     * Output only. The current state of this instance.
+     * Optional. The network connect mode of the Redis instance.
+     * If not provided, the connect mode defaults to DIRECT_PEERING.
      * 
* * - * .google.cloud.redis.v1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The state. + * @return The connectMode. */ @java.lang.Override - public com.google.cloud.redis.v1.Instance.State getState() { - com.google.cloud.redis.v1.Instance.State result = - com.google.cloud.redis.v1.Instance.State.forNumber(state_); - return result == null ? com.google.cloud.redis.v1.Instance.State.UNRECOGNIZED : result; + public com.google.cloud.redis.v1.Instance.ConnectMode getConnectMode() { + com.google.cloud.redis.v1.Instance.ConnectMode result = + com.google.cloud.redis.v1.Instance.ConnectMode.forNumber(connectMode_); + return result == null ? com.google.cloud.redis.v1.Instance.ConnectMode.UNRECOGNIZED : result; } /** * * *
-     * Output only. The current state of this instance.
+     * Optional. The network connect mode of the Redis instance.
+     * If not provided, the connect mode defaults to DIRECT_PEERING.
      * 
* * - * .google.cloud.redis.v1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * - * @param value The state to set. + * @param value The connectMode to set. * @return This builder for chaining. */ - public Builder setState(com.google.cloud.redis.v1.Instance.State value) { + public Builder setConnectMode(com.google.cloud.redis.v1.Instance.ConnectMode value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00001000; - state_ = value.getNumber(); + bitField0_ |= 0x00080000; + connectMode_ = value.getNumber(); onChanged(); return this; } @@ -5503,622 +7089,557 @@ public Builder setState(com.google.cloud.redis.v1.Instance.State value) { * * *
-     * Output only. The current state of this instance.
+     * Optional. The network connect mode of the Redis instance.
+     * If not provided, the connect mode defaults to DIRECT_PEERING.
      * 
* * - * .google.cloud.redis.v1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00001000); - state_ = 0; + public Builder clearConnectMode() { + bitField0_ = (bitField0_ & ~0x00080000); + connectMode_ = 0; onChanged(); return this; } - private java.lang.Object statusMessage_ = ""; + private boolean authEnabled_; /** * * *
-     * Output only. Additional information about the current status of this
-     * instance, if available.
+     * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If
+     * set to "true" AUTH is enabled on the instance. Default value is "false"
+     * meaning AUTH is disabled.
      * 
* - * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The statusMessage. + * @return The authEnabled. */ - public java.lang.String getStatusMessage() { - java.lang.Object ref = statusMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - statusMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public boolean getAuthEnabled() { + return authEnabled_; } /** * * *
-     * Output only. Additional information about the current status of this
-     * instance, if available.
+     * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If
+     * set to "true" AUTH is enabled on the instance. Default value is "false"
+     * meaning AUTH is disabled.
      * 
* - * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The bytes for statusMessage. + * @param value The authEnabled to set. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getStatusMessageBytes() { - java.lang.Object ref = statusMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - statusMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder setAuthEnabled(boolean value) { + + authEnabled_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; } /** * * *
-     * Output only. Additional information about the current status of this
-     * instance, if available.
+     * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If
+     * set to "true" AUTH is enabled on the instance. Default value is "false"
+     * meaning AUTH is disabled.
      * 
* - * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The statusMessage to set. * @return This builder for chaining. */ - public Builder setStatusMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearAuthEnabled() { + bitField0_ = (bitField0_ & ~0x00100000); + authEnabled_ = false; + onChanged(); + return this; + } + + private java.util.List serverCaCerts_ = + java.util.Collections.emptyList(); + + private void ensureServerCaCertsIsMutable() { + if (!((bitField0_ & 0x00200000) != 0)) { + serverCaCerts_ = + new java.util.ArrayList(serverCaCerts_); + bitField0_ |= 0x00200000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.v1.TlsCertificate, + com.google.cloud.redis.v1.TlsCertificate.Builder, + com.google.cloud.redis.v1.TlsCertificateOrBuilder> + serverCaCertsBuilder_; + + /** + * + * + *
+     * Output only. List of server CA certificates for the instance.
+     * 
+ * + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getServerCaCertsList() { + if (serverCaCertsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serverCaCerts_); + } else { + return serverCaCertsBuilder_.getMessageList(); } - statusMessage_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; } /** * * *
-     * Output only. Additional information about the current status of this
-     * instance, if available.
+     * Output only. List of server CA certificates for the instance.
      * 
* - * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearStatusMessage() { - statusMessage_ = getDefaultInstance().getStatusMessage(); - bitField0_ = (bitField0_ & ~0x00002000); - onChanged(); - return this; + public int getServerCaCertsCount() { + if (serverCaCertsBuilder_ == null) { + return serverCaCerts_.size(); + } else { + return serverCaCertsBuilder_.getCount(); + } } /** * * *
-     * Output only. Additional information about the current status of this
-     * instance, if available.
+     * Output only. List of server CA certificates for the instance.
      * 
* - * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for statusMessage to set. - * @return This builder for chaining. + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - statusMessage_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - private com.google.protobuf.MapField redisConfigs_; - - private com.google.protobuf.MapField - internalGetRedisConfigs() { - if (redisConfigs_ == null) { - return com.google.protobuf.MapField.emptyMapField( - RedisConfigsDefaultEntryHolder.defaultEntry); - } - return redisConfigs_; - } - - private com.google.protobuf.MapField - internalGetMutableRedisConfigs() { - if (redisConfigs_ == null) { - redisConfigs_ = - com.google.protobuf.MapField.newMapField(RedisConfigsDefaultEntryHolder.defaultEntry); - } - if (!redisConfigs_.isMutable()) { - redisConfigs_ = redisConfigs_.copy(); + public com.google.cloud.redis.v1.TlsCertificate getServerCaCerts(int index) { + if (serverCaCertsBuilder_ == null) { + return serverCaCerts_.get(index); + } else { + return serverCaCertsBuilder_.getMessage(index); } - bitField0_ |= 0x00004000; - onChanged(); - return redisConfigs_; - } - - public int getRedisConfigsCount() { - return internalGetRedisConfigs().getMap().size(); } /** * * *
-     * Optional. Redis configuration parameters, according to
-     * http://redis.io/topics/config. Currently, the only supported parameters
-     * are:
-     *  Redis version 3.2 and newer:
-     *  *   maxmemory-policy
-     *  *   notify-keyspace-events
-     *  Redis version 4.0 and newer:
-     *  *   activedefrag
-     *  *   lfu-decay-time
-     *  *   lfu-log-factor
-     *  *   maxmemory-gb
-     *  Redis version 5.0 and newer:
-     *  *   stream-node-max-bytes
-     *  *   stream-node-max-entries
+     * Output only. List of server CA certificates for the instance.
      * 
* - * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Override - public boolean containsRedisConfigs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder setServerCaCerts(int index, com.google.cloud.redis.v1.TlsCertificate value) { + if (serverCaCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServerCaCertsIsMutable(); + serverCaCerts_.set(index, value); + onChanged(); + } else { + serverCaCertsBuilder_.setMessage(index, value); } - return internalGetRedisConfigs().getMap().containsKey(key); - } - /** Use {@link #getRedisConfigsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getRedisConfigs() { - return getRedisConfigsMap(); + return this; } /** * * *
-     * Optional. Redis configuration parameters, according to
-     * http://redis.io/topics/config. Currently, the only supported parameters
-     * are:
-     *  Redis version 3.2 and newer:
-     *  *   maxmemory-policy
-     *  *   notify-keyspace-events
-     *  Redis version 4.0 and newer:
-     *  *   activedefrag
-     *  *   lfu-decay-time
-     *  *   lfu-log-factor
-     *  *   maxmemory-gb
-     *  Redis version 5.0 and newer:
-     *  *   stream-node-max-bytes
-     *  *   stream-node-max-entries
+     * Output only. List of server CA certificates for the instance.
      * 
* - * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Override - public java.util.Map getRedisConfigsMap() { - return internalGetRedisConfigs().getMap(); + public Builder setServerCaCerts( + int index, com.google.cloud.redis.v1.TlsCertificate.Builder builderForValue) { + if (serverCaCertsBuilder_ == null) { + ensureServerCaCertsIsMutable(); + serverCaCerts_.set(index, builderForValue.build()); + onChanged(); + } else { + serverCaCertsBuilder_.setMessage(index, builderForValue.build()); + } + return this; } /** * * *
-     * Optional. Redis configuration parameters, according to
-     * http://redis.io/topics/config. Currently, the only supported parameters
-     * are:
-     *  Redis version 3.2 and newer:
-     *  *   maxmemory-policy
-     *  *   notify-keyspace-events
-     *  Redis version 4.0 and newer:
-     *  *   activedefrag
-     *  *   lfu-decay-time
-     *  *   lfu-log-factor
-     *  *   maxmemory-gb
-     *  Redis version 5.0 and newer:
-     *  *   stream-node-max-bytes
-     *  *   stream-node-max-entries
+     * Output only. List of server CA certificates for the instance.
      * 
* - * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Override - public /* nullable */ java.lang.String getRedisConfigsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder addServerCaCerts(com.google.cloud.redis.v1.TlsCertificate value) { + if (serverCaCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServerCaCertsIsMutable(); + serverCaCerts_.add(value); + onChanged(); + } else { + serverCaCertsBuilder_.addMessage(value); } - java.util.Map map = internalGetRedisConfigs().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + return this; } /** * * *
-     * Optional. Redis configuration parameters, according to
-     * http://redis.io/topics/config. Currently, the only supported parameters
-     * are:
-     *  Redis version 3.2 and newer:
-     *  *   maxmemory-policy
-     *  *   notify-keyspace-events
-     *  Redis version 4.0 and newer:
-     *  *   activedefrag
-     *  *   lfu-decay-time
-     *  *   lfu-log-factor
-     *  *   maxmemory-gb
-     *  Redis version 5.0 and newer:
-     *  *   stream-node-max-bytes
-     *  *   stream-node-max-entries
+     * Output only. List of server CA certificates for the instance.
      * 
* - * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Override - public java.lang.String getRedisConfigsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetRedisConfigs().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + public Builder addServerCaCerts(int index, com.google.cloud.redis.v1.TlsCertificate value) { + if (serverCaCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServerCaCertsIsMutable(); + serverCaCerts_.add(index, value); + onChanged(); + } else { + serverCaCertsBuilder_.addMessage(index, value); } - return map.get(key); - } - - public Builder clearRedisConfigs() { - bitField0_ = (bitField0_ & ~0x00004000); - internalGetMutableRedisConfigs().getMutableMap().clear(); return this; } /** * * *
-     * Optional. Redis configuration parameters, according to
-     * http://redis.io/topics/config. Currently, the only supported parameters
-     * are:
-     *  Redis version 3.2 and newer:
-     *  *   maxmemory-policy
-     *  *   notify-keyspace-events
-     *  Redis version 4.0 and newer:
-     *  *   activedefrag
-     *  *   lfu-decay-time
-     *  *   lfu-log-factor
-     *  *   maxmemory-gb
-     *  Redis version 5.0 and newer:
-     *  *   stream-node-max-bytes
-     *  *   stream-node-max-entries
+     * Output only. List of server CA certificates for the instance.
+     * 
+ * + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServerCaCerts( + com.google.cloud.redis.v1.TlsCertificate.Builder builderForValue) { + if (serverCaCertsBuilder_ == null) { + ensureServerCaCertsIsMutable(); + serverCaCerts_.add(builderForValue.build()); + onChanged(); + } else { + serverCaCertsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. List of server CA certificates for the instance.
      * 
* - * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder removeRedisConfigs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder addServerCaCerts( + int index, com.google.cloud.redis.v1.TlsCertificate.Builder builderForValue) { + if (serverCaCertsBuilder_ == null) { + ensureServerCaCertsIsMutable(); + serverCaCerts_.add(index, builderForValue.build()); + onChanged(); + } else { + serverCaCertsBuilder_.addMessage(index, builderForValue.build()); } - internalGetMutableRedisConfigs().getMutableMap().remove(key); return this; } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableRedisConfigs() { - bitField0_ |= 0x00004000; - return internalGetMutableRedisConfigs().getMutableMap(); - } /** * * *
-     * Optional. Redis configuration parameters, according to
-     * http://redis.io/topics/config. Currently, the only supported parameters
-     * are:
-     *  Redis version 3.2 and newer:
-     *  *   maxmemory-policy
-     *  *   notify-keyspace-events
-     *  Redis version 4.0 and newer:
-     *  *   activedefrag
-     *  *   lfu-decay-time
-     *  *   lfu-log-factor
-     *  *   maxmemory-gb
-     *  Redis version 5.0 and newer:
-     *  *   stream-node-max-bytes
-     *  *   stream-node-max-entries
+     * Output only. List of server CA certificates for the instance.
      * 
* - * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder putRedisConfigs(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); + public Builder addAllServerCaCerts( + java.lang.Iterable values) { + if (serverCaCertsBuilder_ == null) { + ensureServerCaCertsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serverCaCerts_); + onChanged(); + } else { + serverCaCertsBuilder_.addAllMessages(values); } - internalGetMutableRedisConfigs().getMutableMap().put(key, value); - bitField0_ |= 0x00004000; return this; } /** * * *
-     * Optional. Redis configuration parameters, according to
-     * http://redis.io/topics/config. Currently, the only supported parameters
-     * are:
-     *  Redis version 3.2 and newer:
-     *  *   maxmemory-policy
-     *  *   notify-keyspace-events
-     *  Redis version 4.0 and newer:
-     *  *   activedefrag
-     *  *   lfu-decay-time
-     *  *   lfu-log-factor
-     *  *   maxmemory-gb
-     *  Redis version 5.0 and newer:
-     *  *   stream-node-max-bytes
-     *  *   stream-node-max-entries
+     * Output only. List of server CA certificates for the instance.
      * 
* - * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder putAllRedisConfigs(java.util.Map values) { - internalGetMutableRedisConfigs().getMutableMap().putAll(values); - bitField0_ |= 0x00004000; + public Builder clearServerCaCerts() { + if (serverCaCertsBuilder_ == null) { + serverCaCerts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00200000); + onChanged(); + } else { + serverCaCertsBuilder_.clear(); + } return this; } - - private int tier_ = 0; /** * * *
-     * Required. The service tier of the instance.
+     * Output only. List of server CA certificates for the instance.
      * 
* * - * .google.cloud.redis.v1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The enum numeric value on the wire for tier. */ - @java.lang.Override - public int getTierValue() { - return tier_; + public Builder removeServerCaCerts(int index) { + if (serverCaCertsBuilder_ == null) { + ensureServerCaCertsIsMutable(); + serverCaCerts_.remove(index); + onChanged(); + } else { + serverCaCertsBuilder_.remove(index); + } + return this; } /** * * *
-     * Required. The service tier of the instance.
+     * Output only. List of server CA certificates for the instance.
      * 
* * - * .google.cloud.redis.v1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param value The enum numeric value on the wire for tier to set. - * @return This builder for chaining. */ - public Builder setTierValue(int value) { - tier_ = value; - bitField0_ |= 0x00008000; - onChanged(); - return this; + public com.google.cloud.redis.v1.TlsCertificate.Builder getServerCaCertsBuilder(int index) { + return getServerCaCertsFieldBuilder().getBuilder(index); } /** * * *
-     * Required. The service tier of the instance.
+     * Output only. List of server CA certificates for the instance.
      * 
* * - * .google.cloud.redis.v1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The tier. */ - @java.lang.Override - public com.google.cloud.redis.v1.Instance.Tier getTier() { - com.google.cloud.redis.v1.Instance.Tier result = - com.google.cloud.redis.v1.Instance.Tier.forNumber(tier_); - return result == null ? com.google.cloud.redis.v1.Instance.Tier.UNRECOGNIZED : result; + public com.google.cloud.redis.v1.TlsCertificateOrBuilder getServerCaCertsOrBuilder(int index) { + if (serverCaCertsBuilder_ == null) { + return serverCaCerts_.get(index); + } else { + return serverCaCertsBuilder_.getMessageOrBuilder(index); + } } /** * * *
-     * Required. The service tier of the instance.
+     * Output only. List of server CA certificates for the instance.
      * 
* * - * .google.cloud.redis.v1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param value The tier to set. - * @return This builder for chaining. */ - public Builder setTier(com.google.cloud.redis.v1.Instance.Tier value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List + getServerCaCertsOrBuilderList() { + if (serverCaCertsBuilder_ != null) { + return serverCaCertsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serverCaCerts_); } - bitField0_ |= 0x00008000; - tier_ = value.getNumber(); - onChanged(); - return this; } /** * * *
-     * Required. The service tier of the instance.
+     * Output only. List of server CA certificates for the instance.
      * 
* * - * .google.cloud.redis.v1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return This builder for chaining. */ - public Builder clearTier() { - bitField0_ = (bitField0_ & ~0x00008000); - tier_ = 0; - onChanged(); - return this; + public com.google.cloud.redis.v1.TlsCertificate.Builder addServerCaCertsBuilder() { + return getServerCaCertsFieldBuilder() + .addBuilder(com.google.cloud.redis.v1.TlsCertificate.getDefaultInstance()); } - - private int memorySizeGb_; /** * * *
-     * Required. Redis memory size in GiB.
+     * Output only. List of server CA certificates for the instance.
      * 
* - * int32 memory_size_gb = 18 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The memorySizeGb. + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public int getMemorySizeGb() { - return memorySizeGb_; + public com.google.cloud.redis.v1.TlsCertificate.Builder addServerCaCertsBuilder(int index) { + return getServerCaCertsFieldBuilder() + .addBuilder(index, com.google.cloud.redis.v1.TlsCertificate.getDefaultInstance()); } /** * * *
-     * Required. Redis memory size in GiB.
+     * Output only. List of server CA certificates for the instance.
      * 
* - * int32 memory_size_gb = 18 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The memorySizeGb to set. - * @return This builder for chaining. + * + * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setMemorySizeGb(int value) { + public java.util.List + getServerCaCertsBuilderList() { + return getServerCaCertsFieldBuilder().getBuilderList(); + } - memorySizeGb_ = value; - bitField0_ |= 0x00010000; - onChanged(); - return this; + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.v1.TlsCertificate, + com.google.cloud.redis.v1.TlsCertificate.Builder, + com.google.cloud.redis.v1.TlsCertificateOrBuilder> + getServerCaCertsFieldBuilder() { + if (serverCaCertsBuilder_ == null) { + serverCaCertsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.v1.TlsCertificate, + com.google.cloud.redis.v1.TlsCertificate.Builder, + com.google.cloud.redis.v1.TlsCertificateOrBuilder>( + serverCaCerts_, + ((bitField0_ & 0x00200000) != 0), + getParentForChildren(), + isClean()); + serverCaCerts_ = null; + } + return serverCaCertsBuilder_; } + + private int transitEncryptionMode_ = 0; /** * * *
-     * Required. Redis memory size in GiB.
+     * Optional. The TLS mode of the Redis instance.
+     * If not provided, TLS is disabled for the instance.
      * 
* - * int32 memory_size_gb = 18 [(.google.api.field_behavior) = REQUIRED]; + * + * .google.cloud.redis.v1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return This builder for chaining. + * @return The enum numeric value on the wire for transitEncryptionMode. */ - public Builder clearMemorySizeGb() { - bitField0_ = (bitField0_ & ~0x00010000); - memorySizeGb_ = 0; - onChanged(); - return this; + @java.lang.Override + public int getTransitEncryptionModeValue() { + return transitEncryptionMode_; } - - private java.lang.Object authorizedNetwork_ = ""; /** * * *
-     * Optional. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected. If left unspecified, the `default` network
-     * will be used.
+     * Optional. The TLS mode of the Redis instance.
+     * If not provided, TLS is disabled for the instance.
      * 
* - * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.redis.v1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The authorizedNetwork. + * @param value The enum numeric value on the wire for transitEncryptionMode to set. + * @return This builder for chaining. */ - public java.lang.String getAuthorizedNetwork() { - java.lang.Object ref = authorizedNetwork_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - authorizedNetwork_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public Builder setTransitEncryptionModeValue(int value) { + transitEncryptionMode_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; } /** * * *
-     * Optional. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected. If left unspecified, the `default` network
-     * will be used.
+     * Optional. The TLS mode of the Redis instance.
+     * If not provided, TLS is disabled for the instance.
      * 
* - * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.redis.v1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The bytes for authorizedNetwork. + * @return The transitEncryptionMode. */ - public com.google.protobuf.ByteString getAuthorizedNetworkBytes() { - java.lang.Object ref = authorizedNetwork_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - authorizedNetwork_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + @java.lang.Override + public com.google.cloud.redis.v1.Instance.TransitEncryptionMode getTransitEncryptionMode() { + com.google.cloud.redis.v1.Instance.TransitEncryptionMode result = + com.google.cloud.redis.v1.Instance.TransitEncryptionMode.forNumber( + transitEncryptionMode_); + return result == null + ? com.google.cloud.redis.v1.Instance.TransitEncryptionMode.UNRECOGNIZED + : result; } /** * * *
-     * Optional. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected. If left unspecified, the `default` network
-     * will be used.
+     * Optional. The TLS mode of the Redis instance.
+     * If not provided, TLS is disabled for the instance.
      * 
* - * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.redis.v1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The authorizedNetwork to set. + * @param value The transitEncryptionMode to set. * @return This builder for chaining. */ - public Builder setAuthorizedNetwork(java.lang.String value) { + public Builder setTransitEncryptionMode( + com.google.cloud.redis.v1.Instance.TransitEncryptionMode value) { if (value == null) { throw new NullPointerException(); } - authorizedNetwork_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00400000; + transitEncryptionMode_ = value.getNumber(); onChanged(); return this; } @@ -6126,126 +7647,114 @@ public Builder setAuthorizedNetwork(java.lang.String value) { * * *
-     * Optional. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected. If left unspecified, the `default` network
-     * will be used.
+     * Optional. The TLS mode of the Redis instance.
+     * If not provided, TLS is disabled for the instance.
      * 
* - * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.redis.v1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ - public Builder clearAuthorizedNetwork() { - authorizedNetwork_ = getDefaultInstance().getAuthorizedNetwork(); - bitField0_ = (bitField0_ & ~0x00020000); + public Builder clearTransitEncryptionMode() { + bitField0_ = (bitField0_ & ~0x00400000); + transitEncryptionMode_ = 0; onChanged(); return this; } + + private com.google.cloud.redis.v1.MaintenancePolicy maintenancePolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.v1.MaintenancePolicy, + com.google.cloud.redis.v1.MaintenancePolicy.Builder, + com.google.cloud.redis.v1.MaintenancePolicyOrBuilder> + maintenancePolicyBuilder_; /** * * *
-     * Optional. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
-     * instance is connected. If left unspecified, the `default` network
-     * will be used.
+     * Optional. The maintenance policy for the instance. If not provided,
+     * maintenance events can be performed at any time.
      * 
* - * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The bytes for authorizedNetwork to set. - * @return This builder for chaining. + * @return Whether the maintenancePolicy field is set. */ - public Builder setAuthorizedNetworkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - authorizedNetwork_ = value; - bitField0_ |= 0x00020000; - onChanged(); - return this; + public boolean hasMaintenancePolicy() { + return ((bitField0_ & 0x00800000) != 0); } - - private java.lang.Object persistenceIamIdentity_ = ""; /** * * *
-     * Output only. Cloud IAM identity used by import / export operations to
-     * transfer data to/from Cloud Storage. Format is
-     * "serviceAccount:<service_account_email>". The value may change over time
-     * for a given instance so should be checked before each import/export
-     * operation.
+     * Optional. The maintenance policy for the instance. If not provided,
+     * maintenance events can be performed at any time.
      * 
* - * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The persistenceIamIdentity. + * @return The maintenancePolicy. */ - public java.lang.String getPersistenceIamIdentity() { - java.lang.Object ref = persistenceIamIdentity_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - persistenceIamIdentity_ = s; - return s; + public com.google.cloud.redis.v1.MaintenancePolicy getMaintenancePolicy() { + if (maintenancePolicyBuilder_ == null) { + return maintenancePolicy_ == null + ? com.google.cloud.redis.v1.MaintenancePolicy.getDefaultInstance() + : maintenancePolicy_; } else { - return (java.lang.String) ref; + return maintenancePolicyBuilder_.getMessage(); } } /** * * *
-     * Output only. Cloud IAM identity used by import / export operations to
-     * transfer data to/from Cloud Storage. Format is
-     * "serviceAccount:<service_account_email>". The value may change over time
-     * for a given instance so should be checked before each import/export
-     * operation.
+     * Optional. The maintenance policy for the instance. If not provided,
+     * maintenance events can be performed at any time.
      * 
* - * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The bytes for persistenceIamIdentity. */ - public com.google.protobuf.ByteString getPersistenceIamIdentityBytes() { - java.lang.Object ref = persistenceIamIdentity_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - persistenceIamIdentity_ = b; - return b; + public Builder setMaintenancePolicy(com.google.cloud.redis.v1.MaintenancePolicy value) { + if (maintenancePolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maintenancePolicy_ = value; } else { - return (com.google.protobuf.ByteString) ref; + maintenancePolicyBuilder_.setMessage(value); } + bitField0_ |= 0x00800000; + onChanged(); + return this; } /** * * *
-     * Output only. Cloud IAM identity used by import / export operations to
-     * transfer data to/from Cloud Storage. Format is
-     * "serviceAccount:<service_account_email>". The value may change over time
-     * for a given instance so should be checked before each import/export
-     * operation.
+     * Optional. The maintenance policy for the instance. If not provided,
+     * maintenance events can be performed at any time.
      * 
* - * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The persistenceIamIdentity to set. - * @return This builder for chaining. */ - public Builder setPersistenceIamIdentity(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setMaintenancePolicy( + com.google.cloud.redis.v1.MaintenancePolicy.Builder builderForValue) { + if (maintenancePolicyBuilder_ == null) { + maintenancePolicy_ = builderForValue.build(); + } else { + maintenancePolicyBuilder_.setMessage(builderForValue.build()); } - persistenceIamIdentity_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -6253,21 +7762,28 @@ public Builder setPersistenceIamIdentity(java.lang.String value) { * * *
-     * Output only. Cloud IAM identity used by import / export operations to
-     * transfer data to/from Cloud Storage. Format is
-     * "serviceAccount:<service_account_email>". The value may change over time
-     * for a given instance so should be checked before each import/export
-     * operation.
+     * Optional. The maintenance policy for the instance. If not provided,
+     * maintenance events can be performed at any time.
      * 
* - * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return This builder for chaining. */ - public Builder clearPersistenceIamIdentity() { - persistenceIamIdentity_ = getDefaultInstance().getPersistenceIamIdentity(); - bitField0_ = (bitField0_ & ~0x00040000); + public Builder mergeMaintenancePolicy(com.google.cloud.redis.v1.MaintenancePolicy value) { + if (maintenancePolicyBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) + && maintenancePolicy_ != null + && maintenancePolicy_ + != com.google.cloud.redis.v1.MaintenancePolicy.getDefaultInstance()) { + getMaintenancePolicyBuilder().mergeFrom(value); + } else { + maintenancePolicy_ = value; + } + } else { + maintenancePolicyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -6275,171 +7791,182 @@ public Builder clearPersistenceIamIdentity() { * * *
-     * Output only. Cloud IAM identity used by import / export operations to
-     * transfer data to/from Cloud Storage. Format is
-     * "serviceAccount:<service_account_email>". The value may change over time
-     * for a given instance so should be checked before each import/export
-     * operation.
+     * Optional. The maintenance policy for the instance. If not provided,
+     * maintenance events can be performed at any time.
      * 
* - * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The bytes for persistenceIamIdentity to set. - * @return This builder for chaining. */ - public Builder setPersistenceIamIdentityBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearMaintenancePolicy() { + bitField0_ = (bitField0_ & ~0x00800000); + maintenancePolicy_ = null; + if (maintenancePolicyBuilder_ != null) { + maintenancePolicyBuilder_.dispose(); + maintenancePolicyBuilder_ = null; } - checkByteStringIsUtf8(value); - persistenceIamIdentity_ = value; - bitField0_ |= 0x00040000; onChanged(); return this; } - - private int connectMode_ = 0; /** * * *
-     * Optional. The network connect mode of the Redis instance.
-     * If not provided, the connect mode defaults to DIRECT_PEERING.
+     * Optional. The maintenance policy for the instance. If not provided,
+     * maintenance events can be performed at any time.
      * 
* * - * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The enum numeric value on the wire for connectMode. */ - @java.lang.Override - public int getConnectModeValue() { - return connectMode_; + public com.google.cloud.redis.v1.MaintenancePolicy.Builder getMaintenancePolicyBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getMaintenancePolicyFieldBuilder().getBuilder(); } /** * * *
-     * Optional. The network connect mode of the Redis instance.
-     * If not provided, the connect mode defaults to DIRECT_PEERING.
+     * Optional. The maintenance policy for the instance. If not provided,
+     * maintenance events can be performed at any time.
      * 
* * - * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.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; - bitField0_ |= 0x00080000; - onChanged(); - return this; + public com.google.cloud.redis.v1.MaintenancePolicyOrBuilder getMaintenancePolicyOrBuilder() { + if (maintenancePolicyBuilder_ != null) { + return maintenancePolicyBuilder_.getMessageOrBuilder(); + } else { + return maintenancePolicy_ == null + ? com.google.cloud.redis.v1.MaintenancePolicy.getDefaultInstance() + : maintenancePolicy_; + } } /** * * *
-     * Optional. The network connect mode of the Redis instance.
-     * If not provided, the connect mode defaults to DIRECT_PEERING.
+     * Optional. The maintenance policy for the instance. If not provided,
+     * maintenance events can be performed at any time.
      * 
* * - * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The connectMode. */ - @java.lang.Override - public com.google.cloud.redis.v1.Instance.ConnectMode getConnectMode() { - com.google.cloud.redis.v1.Instance.ConnectMode result = - com.google.cloud.redis.v1.Instance.ConnectMode.forNumber(connectMode_); - return result == null ? com.google.cloud.redis.v1.Instance.ConnectMode.UNRECOGNIZED : result; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.v1.MaintenancePolicy, + com.google.cloud.redis.v1.MaintenancePolicy.Builder, + com.google.cloud.redis.v1.MaintenancePolicyOrBuilder> + getMaintenancePolicyFieldBuilder() { + if (maintenancePolicyBuilder_ == null) { + maintenancePolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.v1.MaintenancePolicy, + com.google.cloud.redis.v1.MaintenancePolicy.Builder, + com.google.cloud.redis.v1.MaintenancePolicyOrBuilder>( + getMaintenancePolicy(), getParentForChildren(), isClean()); + maintenancePolicy_ = null; + } + return maintenancePolicyBuilder_; } + + private com.google.cloud.redis.v1.MaintenanceSchedule maintenanceSchedule_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.v1.MaintenanceSchedule, + com.google.cloud.redis.v1.MaintenanceSchedule.Builder, + com.google.cloud.redis.v1.MaintenanceScheduleOrBuilder> + maintenanceScheduleBuilder_; /** * * *
-     * Optional. The network connect mode of the Redis instance.
-     * If not provided, the connect mode defaults to DIRECT_PEERING.
+     * Output only. Date and time of upcoming maintenance events which have been
+     * scheduled.
      * 
* * - * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @param value The connectMode to set. - * @return This builder for chaining. + * @return Whether the maintenanceSchedule field is set. */ - public Builder setConnectMode(com.google.cloud.redis.v1.Instance.ConnectMode value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00080000; - connectMode_ = value.getNumber(); - onChanged(); - return this; + public boolean hasMaintenanceSchedule() { + return ((bitField0_ & 0x01000000) != 0); } /** * * *
-     * Optional. The network connect mode of the Redis instance.
-     * If not provided, the connect mode defaults to DIRECT_PEERING.
+     * Output only. Date and time of upcoming maintenance events which have been
+     * scheduled.
      * 
* * - * .google.cloud.redis.v1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return This builder for chaining. + * @return The maintenanceSchedule. */ - public Builder clearConnectMode() { - bitField0_ = (bitField0_ & ~0x00080000); - connectMode_ = 0; - onChanged(); - return this; + public com.google.cloud.redis.v1.MaintenanceSchedule getMaintenanceSchedule() { + if (maintenanceScheduleBuilder_ == null) { + return maintenanceSchedule_ == null + ? com.google.cloud.redis.v1.MaintenanceSchedule.getDefaultInstance() + : maintenanceSchedule_; + } else { + return maintenanceScheduleBuilder_.getMessage(); + } } - - private boolean authEnabled_; /** * * *
-     * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to
-     * "true" AUTH is enabled on the instance. Default value is "false" meaning
-     * AUTH is disabled.
+     * Output only. Date and time of upcoming maintenance events which have been
+     * scheduled.
      * 
* - * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The authEnabled. + * + * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public boolean getAuthEnabled() { - return authEnabled_; + public Builder setMaintenanceSchedule(com.google.cloud.redis.v1.MaintenanceSchedule value) { + if (maintenanceScheduleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maintenanceSchedule_ = value; + } else { + maintenanceScheduleBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; } /** * * *
-     * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to
-     * "true" AUTH is enabled on the instance. Default value is "false" meaning
-     * AUTH is disabled.
+     * Output only. Date and time of upcoming maintenance events which have been
+     * scheduled.
      * 
* - * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The authEnabled to set. - * @return This builder for chaining. + * + * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setAuthEnabled(boolean value) { - - authEnabled_ = value; - bitField0_ |= 0x00100000; + public Builder setMaintenanceSchedule( + com.google.cloud.redis.v1.MaintenanceSchedule.Builder builderForValue) { + if (maintenanceScheduleBuilder_ == null) { + maintenanceSchedule_ = builderForValue.build(); + } else { + maintenanceScheduleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; onChanged(); return this; } @@ -6447,271 +7974,277 @@ public Builder setAuthEnabled(boolean value) { * * *
-     * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to
-     * "true" AUTH is enabled on the instance. Default value is "false" meaning
-     * AUTH is disabled.
+     * Output only. Date and time of upcoming maintenance events which have been
+     * scheduled.
      * 
* - * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. + * + * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearAuthEnabled() { - bitField0_ = (bitField0_ & ~0x00100000); - authEnabled_ = false; + public Builder mergeMaintenanceSchedule(com.google.cloud.redis.v1.MaintenanceSchedule value) { + if (maintenanceScheduleBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0) + && maintenanceSchedule_ != null + && maintenanceSchedule_ + != com.google.cloud.redis.v1.MaintenanceSchedule.getDefaultInstance()) { + getMaintenanceScheduleBuilder().mergeFrom(value); + } else { + maintenanceSchedule_ = value; + } + } else { + maintenanceScheduleBuilder_.mergeFrom(value); + } + bitField0_ |= 0x01000000; onChanged(); return this; } - - private java.util.List serverCaCerts_ = - java.util.Collections.emptyList(); - - private void ensureServerCaCertsIsMutable() { - if (!((bitField0_ & 0x00200000) != 0)) { - serverCaCerts_ = - new java.util.ArrayList(serverCaCerts_); - bitField0_ |= 0x00200000; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.redis.v1.TlsCertificate, - com.google.cloud.redis.v1.TlsCertificate.Builder, - com.google.cloud.redis.v1.TlsCertificateOrBuilder> - serverCaCertsBuilder_; - /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Date and time of upcoming maintenance events which have been
+     * scheduled.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public java.util.List getServerCaCertsList() { - if (serverCaCertsBuilder_ == null) { - return java.util.Collections.unmodifiableList(serverCaCerts_); - } else { - return serverCaCertsBuilder_.getMessageList(); + public Builder clearMaintenanceSchedule() { + bitField0_ = (bitField0_ & ~0x01000000); + maintenanceSchedule_ = null; + if (maintenanceScheduleBuilder_ != null) { + maintenanceScheduleBuilder_.dispose(); + maintenanceScheduleBuilder_ = null; } + onChanged(); + return this; } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Date and time of upcoming maintenance events which have been
+     * scheduled.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public int getServerCaCertsCount() { - if (serverCaCertsBuilder_ == null) { - return serverCaCerts_.size(); - } else { - return serverCaCertsBuilder_.getCount(); - } + public com.google.cloud.redis.v1.MaintenanceSchedule.Builder getMaintenanceScheduleBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return getMaintenanceScheduleFieldBuilder().getBuilder(); } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Date and time of upcoming maintenance events which have been
+     * scheduled.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.redis.v1.TlsCertificate getServerCaCerts(int index) { - if (serverCaCertsBuilder_ == null) { - return serverCaCerts_.get(index); + public com.google.cloud.redis.v1.MaintenanceScheduleOrBuilder + getMaintenanceScheduleOrBuilder() { + if (maintenanceScheduleBuilder_ != null) { + return maintenanceScheduleBuilder_.getMessageOrBuilder(); } else { - return serverCaCertsBuilder_.getMessage(index); + return maintenanceSchedule_ == null + ? com.google.cloud.redis.v1.MaintenanceSchedule.getDefaultInstance() + : maintenanceSchedule_; } } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Date and time of upcoming maintenance events which have been
+     * scheduled.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setServerCaCerts(int index, com.google.cloud.redis.v1.TlsCertificate value) { - if (serverCaCertsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServerCaCertsIsMutable(); - serverCaCerts_.set(index, value); - onChanged(); - } else { - serverCaCertsBuilder_.setMessage(index, value); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.v1.MaintenanceSchedule, + com.google.cloud.redis.v1.MaintenanceSchedule.Builder, + com.google.cloud.redis.v1.MaintenanceScheduleOrBuilder> + getMaintenanceScheduleFieldBuilder() { + if (maintenanceScheduleBuilder_ == null) { + maintenanceScheduleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.v1.MaintenanceSchedule, + com.google.cloud.redis.v1.MaintenanceSchedule.Builder, + com.google.cloud.redis.v1.MaintenanceScheduleOrBuilder>( + getMaintenanceSchedule(), getParentForChildren(), isClean()); + maintenanceSchedule_ = null; } - return this; + return maintenanceScheduleBuilder_; } + + private int replicaCount_; /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Optional. The number of replica nodes. The valid range for the Standard
+     * Tier with read replicas enabled is [1-5] and defaults to 2. If read
+     * replicas are not enabled for a Standard Tier instance, the only valid value
+     * is 1 and the default is 1. The valid value for basic tier is 0 and the
+     * default is also 0.
      * 
* - * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. */ - public Builder setServerCaCerts( - int index, com.google.cloud.redis.v1.TlsCertificate.Builder builderForValue) { - if (serverCaCertsBuilder_ == null) { - ensureServerCaCertsIsMutable(); - serverCaCerts_.set(index, builderForValue.build()); - onChanged(); - } else { - serverCaCertsBuilder_.setMessage(index, builderForValue.build()); - } - return this; + @java.lang.Override + public int getReplicaCount() { + return replicaCount_; } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Optional. The number of replica nodes. The valid range for the Standard
+     * Tier with read replicas enabled is [1-5] and defaults to 2. If read
+     * replicas are not enabled for a Standard Tier instance, the only valid value
+     * is 1 and the default is 1. The valid value for basic tier is 0 and the
+     * default is also 0.
      * 
* - * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The replicaCount to set. + * @return This builder for chaining. */ - public Builder addServerCaCerts(com.google.cloud.redis.v1.TlsCertificate value) { - if (serverCaCertsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServerCaCertsIsMutable(); - serverCaCerts_.add(value); - onChanged(); - } else { - serverCaCertsBuilder_.addMessage(value); - } + public Builder setReplicaCount(int value) { + + replicaCount_ = value; + bitField0_ |= 0x02000000; + onChanged(); return this; } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Optional. The number of replica nodes. The valid range for the Standard
+     * Tier with read replicas enabled is [1-5] and defaults to 2. If read
+     * replicas are not enabled for a Standard Tier instance, the only valid value
+     * is 1 and the default is 1. The valid value for basic tier is 0 and the
+     * default is also 0.
      * 
* - * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - public Builder addServerCaCerts(int index, com.google.cloud.redis.v1.TlsCertificate value) { - if (serverCaCertsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServerCaCertsIsMutable(); - serverCaCerts_.add(index, value); - onChanged(); - } else { - serverCaCertsBuilder_.addMessage(index, value); - } + public Builder clearReplicaCount() { + bitField0_ = (bitField0_ & ~0x02000000); + replicaCount_ = 0; + onChanged(); return this; } + + private java.util.List nodes_ = + java.util.Collections.emptyList(); + + private void ensureNodesIsMutable() { + if (!((bitField0_ & 0x04000000) != 0)) { + nodes_ = new java.util.ArrayList(nodes_); + bitField0_ |= 0x04000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.v1.NodeInfo, + com.google.cloud.redis.v1.NodeInfo.Builder, + com.google.cloud.redis.v1.NodeInfoOrBuilder> + nodesBuilder_; + /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Info per node.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder addServerCaCerts( - com.google.cloud.redis.v1.TlsCertificate.Builder builderForValue) { - if (serverCaCertsBuilder_ == null) { - ensureServerCaCertsIsMutable(); - serverCaCerts_.add(builderForValue.build()); - onChanged(); + public java.util.List getNodesList() { + if (nodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodes_); } else { - serverCaCertsBuilder_.addMessage(builderForValue.build()); + return nodesBuilder_.getMessageList(); } - return this; } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Info per node.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder addServerCaCerts( - int index, com.google.cloud.redis.v1.TlsCertificate.Builder builderForValue) { - if (serverCaCertsBuilder_ == null) { - ensureServerCaCertsIsMutable(); - serverCaCerts_.add(index, builderForValue.build()); - onChanged(); + public int getNodesCount() { + if (nodesBuilder_ == null) { + return nodes_.size(); } else { - serverCaCertsBuilder_.addMessage(index, builderForValue.build()); + return nodesBuilder_.getCount(); } - return this; } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Info per node.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder addAllServerCaCerts( - java.lang.Iterable values) { - if (serverCaCertsBuilder_ == null) { - ensureServerCaCertsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serverCaCerts_); - onChanged(); + public com.google.cloud.redis.v1.NodeInfo getNodes(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); } else { - serverCaCertsBuilder_.addAllMessages(values); + return nodesBuilder_.getMessage(index); } - return this; } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Info per node.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder clearServerCaCerts() { - if (serverCaCertsBuilder_ == null) { - serverCaCerts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00200000); + public Builder setNodes(int index, com.google.cloud.redis.v1.NodeInfo value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.set(index, value); onChanged(); } else { - serverCaCertsBuilder_.clear(); + nodesBuilder_.setMessage(index, value); } return this; } @@ -6719,20 +8252,20 @@ public Builder clearServerCaCerts() { * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Info per node.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder removeServerCaCerts(int index) { - if (serverCaCertsBuilder_ == null) { - ensureServerCaCertsIsMutable(); - serverCaCerts_.remove(index); + public Builder setNodes(int index, com.google.cloud.redis.v1.NodeInfo.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.set(index, builderForValue.build()); onChanged(); } else { - serverCaCertsBuilder_.remove(index); + nodesBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -6740,370 +8273,341 @@ public Builder removeServerCaCerts(int index) { * * *
-     * Output only. List of server CA certificates for the instance.
-     * 
- * - * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.redis.v1.TlsCertificate.Builder getServerCaCertsBuilder(int index) { - return getServerCaCertsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Info per node.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.redis.v1.TlsCertificateOrBuilder getServerCaCertsOrBuilder(int index) { - if (serverCaCertsBuilder_ == null) { - return serverCaCerts_.get(index); + public Builder addNodes(com.google.cloud.redis.v1.NodeInfo value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(value); + onChanged(); } else { - return serverCaCertsBuilder_.getMessageOrBuilder(index); + nodesBuilder_.addMessage(value); } + return this; } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Info per node.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public java.util.List - getServerCaCertsOrBuilderList() { - if (serverCaCertsBuilder_ != null) { - return serverCaCertsBuilder_.getMessageOrBuilderList(); + public Builder addNodes(int index, com.google.cloud.redis.v1.NodeInfo value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(index, value); + onChanged(); } else { - return java.util.Collections.unmodifiableList(serverCaCerts_); + nodesBuilder_.addMessage(index, value); } + return this; } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Info per node.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.redis.v1.TlsCertificate.Builder addServerCaCertsBuilder() { - return getServerCaCertsFieldBuilder() - .addBuilder(com.google.cloud.redis.v1.TlsCertificate.getDefaultInstance()); + public Builder addNodes(com.google.cloud.redis.v1.NodeInfo.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(builderForValue.build()); + } + return this; } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Info per node.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.redis.v1.TlsCertificate.Builder addServerCaCertsBuilder(int index) { - return getServerCaCertsFieldBuilder() - .addBuilder(index, com.google.cloud.redis.v1.TlsCertificate.getDefaultInstance()); + public Builder addNodes(int index, com.google.cloud.redis.v1.NodeInfo.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(index, builderForValue.build()); + } + return this; } /** * * *
-     * Output only. List of server CA certificates for the instance.
+     * Output only. Info per node.
      * 
* * - * repeated .google.cloud.redis.v1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public java.util.List - getServerCaCertsBuilderList() { - return getServerCaCertsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.redis.v1.TlsCertificate, - com.google.cloud.redis.v1.TlsCertificate.Builder, - com.google.cloud.redis.v1.TlsCertificateOrBuilder> - getServerCaCertsFieldBuilder() { - if (serverCaCertsBuilder_ == null) { - serverCaCertsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.redis.v1.TlsCertificate, - com.google.cloud.redis.v1.TlsCertificate.Builder, - com.google.cloud.redis.v1.TlsCertificateOrBuilder>( - serverCaCerts_, - ((bitField0_ & 0x00200000) != 0), - getParentForChildren(), - isClean()); - serverCaCerts_ = null; + public Builder addAllNodes( + java.lang.Iterable values) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); + onChanged(); + } else { + nodesBuilder_.addAllMessages(values); } - return serverCaCertsBuilder_; + return this; } - - private int transitEncryptionMode_ = 0; /** * * *
-     * Optional. The TLS mode of the Redis instance.
-     * If not provided, TLS is disabled for the instance.
+     * Output only. Info per node.
      * 
* * - * .google.cloud.redis.v1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The enum numeric value on the wire for transitEncryptionMode. */ - @java.lang.Override - public int getTransitEncryptionModeValue() { - return transitEncryptionMode_; + public Builder clearNodes() { + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x04000000); + onChanged(); + } else { + nodesBuilder_.clear(); + } + return this; } /** * * *
-     * Optional. The TLS mode of the Redis instance.
-     * If not provided, TLS is disabled for the instance.
+     * Output only. Info per node.
      * 
* * - * .google.cloud.redis.v1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param value The enum numeric value on the wire for transitEncryptionMode to set. - * @return This builder for chaining. */ - public Builder setTransitEncryptionModeValue(int value) { - transitEncryptionMode_ = value; - bitField0_ |= 0x00400000; - onChanged(); + public Builder removeNodes(int index) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.remove(index); + onChanged(); + } else { + nodesBuilder_.remove(index); + } return this; } /** * * *
-     * Optional. The TLS mode of the Redis instance.
-     * If not provided, TLS is disabled for the instance.
+     * Output only. Info per node.
      * 
* * - * .google.cloud.redis.v1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The transitEncryptionMode. */ - @java.lang.Override - public com.google.cloud.redis.v1.Instance.TransitEncryptionMode getTransitEncryptionMode() { - com.google.cloud.redis.v1.Instance.TransitEncryptionMode result = - com.google.cloud.redis.v1.Instance.TransitEncryptionMode.forNumber( - transitEncryptionMode_); - return result == null - ? com.google.cloud.redis.v1.Instance.TransitEncryptionMode.UNRECOGNIZED - : result; + public com.google.cloud.redis.v1.NodeInfo.Builder getNodesBuilder(int index) { + return getNodesFieldBuilder().getBuilder(index); } /** * * *
-     * Optional. The TLS mode of the Redis instance.
-     * If not provided, TLS is disabled for the instance.
+     * Output only. Info per node.
      * 
* * - * .google.cloud.redis.v1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param value The transitEncryptionMode to set. - * @return This builder for chaining. */ - public Builder setTransitEncryptionMode( - com.google.cloud.redis.v1.Instance.TransitEncryptionMode value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.redis.v1.NodeInfoOrBuilder getNodesOrBuilder(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessageOrBuilder(index); } - bitField0_ |= 0x00400000; - transitEncryptionMode_ = value.getNumber(); - onChanged(); - return this; } /** * * *
-     * Optional. The TLS mode of the Redis instance.
-     * If not provided, TLS is disabled for the instance.
+     * Output only. Info per node.
      * 
* * - * .google.cloud.redis.v1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return This builder for chaining. */ - public Builder clearTransitEncryptionMode() { - bitField0_ = (bitField0_ & ~0x00400000); - transitEncryptionMode_ = 0; - onChanged(); - return this; + public java.util.List + getNodesOrBuilderList() { + if (nodesBuilder_ != null) { + return nodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodes_); + } } - - private com.google.cloud.redis.v1.MaintenancePolicy maintenancePolicy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.MaintenancePolicy, - com.google.cloud.redis.v1.MaintenancePolicy.Builder, - com.google.cloud.redis.v1.MaintenancePolicyOrBuilder> - maintenancePolicyBuilder_; /** * * *
-     * Optional. The maintenance policy for the instance. If not provided,
-     * maintenance events can be performed at any time.
+     * Output only. Info per node.
      * 
* * - * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return Whether the maintenancePolicy field is set. */ - public boolean hasMaintenancePolicy() { - return ((bitField0_ & 0x00800000) != 0); + public com.google.cloud.redis.v1.NodeInfo.Builder addNodesBuilder() { + return getNodesFieldBuilder() + .addBuilder(com.google.cloud.redis.v1.NodeInfo.getDefaultInstance()); } /** * * *
-     * Optional. The maintenance policy for the instance. If not provided,
-     * maintenance events can be performed at any time.
+     * Output only. Info per node.
      * 
* * - * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The maintenancePolicy. */ - public com.google.cloud.redis.v1.MaintenancePolicy getMaintenancePolicy() { - if (maintenancePolicyBuilder_ == null) { - return maintenancePolicy_ == null - ? com.google.cloud.redis.v1.MaintenancePolicy.getDefaultInstance() - : maintenancePolicy_; - } else { - return maintenancePolicyBuilder_.getMessage(); - } + public com.google.cloud.redis.v1.NodeInfo.Builder addNodesBuilder(int index) { + return getNodesFieldBuilder() + .addBuilder(index, com.google.cloud.redis.v1.NodeInfo.getDefaultInstance()); } /** * * *
-     * Optional. The maintenance policy for the instance. If not provided,
-     * maintenance events can be performed at any time.
+     * Output only. Info per node.
      * 
* * - * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setMaintenancePolicy(com.google.cloud.redis.v1.MaintenancePolicy value) { - if (maintenancePolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maintenancePolicy_ = value; - } else { - maintenancePolicyBuilder_.setMessage(value); + public java.util.List getNodesBuilderList() { + return getNodesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.v1.NodeInfo, + com.google.cloud.redis.v1.NodeInfo.Builder, + com.google.cloud.redis.v1.NodeInfoOrBuilder> + getNodesFieldBuilder() { + if (nodesBuilder_ == null) { + nodesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.v1.NodeInfo, + com.google.cloud.redis.v1.NodeInfo.Builder, + com.google.cloud.redis.v1.NodeInfoOrBuilder>( + nodes_, ((bitField0_ & 0x04000000) != 0), getParentForChildren(), isClean()); + nodes_ = null; } - bitField0_ |= 0x00800000; - onChanged(); - return this; + return nodesBuilder_; } + + private java.lang.Object readEndpoint_ = ""; /** * * *
-     * Optional. The maintenance policy for the instance. If not provided,
-     * maintenance events can be performed at any time.
+     * Output only. Hostname or IP address of the exposed readonly Redis
+     * endpoint. Standard tier only. Targets all healthy replica nodes in
+     * instance. Replication is asynchronous and replica nodes will exhibit some
+     * lag behind the primary. Write requests must target 'host'.
      * 
* - * - * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; - * + * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The readEndpoint. */ - public Builder setMaintenancePolicy( - com.google.cloud.redis.v1.MaintenancePolicy.Builder builderForValue) { - if (maintenancePolicyBuilder_ == null) { - maintenancePolicy_ = builderForValue.build(); + public java.lang.String getReadEndpoint() { + java.lang.Object ref = readEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + readEndpoint_ = s; + return s; } else { - maintenancePolicyBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00800000; - onChanged(); - return this; + return (java.lang.String) ref; + } } /** * * *
-     * Optional. The maintenance policy for the instance. If not provided,
-     * maintenance events can be performed at any time.
+     * Output only. Hostname or IP address of the exposed readonly Redis
+     * endpoint. Standard tier only. Targets all healthy replica nodes in
+     * instance. Replication is asynchronous and replica nodes will exhibit some
+     * lag behind the primary. Write requests must target 'host'.
      * 
* - * - * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; - * + * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for readEndpoint. */ - public Builder mergeMaintenancePolicy(com.google.cloud.redis.v1.MaintenancePolicy value) { - if (maintenancePolicyBuilder_ == null) { - if (((bitField0_ & 0x00800000) != 0) - && maintenancePolicy_ != null - && maintenancePolicy_ - != com.google.cloud.redis.v1.MaintenancePolicy.getDefaultInstance()) { - getMaintenancePolicyBuilder().mergeFrom(value); - } else { - maintenancePolicy_ = value; - } + public com.google.protobuf.ByteString getReadEndpointBytes() { + java.lang.Object ref = readEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + readEndpoint_ = b; + return b; } else { - maintenancePolicyBuilder_.mergeFrom(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00800000; - onChanged(); - return this; } /** * * *
-     * Optional. The maintenance policy for the instance. If not provided,
-     * maintenance events can be performed at any time.
+     * Output only. Hostname or IP address of the exposed readonly Redis
+     * endpoint. Standard tier only. Targets all healthy replica nodes in
+     * instance. Replication is asynchronous and replica nodes will exhibit some
+     * lag behind the primary. Write requests must target 'host'.
      * 
* - * - * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; - * + * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The readEndpoint to set. + * @return This builder for chaining. */ - public Builder clearMaintenancePolicy() { - bitField0_ = (bitField0_ & ~0x00800000); - maintenancePolicy_ = null; - if (maintenancePolicyBuilder_ != null) { - maintenancePolicyBuilder_.dispose(); - maintenancePolicyBuilder_ = null; + public Builder setReadEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + readEndpoint_ = value; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -7111,160 +8615,141 @@ public Builder clearMaintenancePolicy() { * * *
-     * Optional. The maintenance policy for the instance. If not provided,
-     * maintenance events can be performed at any time.
+     * Output only. Hostname or IP address of the exposed readonly Redis
+     * endpoint. Standard tier only. Targets all healthy replica nodes in
+     * instance. Replication is asynchronous and replica nodes will exhibit some
+     * lag behind the primary. Write requests must target 'host'.
      * 
* - * - * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; - * + * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - public com.google.cloud.redis.v1.MaintenancePolicy.Builder getMaintenancePolicyBuilder() { - bitField0_ |= 0x00800000; + public Builder clearReadEndpoint() { + readEndpoint_ = getDefaultInstance().getReadEndpoint(); + bitField0_ = (bitField0_ & ~0x08000000); onChanged(); - return getMaintenancePolicyFieldBuilder().getBuilder(); + return this; } /** * * *
-     * Optional. The maintenance policy for the instance. If not provided,
-     * maintenance events can be performed at any time.
+     * Output only. Hostname or IP address of the exposed readonly Redis
+     * endpoint. Standard tier only. Targets all healthy replica nodes in
+     * instance. Replication is asynchronous and replica nodes will exhibit some
+     * lag behind the primary. Write requests must target 'host'.
      * 
* - * - * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; - * + * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for readEndpoint to set. + * @return This builder for chaining. */ - public com.google.cloud.redis.v1.MaintenancePolicyOrBuilder getMaintenancePolicyOrBuilder() { - if (maintenancePolicyBuilder_ != null) { - return maintenancePolicyBuilder_.getMessageOrBuilder(); - } else { - return maintenancePolicy_ == null - ? com.google.cloud.redis.v1.MaintenancePolicy.getDefaultInstance() - : maintenancePolicy_; + public Builder setReadEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + readEndpoint_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; } + + private int readEndpointPort_; /** * * *
-     * Optional. The maintenance policy for the instance. If not provided,
-     * maintenance events can be performed at any time.
+     * Output only. The port number of the exposed readonly redis
+     * endpoint. Standard tier only. Write requests should target 'port'.
      * 
* - * - * .google.cloud.redis.v1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; - * + * int32 read_endpoint_port = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The readEndpointPort. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.MaintenancePolicy, - com.google.cloud.redis.v1.MaintenancePolicy.Builder, - com.google.cloud.redis.v1.MaintenancePolicyOrBuilder> - getMaintenancePolicyFieldBuilder() { - if (maintenancePolicyBuilder_ == null) { - maintenancePolicyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.MaintenancePolicy, - com.google.cloud.redis.v1.MaintenancePolicy.Builder, - com.google.cloud.redis.v1.MaintenancePolicyOrBuilder>( - getMaintenancePolicy(), getParentForChildren(), isClean()); - maintenancePolicy_ = null; - } - return maintenancePolicyBuilder_; + @java.lang.Override + public int getReadEndpointPort() { + return readEndpointPort_; } - - private com.google.cloud.redis.v1.MaintenanceSchedule maintenanceSchedule_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.MaintenanceSchedule, - com.google.cloud.redis.v1.MaintenanceSchedule.Builder, - com.google.cloud.redis.v1.MaintenanceScheduleOrBuilder> - maintenanceScheduleBuilder_; /** * * *
-     * Output only. Date and time of upcoming maintenance events which have been
-     * scheduled.
+     * Output only. The port number of the exposed readonly redis
+     * endpoint. Standard tier only. Write requests should target 'port'.
      * 
* - * - * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * int32 read_endpoint_port = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return Whether the maintenanceSchedule field is set. + * @param value The readEndpointPort to set. + * @return This builder for chaining. */ - public boolean hasMaintenanceSchedule() { - return ((bitField0_ & 0x01000000) != 0); + public Builder setReadEndpointPort(int value) { + + readEndpointPort_ = value; + bitField0_ |= 0x10000000; + onChanged(); + return this; } /** * * *
-     * Output only. Date and time of upcoming maintenance events which have been
-     * scheduled.
+     * Output only. The port number of the exposed readonly redis
+     * endpoint. Standard tier only. Write requests should target 'port'.
      * 
* - * - * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * int32 read_endpoint_port = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The maintenanceSchedule. + * @return This builder for chaining. */ - public com.google.cloud.redis.v1.MaintenanceSchedule getMaintenanceSchedule() { - if (maintenanceScheduleBuilder_ == null) { - return maintenanceSchedule_ == null - ? com.google.cloud.redis.v1.MaintenanceSchedule.getDefaultInstance() - : maintenanceSchedule_; - } else { - return maintenanceScheduleBuilder_.getMessage(); - } + public Builder clearReadEndpointPort() { + bitField0_ = (bitField0_ & ~0x10000000); + readEndpointPort_ = 0; + onChanged(); + return this; } + + private int readReplicasMode_ = 0; /** * * *
-     * Output only. Date and time of upcoming maintenance events which have been
-     * scheduled.
+     * Optional. Read replicas mode for the instance. Defaults to
+     * READ_REPLICAS_DISABLED.
      * 
* * - * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The enum numeric value on the wire for readReplicasMode. */ - public Builder setMaintenanceSchedule(com.google.cloud.redis.v1.MaintenanceSchedule value) { - if (maintenanceScheduleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maintenanceSchedule_ = value; - } else { - maintenanceScheduleBuilder_.setMessage(value); - } - bitField0_ |= 0x01000000; - onChanged(); - return this; + @java.lang.Override + public int getReadReplicasModeValue() { + return readReplicasMode_; } /** * * *
-     * Output only. Date and time of upcoming maintenance events which have been
-     * scheduled.
+     * Optional. Read replicas mode for the instance. Defaults to
+     * READ_REPLICAS_DISABLED.
      * 
* * - * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param value The enum numeric value on the wire for readReplicasMode to set. + * @return This builder for chaining. */ - public Builder setMaintenanceSchedule( - com.google.cloud.redis.v1.MaintenanceSchedule.Builder builderForValue) { - if (maintenanceScheduleBuilder_ == null) { - maintenanceSchedule_ = builderForValue.build(); - } else { - maintenanceScheduleBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x01000000; + public Builder setReadReplicasModeValue(int value) { + readReplicasMode_ = value; + bitField0_ |= 0x20000000; onChanged(); return this; } @@ -7272,50 +8757,45 @@ public Builder setMaintenanceSchedule( * * *
-     * Output only. Date and time of upcoming maintenance events which have been
-     * scheduled.
+     * Optional. Read replicas mode for the instance. Defaults to
+     * READ_REPLICAS_DISABLED.
      * 
* * - * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The readReplicasMode. */ - public Builder mergeMaintenanceSchedule(com.google.cloud.redis.v1.MaintenanceSchedule value) { - if (maintenanceScheduleBuilder_ == null) { - if (((bitField0_ & 0x01000000) != 0) - && maintenanceSchedule_ != null - && maintenanceSchedule_ - != com.google.cloud.redis.v1.MaintenanceSchedule.getDefaultInstance()) { - getMaintenanceScheduleBuilder().mergeFrom(value); - } else { - maintenanceSchedule_ = value; - } - } else { - maintenanceScheduleBuilder_.mergeFrom(value); - } - bitField0_ |= 0x01000000; - onChanged(); - return this; + @java.lang.Override + public com.google.cloud.redis.v1.Instance.ReadReplicasMode getReadReplicasMode() { + com.google.cloud.redis.v1.Instance.ReadReplicasMode result = + com.google.cloud.redis.v1.Instance.ReadReplicasMode.forNumber(readReplicasMode_); + return result == null + ? com.google.cloud.redis.v1.Instance.ReadReplicasMode.UNRECOGNIZED + : result; } /** * * *
-     * Output only. Date and time of upcoming maintenance events which have been
-     * scheduled.
+     * Optional. Read replicas mode for the instance. Defaults to
+     * READ_REPLICAS_DISABLED.
      * 
* * - * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param value The readReplicasMode to set. + * @return This builder for chaining. */ - public Builder clearMaintenanceSchedule() { - bitField0_ = (bitField0_ & ~0x01000000); - maintenanceSchedule_ = null; - if (maintenanceScheduleBuilder_ != null) { - maintenanceScheduleBuilder_.dispose(); - maintenanceScheduleBuilder_ = null; + public Builder setReadReplicasMode(com.google.cloud.redis.v1.Instance.ReadReplicasMode value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x20000000; + readReplicasMode_ = value.getNumber(); onChanged(); return this; } @@ -7323,110 +8803,107 @@ public Builder clearMaintenanceSchedule() { * * *
-     * Output only. Date and time of upcoming maintenance events which have been
-     * scheduled.
+     * Optional. Read replicas mode for the instance. Defaults to
+     * READ_REPLICAS_DISABLED.
      * 
* * - * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return This builder for chaining. */ - public com.google.cloud.redis.v1.MaintenanceSchedule.Builder getMaintenanceScheduleBuilder() { - bitField0_ |= 0x01000000; + public Builder clearReadReplicasMode() { + bitField0_ = (bitField0_ & ~0x20000000); + readReplicasMode_ = 0; onChanged(); - return getMaintenanceScheduleFieldBuilder().getBuilder(); + return this; } + + private java.lang.Object customerManagedKey_ = ""; /** * * *
-     * Output only. Date and time of upcoming maintenance events which have been
-     * scheduled.
+     * Optional. The KMS key reference that the customer provides when trying to
+     * create the instance.
      * 
* - * - * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string customer_managed_key = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customerManagedKey. */ - public com.google.cloud.redis.v1.MaintenanceScheduleOrBuilder - getMaintenanceScheduleOrBuilder() { - if (maintenanceScheduleBuilder_ != null) { - return maintenanceScheduleBuilder_.getMessageOrBuilder(); + public java.lang.String getCustomerManagedKey() { + java.lang.Object ref = customerManagedKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customerManagedKey_ = s; + return s; } else { - return maintenanceSchedule_ == null - ? com.google.cloud.redis.v1.MaintenanceSchedule.getDefaultInstance() - : maintenanceSchedule_; + return (java.lang.String) ref; } } /** * * *
-     * Output only. Date and time of upcoming maintenance events which have been
-     * scheduled.
+     * Optional. The KMS key reference that the customer provides when trying to
+     * create the instance.
      * 
* - * - * .google.cloud.redis.v1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string customer_managed_key = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customerManagedKey. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.MaintenanceSchedule, - com.google.cloud.redis.v1.MaintenanceSchedule.Builder, - com.google.cloud.redis.v1.MaintenanceScheduleOrBuilder> - getMaintenanceScheduleFieldBuilder() { - if (maintenanceScheduleBuilder_ == null) { - maintenanceScheduleBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.MaintenanceSchedule, - com.google.cloud.redis.v1.MaintenanceSchedule.Builder, - com.google.cloud.redis.v1.MaintenanceScheduleOrBuilder>( - getMaintenanceSchedule(), getParentForChildren(), isClean()); - maintenanceSchedule_ = null; + public com.google.protobuf.ByteString getCustomerManagedKeyBytes() { + java.lang.Object ref = customerManagedKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerManagedKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - return maintenanceScheduleBuilder_; } - - private int replicaCount_; /** * * *
-     * Optional. The number of replica nodes. The valid range for the Standard Tier with
-     * read replicas enabled is [1-5] and defaults to 2. If read replicas are not
-     * enabled for a Standard Tier instance, the only valid value is 1 and the
-     * default is 1. The valid value for basic tier is 0 and the default is also
-     * 0.
+     * Optional. The KMS key reference that the customer provides when trying to
+     * create the instance.
      * 
* - * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; + * string customer_managed_key = 36 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The replicaCount. + * @param value The customerManagedKey to set. + * @return This builder for chaining. */ - @java.lang.Override - public int getReplicaCount() { - return replicaCount_; + public Builder setCustomerManagedKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + customerManagedKey_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; } /** * * *
-     * Optional. The number of replica nodes. The valid range for the Standard Tier with
-     * read replicas enabled is [1-5] and defaults to 2. If read replicas are not
-     * enabled for a Standard Tier instance, the only valid value is 1 and the
-     * default is 1. The valid value for basic tier is 0 and the default is also
-     * 0.
+     * Optional. The KMS key reference that the customer provides when trying to
+     * create the instance.
      * 
* - * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; + * string customer_managed_key = 36 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The replicaCount to set. * @return This builder for chaining. */ - public Builder setReplicaCount(int value) { - - replicaCount_ = value; - bitField0_ |= 0x02000000; + public Builder clearCustomerManagedKey() { + customerManagedKey_ = getDefaultInstance().getCustomerManagedKey(); + bitField0_ = (bitField0_ & ~0x40000000); onChanged(); return this; } @@ -7434,427 +8911,496 @@ public Builder setReplicaCount(int value) { * * *
-     * Optional. The number of replica nodes. The valid range for the Standard Tier with
-     * read replicas enabled is [1-5] and defaults to 2. If read replicas are not
-     * enabled for a Standard Tier instance, the only valid value is 1 and the
-     * default is 1. The valid value for basic tier is 0 and the default is also
-     * 0.
+     * Optional. The KMS key reference that the customer provides when trying to
+     * create the instance.
      * 
* - * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; + * string customer_managed_key = 36 [(.google.api.field_behavior) = OPTIONAL]; * + * @param value The bytes for customerManagedKey to set. * @return This builder for chaining. */ - public Builder clearReplicaCount() { - bitField0_ = (bitField0_ & ~0x02000000); - replicaCount_ = 0; + public Builder setCustomerManagedKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + customerManagedKey_ = value; + bitField0_ |= 0x40000000; onChanged(); return this; } - private java.util.List nodes_ = - java.util.Collections.emptyList(); - - private void ensureNodesIsMutable() { - if (!((bitField0_ & 0x04000000) != 0)) { - nodes_ = new java.util.ArrayList(nodes_); - bitField0_ |= 0x04000000; - } + private com.google.cloud.redis.v1.PersistenceConfig persistenceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.v1.PersistenceConfig, + com.google.cloud.redis.v1.PersistenceConfig.Builder, + com.google.cloud.redis.v1.PersistenceConfigOrBuilder> + persistenceConfigBuilder_; + /** + * + * + *
+     * Optional. Persistence configuration parameters
+     * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the persistenceConfig field is set. + */ + public boolean hasPersistenceConfig() { + return ((bitField0_ & 0x80000000) != 0); } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.redis.v1.NodeInfo, - com.google.cloud.redis.v1.NodeInfo.Builder, - com.google.cloud.redis.v1.NodeInfoOrBuilder> - nodesBuilder_; - /** * * *
-     * Output only. Info per node.
+     * Optional. Persistence configuration parameters
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The persistenceConfig. */ - public java.util.List getNodesList() { - if (nodesBuilder_ == null) { - return java.util.Collections.unmodifiableList(nodes_); + public com.google.cloud.redis.v1.PersistenceConfig getPersistenceConfig() { + if (persistenceConfigBuilder_ == null) { + return persistenceConfig_ == null + ? com.google.cloud.redis.v1.PersistenceConfig.getDefaultInstance() + : persistenceConfig_; } else { - return nodesBuilder_.getMessageList(); + return persistenceConfigBuilder_.getMessage(); } } /** * * *
-     * Output only. Info per node.
+     * Optional. Persistence configuration parameters
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public int getNodesCount() { - if (nodesBuilder_ == null) { - return nodes_.size(); + public Builder setPersistenceConfig(com.google.cloud.redis.v1.PersistenceConfig value) { + if (persistenceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persistenceConfig_ = value; } else { - return nodesBuilder_.getCount(); + persistenceConfigBuilder_.setMessage(value); } + bitField0_ |= 0x80000000; + onChanged(); + return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. Persistence configuration parameters
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.redis.v1.NodeInfo getNodes(int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); + public Builder setPersistenceConfig( + com.google.cloud.redis.v1.PersistenceConfig.Builder builderForValue) { + if (persistenceConfigBuilder_ == null) { + persistenceConfig_ = builderForValue.build(); } else { - return nodesBuilder_.getMessage(index); + persistenceConfigBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x80000000; + onChanged(); + return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. Persistence configuration parameters
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setNodes(int index, com.google.cloud.redis.v1.NodeInfo value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public Builder mergePersistenceConfig(com.google.cloud.redis.v1.PersistenceConfig value) { + if (persistenceConfigBuilder_ == null) { + if (((bitField0_ & 0x80000000) != 0) + && persistenceConfig_ != null + && persistenceConfig_ + != com.google.cloud.redis.v1.PersistenceConfig.getDefaultInstance()) { + getPersistenceConfigBuilder().mergeFrom(value); + } else { + persistenceConfig_ = value; } - ensureNodesIsMutable(); - nodes_.set(index, value); - onChanged(); } else { - nodesBuilder_.setMessage(index, value); + persistenceConfigBuilder_.mergeFrom(value); } + bitField0_ |= 0x80000000; + onChanged(); return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. Persistence configuration parameters
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setNodes(int index, com.google.cloud.redis.v1.NodeInfo.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.set(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.setMessage(index, builderForValue.build()); + public Builder clearPersistenceConfig() { + bitField0_ = (bitField0_ & ~0x80000000); + persistenceConfig_ = null; + if (persistenceConfigBuilder_ != null) { + persistenceConfigBuilder_.dispose(); + persistenceConfigBuilder_ = null; } + onChanged(); return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. Persistence configuration parameters
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addNodes(com.google.cloud.redis.v1.NodeInfo value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(value); - onChanged(); - } else { - nodesBuilder_.addMessage(value); - } - return this; + public com.google.cloud.redis.v1.PersistenceConfig.Builder getPersistenceConfigBuilder() { + bitField0_ |= 0x80000000; + onChanged(); + return getPersistenceConfigFieldBuilder().getBuilder(); } /** * * *
-     * Output only. Info per node.
+     * Optional. Persistence configuration parameters
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addNodes(int index, com.google.cloud.redis.v1.NodeInfo value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(index, value); - onChanged(); + public com.google.cloud.redis.v1.PersistenceConfigOrBuilder getPersistenceConfigOrBuilder() { + if (persistenceConfigBuilder_ != null) { + return persistenceConfigBuilder_.getMessageOrBuilder(); } else { - nodesBuilder_.addMessage(index, value); + return persistenceConfig_ == null + ? com.google.cloud.redis.v1.PersistenceConfig.getDefaultInstance() + : persistenceConfig_; } - return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. Persistence configuration parameters
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addNodes(com.google.cloud.redis.v1.NodeInfo.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(builderForValue.build()); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.v1.PersistenceConfig, + com.google.cloud.redis.v1.PersistenceConfig.Builder, + com.google.cloud.redis.v1.PersistenceConfigOrBuilder> + getPersistenceConfigFieldBuilder() { + if (persistenceConfigBuilder_ == null) { + persistenceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.v1.PersistenceConfig, + com.google.cloud.redis.v1.PersistenceConfig.Builder, + com.google.cloud.redis.v1.PersistenceConfigOrBuilder>( + getPersistenceConfig(), getParentForChildren(), isClean()); + persistenceConfig_ = null; + } + return persistenceConfigBuilder_; + } + + private java.util.List suspensionReasons_ = + java.util.Collections.emptyList(); + + private void ensureSuspensionReasonsIsMutable() { + if (!((bitField1_ & 0x00000001) != 0)) { + suspensionReasons_ = new java.util.ArrayList(suspensionReasons_); + bitField1_ |= 0x00000001; } - return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. reasons that causes instance in "SUSPENDED" state.
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return A list containing the suspensionReasons. */ - public Builder addNodes(int index, com.google.cloud.redis.v1.NodeInfo.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(index, builderForValue.build()); - } - return this; + public java.util.List + getSuspensionReasonsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.redis.v1.Instance.SuspensionReason>( + suspensionReasons_, suspensionReasons_converter_); + } + /** + * + * + *
+     * Optional. reasons that causes instance in "SUSPENDED" state.
+     * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of suspensionReasons. + */ + public int getSuspensionReasonsCount() { + return suspensionReasons_.size(); + } + /** + * + * + *
+     * Optional. reasons that causes instance in "SUSPENDED" state.
+     * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The suspensionReasons at the given index. + */ + public com.google.cloud.redis.v1.Instance.SuspensionReason getSuspensionReasons(int index) { + return suspensionReasons_converter_.convert(suspensionReasons_.get(index)); } /** * * *
-     * Output only. Info per node.
+     * Optional. reasons that causes instance in "SUSPENDED" state.
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param index The index to set the value at. + * @param value The suspensionReasons to set. + * @return This builder for chaining. */ - public Builder addAllNodes( - java.lang.Iterable values) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); - onChanged(); - } else { - nodesBuilder_.addAllMessages(values); + public Builder setSuspensionReasons( + int index, com.google.cloud.redis.v1.Instance.SuspensionReason value) { + if (value == null) { + throw new NullPointerException(); } + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.set(index, value.getNumber()); + onChanged(); return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. reasons that causes instance in "SUSPENDED" state.
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param value The suspensionReasons to add. + * @return This builder for chaining. */ - public Builder clearNodes() { - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x04000000); - onChanged(); - } else { - nodesBuilder_.clear(); + public Builder addSuspensionReasons(com.google.cloud.redis.v1.Instance.SuspensionReason value) { + if (value == null) { + throw new NullPointerException(); } + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.add(value.getNumber()); + onChanged(); return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. reasons that causes instance in "SUSPENDED" state.
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param values The suspensionReasons to add. + * @return This builder for chaining. */ - public Builder removeNodes(int index) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.remove(index); - onChanged(); - } else { - nodesBuilder_.remove(index); + public Builder addAllSuspensionReasons( + java.lang.Iterable values) { + ensureSuspensionReasonsIsMutable(); + for (com.google.cloud.redis.v1.Instance.SuspensionReason value : values) { + suspensionReasons_.add(value.getNumber()); } + onChanged(); return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. reasons that causes instance in "SUSPENDED" state.
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return This builder for chaining. */ - public com.google.cloud.redis.v1.NodeInfo.Builder getNodesBuilder(int index) { - return getNodesFieldBuilder().getBuilder(index); + public Builder clearSuspensionReasons() { + suspensionReasons_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00000001); + onChanged(); + return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. reasons that causes instance in "SUSPENDED" state.
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return A list containing the enum numeric values on the wire for suspensionReasons. */ - public com.google.cloud.redis.v1.NodeInfoOrBuilder getNodesOrBuilder(int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); - } else { - return nodesBuilder_.getMessageOrBuilder(index); - } + public java.util.List getSuspensionReasonsValueList() { + return java.util.Collections.unmodifiableList(suspensionReasons_); } /** * * *
-     * Output only. Info per node.
+     * Optional. reasons that causes instance in "SUSPENDED" state.
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of suspensionReasons at the given index. */ - public java.util.List - getNodesOrBuilderList() { - if (nodesBuilder_ != null) { - return nodesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nodes_); - } + public int getSuspensionReasonsValue(int index) { + return suspensionReasons_.get(index); } /** * * *
-     * Output only. Info per node.
+     * Optional. reasons that causes instance in "SUSPENDED" state.
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for suspensionReasons to set. + * @return This builder for chaining. */ - public com.google.cloud.redis.v1.NodeInfo.Builder addNodesBuilder() { - return getNodesFieldBuilder() - .addBuilder(com.google.cloud.redis.v1.NodeInfo.getDefaultInstance()); + public Builder setSuspensionReasonsValue(int index, int value) { + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.set(index, value); + onChanged(); + return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. reasons that causes instance in "SUSPENDED" state.
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param value The enum numeric value on the wire for suspensionReasons to add. + * @return This builder for chaining. */ - public com.google.cloud.redis.v1.NodeInfo.Builder addNodesBuilder(int index) { - return getNodesFieldBuilder() - .addBuilder(index, com.google.cloud.redis.v1.NodeInfo.getDefaultInstance()); + public Builder addSuspensionReasonsValue(int value) { + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.add(value); + onChanged(); + return this; } /** * * *
-     * Output only. Info per node.
+     * Optional. reasons that causes instance in "SUSPENDED" state.
      * 
* * - * repeated .google.cloud.redis.v1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param values The enum numeric values on the wire for suspensionReasons to add. + * @return This builder for chaining. */ - public java.util.List getNodesBuilderList() { - return getNodesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.redis.v1.NodeInfo, - com.google.cloud.redis.v1.NodeInfo.Builder, - com.google.cloud.redis.v1.NodeInfoOrBuilder> - getNodesFieldBuilder() { - if (nodesBuilder_ == null) { - nodesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.redis.v1.NodeInfo, - com.google.cloud.redis.v1.NodeInfo.Builder, - com.google.cloud.redis.v1.NodeInfoOrBuilder>( - nodes_, ((bitField0_ & 0x04000000) != 0), getParentForChildren(), isClean()); - nodes_ = null; + public Builder addAllSuspensionReasonsValue(java.lang.Iterable values) { + ensureSuspensionReasonsIsMutable(); + for (int value : values) { + suspensionReasons_.add(value); } - return nodesBuilder_; + onChanged(); + return this; } - private java.lang.Object readEndpoint_ = ""; + private java.lang.Object maintenanceVersion_ = ""; /** * * *
-     * Output only. Hostname or IP address of the exposed readonly Redis
-     * endpoint. Standard tier only. Targets all healthy replica nodes in
-     * instance. Replication is asynchronous and replica nodes will exhibit some
-     * lag behind the primary. Write requests must target 'host'.
+     * Optional. The self service update maintenance version.
+     * The version is date based such as "20210712_00_00".
      * 
* - * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string maintenance_version = 39 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The readEndpoint. + * @return The maintenanceVersion. */ - public java.lang.String getReadEndpoint() { - java.lang.Object ref = readEndpoint_; + public java.lang.String getMaintenanceVersion() { + java.lang.Object ref = maintenanceVersion_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - readEndpoint_ = s; + maintenanceVersion_ = s; return s; } else { return (java.lang.String) ref; @@ -7864,22 +9410,20 @@ public java.lang.String getReadEndpoint() { * * *
-     * Output only. Hostname or IP address of the exposed readonly Redis
-     * endpoint. Standard tier only. Targets all healthy replica nodes in
-     * instance. Replication is asynchronous and replica nodes will exhibit some
-     * lag behind the primary. Write requests must target 'host'.
+     * Optional. The self service update maintenance version.
+     * The version is date based such as "20210712_00_00".
      * 
* - * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string maintenance_version = 39 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The bytes for readEndpoint. + * @return The bytes for maintenanceVersion. */ - public com.google.protobuf.ByteString getReadEndpointBytes() { - java.lang.Object ref = readEndpoint_; + public com.google.protobuf.ByteString getMaintenanceVersionBytes() { + java.lang.Object ref = maintenanceVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - readEndpoint_ = b; + maintenanceVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -7889,23 +9433,21 @@ public com.google.protobuf.ByteString getReadEndpointBytes() { * * *
-     * Output only. Hostname or IP address of the exposed readonly Redis
-     * endpoint. Standard tier only. Targets all healthy replica nodes in
-     * instance. Replication is asynchronous and replica nodes will exhibit some
-     * lag behind the primary. Write requests must target 'host'.
+     * Optional. The self service update maintenance version.
+     * The version is date based such as "20210712_00_00".
      * 
* - * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string maintenance_version = 39 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The readEndpoint to set. + * @param value The maintenanceVersion to set. * @return This builder for chaining. */ - public Builder setReadEndpoint(java.lang.String value) { + public Builder setMaintenanceVersion(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - readEndpoint_ = value; - bitField0_ |= 0x08000000; + maintenanceVersion_ = value; + bitField1_ |= 0x00000002; onChanged(); return this; } @@ -7913,19 +9455,17 @@ public Builder setReadEndpoint(java.lang.String value) { * * *
-     * Output only. Hostname or IP address of the exposed readonly Redis
-     * endpoint. Standard tier only. Targets all healthy replica nodes in
-     * instance. Replication is asynchronous and replica nodes will exhibit some
-     * lag behind the primary. Write requests must target 'host'.
+     * Optional. The self service update maintenance version.
+     * The version is date based such as "20210712_00_00".
      * 
* - * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string maintenance_version = 39 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearReadEndpoint() { - readEndpoint_ = getDefaultInstance().getReadEndpoint(); - bitField0_ = (bitField0_ & ~0x08000000); + public Builder clearMaintenanceVersion() { + maintenanceVersion_ = getDefaultInstance().getMaintenanceVersion(); + bitField1_ = (bitField1_ & ~0x00000002); onChanged(); return this; } @@ -7933,119 +9473,128 @@ public Builder clearReadEndpoint() { * * *
-     * Output only. Hostname or IP address of the exposed readonly Redis
-     * endpoint. Standard tier only. Targets all healthy replica nodes in
-     * instance. Replication is asynchronous and replica nodes will exhibit some
-     * lag behind the primary. Write requests must target 'host'.
+     * Optional. The self service update maintenance version.
+     * The version is date based such as "20210712_00_00".
      * 
* - * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string maintenance_version = 39 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes for readEndpoint to set. + * @param value The bytes for maintenanceVersion to set. * @return This builder for chaining. */ - public Builder setReadEndpointBytes(com.google.protobuf.ByteString value) { + public Builder setMaintenanceVersionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - readEndpoint_ = value; - bitField0_ |= 0x08000000; + maintenanceVersion_ = value; + bitField1_ |= 0x00000002; onChanged(); return this; } - private int readEndpointPort_; + private com.google.protobuf.LazyStringList availableMaintenanceVersions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAvailableMaintenanceVersionsIsMutable() { + if (!((bitField1_ & 0x00000004) != 0)) { + availableMaintenanceVersions_ = + new com.google.protobuf.LazyStringArrayList(availableMaintenanceVersions_); + bitField1_ |= 0x00000004; + } + } /** * * *
-     * Output only. The port number of the exposed readonly redis
-     * endpoint. Standard tier only. Write requests should target 'port'.
+     * Optional. The available maintenance versions that an instance could update
+     * to.
      * 
* - * int32 read_endpoint_port = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The readEndpointPort. + * @return A list containing the availableMaintenanceVersions. */ - @java.lang.Override - public int getReadEndpointPort() { - return readEndpointPort_; + public com.google.protobuf.ProtocolStringList getAvailableMaintenanceVersionsList() { + return availableMaintenanceVersions_.getUnmodifiableView(); } /** * * *
-     * Output only. The port number of the exposed readonly redis
-     * endpoint. Standard tier only. Write requests should target 'port'.
+     * Optional. The available maintenance versions that an instance could update
+     * to.
      * 
* - * int32 read_endpoint_port = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The readEndpointPort to set. - * @return This builder for chaining. + * @return The count of availableMaintenanceVersions. */ - public Builder setReadEndpointPort(int value) { - - readEndpointPort_ = value; - bitField0_ |= 0x10000000; - onChanged(); - return this; + public int getAvailableMaintenanceVersionsCount() { + return availableMaintenanceVersions_.size(); } /** * * *
-     * Output only. The port number of the exposed readonly redis
-     * endpoint. Standard tier only. Write requests should target 'port'.
+     * Optional. The available maintenance versions that an instance could update
+     * to.
      * 
* - * int32 read_endpoint_port = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return This builder for chaining. + * @param index The index of the element to return. + * @return The availableMaintenanceVersions at the given index. */ - public Builder clearReadEndpointPort() { - bitField0_ = (bitField0_ & ~0x10000000); - readEndpointPort_ = 0; - onChanged(); - return this; + public java.lang.String getAvailableMaintenanceVersions(int index) { + return availableMaintenanceVersions_.get(index); } - - private int readReplicasMode_ = 0; /** * * *
-     * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
+     * Optional. The available maintenance versions that an instance could update
+     * to.
      * 
* * - * .google.cloud.redis.v1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The enum numeric value on the wire for readReplicasMode. + * @param index The index of the value to return. + * @return The bytes of the availableMaintenanceVersions at the given index. */ - @java.lang.Override - public int getReadReplicasModeValue() { - return readReplicasMode_; + public com.google.protobuf.ByteString getAvailableMaintenanceVersionsBytes(int index) { + return availableMaintenanceVersions_.getByteString(index); } /** * * *
-     * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
+     * Optional. The available maintenance versions that an instance could update
+     * to.
      * 
* * - * .google.cloud.redis.v1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; * * - * @param value The enum numeric value on the wire for readReplicasMode to set. + * @param index The index to set the value at. + * @param value The availableMaintenanceVersions to set. * @return This builder for chaining. */ - public Builder setReadReplicasModeValue(int value) { - readReplicasMode_ = value; - bitField0_ |= 0x20000000; + public Builder setAvailableMaintenanceVersions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableMaintenanceVersionsIsMutable(); + availableMaintenanceVersions_.set(index, value); onChanged(); return this; } @@ -8053,43 +9602,44 @@ public Builder setReadReplicasModeValue(int value) { * * *
-     * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
+     * Optional. The available maintenance versions that an instance could update
+     * to.
      * 
* * - * .google.cloud.redis.v1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The readReplicasMode. + * @param value The availableMaintenanceVersions to add. + * @return This builder for chaining. */ - @java.lang.Override - public com.google.cloud.redis.v1.Instance.ReadReplicasMode getReadReplicasMode() { - com.google.cloud.redis.v1.Instance.ReadReplicasMode result = - com.google.cloud.redis.v1.Instance.ReadReplicasMode.forNumber(readReplicasMode_); - return result == null - ? com.google.cloud.redis.v1.Instance.ReadReplicasMode.UNRECOGNIZED - : result; + public Builder addAvailableMaintenanceVersions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableMaintenanceVersionsIsMutable(); + availableMaintenanceVersions_.add(value); + onChanged(); + return this; } /** * * *
-     * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
+     * Optional. The available maintenance versions that an instance could update
+     * to.
      * 
* * - * .google.cloud.redis.v1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; * * - * @param value The readReplicasMode to set. + * @param values The availableMaintenanceVersions to add. * @return This builder for chaining. */ - public Builder setReadReplicasMode(com.google.cloud.redis.v1.Instance.ReadReplicasMode value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x20000000; - readReplicasMode_ = value.getNumber(); + public Builder addAllAvailableMaintenanceVersions(java.lang.Iterable values) { + ensureAvailableMaintenanceVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, availableMaintenanceVersions_); onChanged(); return this; } @@ -8097,18 +9647,44 @@ public Builder setReadReplicasMode(com.google.cloud.redis.v1.Instance.ReadReplic * * *
-     * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
+     * Optional. The available maintenance versions that an instance could update
+     * to.
      * 
* * - * .google.cloud.redis.v1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ - public Builder clearReadReplicasMode() { - bitField0_ = (bitField0_ & ~0x20000000); - readReplicasMode_ = 0; + public Builder clearAvailableMaintenanceVersions() { + availableMaintenanceVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField1_ = (bitField1_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The available maintenance versions that an instance could update
+     * to.
+     * 
+ * + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the availableMaintenanceVersions to add. + * @return This builder for chaining. + */ + public Builder addAvailableMaintenanceVersionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAvailableMaintenanceVersionsIsMutable(); + availableMaintenanceVersions_.add(value); onChanged(); return this; } diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java index 22dafe9fa78f..025be0a528bd 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java @@ -33,8 +33,10 @@ 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][google.cloud.redis.v1.Instance.location_id] and - * [alternative_location_id][google.cloud.redis.v1.Instance.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 +54,10 @@ 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][google.cloud.redis.v1.Instance.location_id] and - * [alternative_location_id][google.cloud.redis.v1.Instance.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]; @@ -291,11 +295,11 @@ java.lang.String getLabelsOrDefault( * * *
-   * Optional. Additional IP range for node placement. Required when enabling read
-   * replicas on an existing instance. For DIRECT_PEERING mode value must be a
-   * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
-   * must be the name of an allocated address range associated with the private
-   * service access connection, or "auto".
+   * Optional. Additional IP range for node placement. Required when enabling
+   * read replicas on an existing instance. For DIRECT_PEERING mode value must
+   * be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode
+   * value must be the name of an allocated address range associated with the
+   * private service access connection, or "auto".
    * 
* * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; @@ -307,11 +311,11 @@ java.lang.String getLabelsOrDefault( * * *
-   * Optional. Additional IP range for node placement. Required when enabling read
-   * replicas on an existing instance. For DIRECT_PEERING mode value must be a
-   * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
-   * must be the name of an allocated address range associated with the private
-   * service access connection, or "auto".
+   * Optional. Additional IP range for node placement. Required when enabling
+   * read replicas on an existing instance. For DIRECT_PEERING mode value must
+   * be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode
+   * value must be the name of an allocated address range associated with the
+   * private service access connection, or "auto".
    * 
* * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; @@ -750,9 +754,9 @@ java.lang.String getRedisConfigsOrDefault( * * *
-   * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to
-   * "true" AUTH is enabled on the instance. Default value is "false" meaning
-   * AUTH is disabled.
+   * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If
+   * set to "true" AUTH is enabled on the instance. Default value is "false"
+   * meaning AUTH is disabled.
    * 
* * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; @@ -946,11 +950,11 @@ java.lang.String getRedisConfigsOrDefault( * * *
-   * Optional. The number of replica nodes. The valid range for the Standard Tier with
-   * read replicas enabled is [1-5] and defaults to 2. If read replicas are not
-   * enabled for a Standard Tier instance, the only valid value is 1 and the
-   * default is 1. The valid value for basic tier is 0 and the default is also
-   * 0.
+   * Optional. The number of replica nodes. The valid range for the Standard
+   * Tier with read replicas enabled is [1-5] and defaults to 2. If read
+   * replicas are not enabled for a Standard Tier instance, the only valid value
+   * is 1 and the default is 1. The valid value for basic tier is 0 and the
+   * default is also 0.
    * 
* * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; @@ -1069,7 +1073,8 @@ java.lang.String getRedisConfigsOrDefault( * * *
-   * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
+   * Optional. Read replicas mode for the instance. Defaults to
+   * READ_REPLICAS_DISABLED.
    * 
* * @@ -1083,7 +1088,8 @@ java.lang.String getRedisConfigsOrDefault( * * *
-   * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
+   * Optional. Read replicas mode for the instance. Defaults to
+   * READ_REPLICAS_DISABLED.
    * 
* * @@ -1093,4 +1099,235 @@ java.lang.String getRedisConfigsOrDefault( * @return The readReplicasMode. */ com.google.cloud.redis.v1.Instance.ReadReplicasMode getReadReplicasMode(); + + /** + * + * + *
+   * Optional. The KMS key reference that the customer provides when trying to
+   * create the instance.
+   * 
+ * + * string customer_managed_key = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customerManagedKey. + */ + java.lang.String getCustomerManagedKey(); + /** + * + * + *
+   * Optional. The KMS key reference that the customer provides when trying to
+   * create the instance.
+   * 
+ * + * string customer_managed_key = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customerManagedKey. + */ + com.google.protobuf.ByteString getCustomerManagedKeyBytes(); + + /** + * + * + *
+   * Optional. Persistence configuration parameters
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the persistenceConfig field is set. + */ + boolean hasPersistenceConfig(); + /** + * + * + *
+   * Optional. Persistence configuration parameters
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The persistenceConfig. + */ + com.google.cloud.redis.v1.PersistenceConfig getPersistenceConfig(); + /** + * + * + *
+   * Optional. Persistence configuration parameters
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.redis.v1.PersistenceConfigOrBuilder getPersistenceConfigOrBuilder(); + + /** + * + * + *
+   * Optional. reasons that causes instance in "SUSPENDED" state.
+   * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the suspensionReasons. + */ + java.util.List getSuspensionReasonsList(); + /** + * + * + *
+   * Optional. reasons that causes instance in "SUSPENDED" state.
+   * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of suspensionReasons. + */ + int getSuspensionReasonsCount(); + /** + * + * + *
+   * Optional. reasons that causes instance in "SUSPENDED" state.
+   * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The suspensionReasons at the given index. + */ + com.google.cloud.redis.v1.Instance.SuspensionReason getSuspensionReasons(int index); + /** + * + * + *
+   * Optional. reasons that causes instance in "SUSPENDED" state.
+   * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for suspensionReasons. + */ + java.util.List getSuspensionReasonsValueList(); + /** + * + * + *
+   * Optional. reasons that causes instance in "SUSPENDED" state.
+   * 
+ * + * + * repeated .google.cloud.redis.v1.Instance.SuspensionReason suspension_reasons = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of suspensionReasons at the given index. + */ + int getSuspensionReasonsValue(int index); + + /** + * + * + *
+   * Optional. The self service update maintenance version.
+   * The version is date based such as "20210712_00_00".
+   * 
+ * + * string maintenance_version = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maintenanceVersion. + */ + java.lang.String getMaintenanceVersion(); + /** + * + * + *
+   * Optional. The self service update maintenance version.
+   * The version is date based such as "20210712_00_00".
+   * 
+ * + * string maintenance_version = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for maintenanceVersion. + */ + com.google.protobuf.ByteString getMaintenanceVersionBytes(); + + /** + * + * + *
+   * Optional. The available maintenance versions that an instance could update
+   * to.
+   * 
+ * + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the availableMaintenanceVersions. + */ + java.util.List getAvailableMaintenanceVersionsList(); + /** + * + * + *
+   * Optional. The available maintenance versions that an instance could update
+   * to.
+   * 
+ * + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of availableMaintenanceVersions. + */ + int getAvailableMaintenanceVersionsCount(); + /** + * + * + *
+   * Optional. The available maintenance versions that an instance could update
+   * to.
+   * 
+ * + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The availableMaintenanceVersions at the given index. + */ + java.lang.String getAvailableMaintenanceVersions(int index); + /** + * + * + *
+   * Optional. The available maintenance versions that an instance could update
+   * to.
+   * 
+ * + * + * repeated string available_maintenance_versions = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the availableMaintenanceVersions at the given index. + */ + com.google.protobuf.ByteString getAvailableMaintenanceVersionsBytes(int index); } diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequest.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequest.java index e6c9b49775a8..8c52be16dbf6 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequest.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequest.java @@ -159,7 +159,8 @@ public int getPageSize() { * *
    * The `next_page_token` value returned from a previous
-   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
+   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if
+   * any.
    * 
* * string page_token = 3; @@ -183,7 +184,8 @@ public java.lang.String getPageToken() { * *
    * The `next_page_token` value returned from a previous
-   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
+   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if
+   * any.
    * 
* * string page_token = 3; @@ -790,7 +792,8 @@ public Builder clearPageSize() { * *
      * The `next_page_token` value returned from a previous
-     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
+     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if
+     * any.
      * 
* * string page_token = 3; @@ -813,7 +816,8 @@ public java.lang.String getPageToken() { * *
      * The `next_page_token` value returned from a previous
-     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
+     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if
+     * any.
      * 
* * string page_token = 3; @@ -836,7 +840,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * *
      * The `next_page_token` value returned from a previous
-     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
+     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if
+     * any.
      * 
* * string page_token = 3; @@ -858,7 +863,8 @@ public Builder setPageToken(java.lang.String value) { * *
      * The `next_page_token` value returned from a previous
-     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
+     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if
+     * any.
      * 
* * string page_token = 3; @@ -876,7 +882,8 @@ public Builder clearPageToken() { * *
      * The `next_page_token` value returned from a previous
-     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
+     * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if
+     * any.
      * 
* * string page_token = 3; diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequestOrBuilder.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequestOrBuilder.java index c1e3625006f9..953ed7b113c9 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequestOrBuilder.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ListInstancesRequestOrBuilder.java @@ -79,7 +79,8 @@ public interface ListInstancesRequestOrBuilder * *
    * The `next_page_token` value returned from a previous
-   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
+   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if
+   * any.
    * 
* * string page_token = 3; @@ -92,7 +93,8 @@ public interface ListInstancesRequestOrBuilder * *
    * The `next_page_token` value returned from a previous
-   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
+   * [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if
+   * any.
    * 
* * string page_token = 3; diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/MaintenanceSchedule.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/MaintenanceSchedule.java index f1be81ab7850..8453dabf2ea2 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/MaintenanceSchedule.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/MaintenanceSchedule.java @@ -72,7 +72,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Output only. The start time of any upcoming scheduled maintenance for this instance.
+   * Output only. The start time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -88,7 +89,8 @@ public boolean hasStartTime() { * * *
-   * Output only. The start time of any upcoming scheduled maintenance for this instance.
+   * Output only. The start time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -104,7 +106,8 @@ public com.google.protobuf.Timestamp getStartTime() { * * *
-   * Output only. The start time of any upcoming scheduled maintenance for this instance.
+   * Output only. The start time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -121,7 +124,8 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * *
-   * Output only. The end time of any upcoming scheduled maintenance for this instance.
+   * Output only. The end time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -137,7 +141,8 @@ public boolean hasEndTime() { * * *
-   * Output only. The end time of any upcoming scheduled maintenance for this instance.
+   * Output only. The end time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -153,7 +158,8 @@ public com.google.protobuf.Timestamp getEndTime() { * * *
-   * Output only. The end time of any upcoming scheduled maintenance for this instance.
+   * Output only. The end time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -176,7 +182,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * bool can_reschedule = 3 [deprecated = true]; * * @deprecated google.cloud.redis.v1.MaintenanceSchedule.can_reschedule is deprecated. See - * google/cloud/redis/v1/cloud_redis.proto;l=576 + * google/cloud/redis/v1/cloud_redis.proto;l=690 * @return The canReschedule. */ @java.lang.Override @@ -191,8 +197,8 @@ public boolean getCanReschedule() { * * *
-   * Output only. The deadline that the maintenance schedule start time can not go beyond,
-   * including reschedule.
+   * Output only. The deadline that the maintenance schedule start time can not
+   * go beyond, including reschedule.
    * 
* * @@ -209,8 +215,8 @@ public boolean hasScheduleDeadlineTime() { * * *
-   * Output only. The deadline that the maintenance schedule start time can not go beyond,
-   * including reschedule.
+   * Output only. The deadline that the maintenance schedule start time can not
+   * go beyond, including reschedule.
    * 
* * @@ -229,8 +235,8 @@ public com.google.protobuf.Timestamp getScheduleDeadlineTime() { * * *
-   * Output only. The deadline that the maintenance schedule start time can not go beyond,
-   * including reschedule.
+   * Output only. The deadline that the maintenance schedule start time can not
+   * go beyond, including reschedule.
    * 
* * @@ -692,7 +698,8 @@ public Builder mergeFrom( * * *
-     * Output only. The start time of any upcoming scheduled maintenance for this instance.
+     * Output only. The start time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -707,7 +714,8 @@ public boolean hasStartTime() { * * *
-     * Output only. The start time of any upcoming scheduled maintenance for this instance.
+     * Output only. The start time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -726,7 +734,8 @@ public com.google.protobuf.Timestamp getStartTime() { * * *
-     * Output only. The start time of any upcoming scheduled maintenance for this instance.
+     * Output only. The start time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -749,7 +758,8 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The start time of any upcoming scheduled maintenance for this instance.
+     * Output only. The start time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -769,7 +779,8 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu * * *
-     * Output only. The start time of any upcoming scheduled maintenance for this instance.
+     * Output only. The start time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -795,7 +806,8 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The start time of any upcoming scheduled maintenance for this instance.
+     * Output only. The start time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -815,7 +827,8 @@ public Builder clearStartTime() { * * *
-     * Output only. The start time of any upcoming scheduled maintenance for this instance.
+     * Output only. The start time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -830,7 +843,8 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { * * *
-     * Output only. The start time of any upcoming scheduled maintenance for this instance.
+     * Output only. The start time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -847,7 +861,8 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * *
-     * Output only. The start time of any upcoming scheduled maintenance for this instance.
+     * Output only. The start time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -880,7 +895,8 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * *
-     * Output only. The end time of any upcoming scheduled maintenance for this instance.
+     * Output only. The end time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -895,7 +911,8 @@ public boolean hasEndTime() { * * *
-     * Output only. The end time of any upcoming scheduled maintenance for this instance.
+     * Output only. The end time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -914,7 +931,8 @@ public com.google.protobuf.Timestamp getEndTime() { * * *
-     * Output only. The end time of any upcoming scheduled maintenance for this instance.
+     * Output only. The end time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -937,7 +955,8 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The end time of any upcoming scheduled maintenance for this instance.
+     * Output only. The end time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -957,7 +976,8 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) * * *
-     * Output only. The end time of any upcoming scheduled maintenance for this instance.
+     * Output only. The end time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -983,7 +1003,8 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The end time of any upcoming scheduled maintenance for this instance.
+     * Output only. The end time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1003,7 +1024,8 @@ public Builder clearEndTime() { * * *
-     * Output only. The end time of any upcoming scheduled maintenance for this instance.
+     * Output only. The end time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1018,7 +1040,8 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { * * *
-     * Output only. The end time of any upcoming scheduled maintenance for this instance.
+     * Output only. The end time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1035,7 +1058,8 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * *
-     * Output only. The end time of any upcoming scheduled maintenance for this instance.
+     * Output only. The end time of any upcoming scheduled maintenance for this
+     * instance.
      * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1069,7 +1093,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * bool can_reschedule = 3 [deprecated = true]; * * @deprecated google.cloud.redis.v1.MaintenanceSchedule.can_reschedule is deprecated. See - * google/cloud/redis/v1/cloud_redis.proto;l=576 + * google/cloud/redis/v1/cloud_redis.proto;l=690 * @return The canReschedule. */ @java.lang.Override @@ -1087,7 +1111,7 @@ public boolean getCanReschedule() { * bool can_reschedule = 3 [deprecated = true]; * * @deprecated google.cloud.redis.v1.MaintenanceSchedule.can_reschedule is deprecated. See - * google/cloud/redis/v1/cloud_redis.proto;l=576 + * google/cloud/redis/v1/cloud_redis.proto;l=690 * @param value The canReschedule to set. * @return This builder for chaining. */ @@ -1109,7 +1133,7 @@ public Builder setCanReschedule(boolean value) { * bool can_reschedule = 3 [deprecated = true]; * * @deprecated google.cloud.redis.v1.MaintenanceSchedule.can_reschedule is deprecated. See - * google/cloud/redis/v1/cloud_redis.proto;l=576 + * google/cloud/redis/v1/cloud_redis.proto;l=690 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1130,8 +1154,8 @@ public Builder clearCanReschedule() { * * *
-     * Output only. The deadline that the maintenance schedule start time can not go beyond,
-     * including reschedule.
+     * Output only. The deadline that the maintenance schedule start time can not
+     * go beyond, including reschedule.
      * 
* * @@ -1147,8 +1171,8 @@ public boolean hasScheduleDeadlineTime() { * * *
-     * Output only. The deadline that the maintenance schedule start time can not go beyond,
-     * including reschedule.
+     * Output only. The deadline that the maintenance schedule start time can not
+     * go beyond, including reschedule.
      * 
* * @@ -1170,8 +1194,8 @@ public com.google.protobuf.Timestamp getScheduleDeadlineTime() { * * *
-     * Output only. The deadline that the maintenance schedule start time can not go beyond,
-     * including reschedule.
+     * Output only. The deadline that the maintenance schedule start time can not
+     * go beyond, including reschedule.
      * 
* * @@ -1195,8 +1219,8 @@ public Builder setScheduleDeadlineTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The deadline that the maintenance schedule start time can not go beyond,
-     * including reschedule.
+     * Output only. The deadline that the maintenance schedule start time can not
+     * go beyond, including reschedule.
      * 
* * @@ -1217,8 +1241,8 @@ public Builder setScheduleDeadlineTime(com.google.protobuf.Timestamp.Builder bui * * *
-     * Output only. The deadline that the maintenance schedule start time can not go beyond,
-     * including reschedule.
+     * Output only. The deadline that the maintenance schedule start time can not
+     * go beyond, including reschedule.
      * 
* * @@ -1245,8 +1269,8 @@ public Builder mergeScheduleDeadlineTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The deadline that the maintenance schedule start time can not go beyond,
-     * including reschedule.
+     * Output only. The deadline that the maintenance schedule start time can not
+     * go beyond, including reschedule.
      * 
* * @@ -1267,8 +1291,8 @@ public Builder clearScheduleDeadlineTime() { * * *
-     * Output only. The deadline that the maintenance schedule start time can not go beyond,
-     * including reschedule.
+     * Output only. The deadline that the maintenance schedule start time can not
+     * go beyond, including reschedule.
      * 
* * @@ -1284,8 +1308,8 @@ public com.google.protobuf.Timestamp.Builder getScheduleDeadlineTimeBuilder() { * * *
-     * Output only. The deadline that the maintenance schedule start time can not go beyond,
-     * including reschedule.
+     * Output only. The deadline that the maintenance schedule start time can not
+     * go beyond, including reschedule.
      * 
* * @@ -1305,8 +1329,8 @@ public com.google.protobuf.TimestampOrBuilder getScheduleDeadlineTimeOrBuilder() * * *
-     * Output only. The deadline that the maintenance schedule start time can not go beyond,
-     * including reschedule.
+     * Output only. The deadline that the maintenance schedule start time can not
+     * go beyond, including reschedule.
      * 
* * diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/MaintenanceScheduleOrBuilder.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/MaintenanceScheduleOrBuilder.java index 5be9680e533e..37de7a6ecdfe 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/MaintenanceScheduleOrBuilder.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/MaintenanceScheduleOrBuilder.java @@ -27,7 +27,8 @@ public interface MaintenanceScheduleOrBuilder * * *
-   * Output only. The start time of any upcoming scheduled maintenance for this instance.
+   * Output only. The start time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -40,7 +41,8 @@ public interface MaintenanceScheduleOrBuilder * * *
-   * Output only. The start time of any upcoming scheduled maintenance for this instance.
+   * Output only. The start time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -53,7 +55,8 @@ public interface MaintenanceScheduleOrBuilder * * *
-   * Output only. The start time of any upcoming scheduled maintenance for this instance.
+   * Output only. The start time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -65,7 +68,8 @@ public interface MaintenanceScheduleOrBuilder * * *
-   * Output only. The end time of any upcoming scheduled maintenance for this instance.
+   * Output only. The end time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -78,7 +82,8 @@ public interface MaintenanceScheduleOrBuilder * * *
-   * Output only. The end time of any upcoming scheduled maintenance for this instance.
+   * Output only. The end time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -91,7 +96,8 @@ public interface MaintenanceScheduleOrBuilder * * *
-   * Output only. The end time of any upcoming scheduled maintenance for this instance.
+   * Output only. The end time of any upcoming scheduled maintenance for this
+   * instance.
    * 
* * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -109,7 +115,7 @@ public interface MaintenanceScheduleOrBuilder * bool can_reschedule = 3 [deprecated = true]; * * @deprecated google.cloud.redis.v1.MaintenanceSchedule.can_reschedule is deprecated. See - * google/cloud/redis/v1/cloud_redis.proto;l=576 + * google/cloud/redis/v1/cloud_redis.proto;l=690 * @return The canReschedule. */ @java.lang.Deprecated @@ -119,8 +125,8 @@ public interface MaintenanceScheduleOrBuilder * * *
-   * Output only. The deadline that the maintenance schedule start time can not go beyond,
-   * including reschedule.
+   * Output only. The deadline that the maintenance schedule start time can not
+   * go beyond, including reschedule.
    * 
* * @@ -134,8 +140,8 @@ public interface MaintenanceScheduleOrBuilder * * *
-   * Output only. The deadline that the maintenance schedule start time can not go beyond,
-   * including reschedule.
+   * Output only. The deadline that the maintenance schedule start time can not
+   * go beyond, including reschedule.
    * 
* * @@ -149,8 +155,8 @@ public interface MaintenanceScheduleOrBuilder * * *
-   * Output only. The deadline that the maintenance schedule start time can not go beyond,
-   * including reschedule.
+   * Output only. The deadline that the maintenance schedule start time can not
+   * go beyond, including reschedule.
    * 
* * diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/PersistenceConfig.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/PersistenceConfig.java new file mode 100644 index 000000000000..075851bffe1f --- /dev/null +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/PersistenceConfig.java @@ -0,0 +1,1801 @@ +/* + * 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/v1/cloud_redis.proto + +package com.google.cloud.redis.v1; + +/** + * + * + *
+ * Configuration of the persistence functionality.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.v1.PersistenceConfig} + */ +public final class PersistenceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.v1.PersistenceConfig) + PersistenceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PersistenceConfig.newBuilder() to construct. + private PersistenceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PersistenceConfig() { + persistenceMode_ = 0; + rdbSnapshotPeriod_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PersistenceConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.v1.CloudRedisServiceV1Proto + .internal_static_google_cloud_redis_v1_PersistenceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.v1.CloudRedisServiceV1Proto + .internal_static_google_cloud_redis_v1_PersistenceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.v1.PersistenceConfig.class, + com.google.cloud.redis.v1.PersistenceConfig.Builder.class); + } + + /** + * + * + *
+   * Available Persistence modes.
+   * 
+ * + * Protobuf enum {@code google.cloud.redis.v1.PersistenceConfig.PersistenceMode} + */ + public enum PersistenceMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * PERSISTENCE_MODE_UNSPECIFIED = 0; + */ + PERSISTENCE_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Persistence is disabled for the instance,
+     * and any existing snapshots are deleted.
+     * 
+ * + * DISABLED = 1; + */ + DISABLED(1), + /** + * + * + *
+     * RDB based Persistence is enabled.
+     * 
+ * + * RDB = 2; + */ + RDB(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * PERSISTENCE_MODE_UNSPECIFIED = 0; + */ + public static final int PERSISTENCE_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Persistence is disabled for the instance,
+     * and any existing snapshots are deleted.
+     * 
+ * + * DISABLED = 1; + */ + public static final int DISABLED_VALUE = 1; + /** + * + * + *
+     * RDB based Persistence is enabled.
+     * 
+ * + * RDB = 2; + */ + public static final int RDB_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 PersistenceMode 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 PersistenceMode forNumber(int value) { + switch (value) { + case 0: + return PERSISTENCE_MODE_UNSPECIFIED; + case 1: + return DISABLED; + case 2: + return RDB; + 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 PersistenceMode findValueByNumber(int number) { + return PersistenceMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.PersistenceConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final PersistenceMode[] VALUES = values(); + + public static PersistenceMode 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 PersistenceMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1.PersistenceConfig.PersistenceMode) + } + + /** + * + * + *
+   * Available snapshot periods for scheduling.
+   * 
+ * + * Protobuf enum {@code google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod} + */ + public enum SnapshotPeriod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * SNAPSHOT_PERIOD_UNSPECIFIED = 0; + */ + SNAPSHOT_PERIOD_UNSPECIFIED(0), + /** + * + * + *
+     * Snapshot every 1 hour.
+     * 
+ * + * ONE_HOUR = 3; + */ + ONE_HOUR(3), + /** + * + * + *
+     * Snapshot every 6 hours.
+     * 
+ * + * SIX_HOURS = 4; + */ + SIX_HOURS(4), + /** + * + * + *
+     * Snapshot every 12 hours.
+     * 
+ * + * TWELVE_HOURS = 5; + */ + TWELVE_HOURS(5), + /** + * + * + *
+     * Snapshot every 24 hours.
+     * 
+ * + * TWENTY_FOUR_HOURS = 6; + */ + TWENTY_FOUR_HOURS(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * SNAPSHOT_PERIOD_UNSPECIFIED = 0; + */ + public static final int SNAPSHOT_PERIOD_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Snapshot every 1 hour.
+     * 
+ * + * ONE_HOUR = 3; + */ + public static final int ONE_HOUR_VALUE = 3; + /** + * + * + *
+     * Snapshot every 6 hours.
+     * 
+ * + * SIX_HOURS = 4; + */ + public static final int SIX_HOURS_VALUE = 4; + /** + * + * + *
+     * Snapshot every 12 hours.
+     * 
+ * + * TWELVE_HOURS = 5; + */ + public static final int TWELVE_HOURS_VALUE = 5; + /** + * + * + *
+     * Snapshot every 24 hours.
+     * 
+ * + * TWENTY_FOUR_HOURS = 6; + */ + public static final int TWENTY_FOUR_HOURS_VALUE = 6; + + 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 SnapshotPeriod 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 SnapshotPeriod forNumber(int value) { + switch (value) { + case 0: + return SNAPSHOT_PERIOD_UNSPECIFIED; + case 3: + return ONE_HOUR; + case 4: + return SIX_HOURS; + case 5: + return TWELVE_HOURS; + case 6: + return TWENTY_FOUR_HOURS; + 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 SnapshotPeriod findValueByNumber(int number) { + return SnapshotPeriod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.PersistenceConfig.getDescriptor().getEnumTypes().get(1); + } + + private static final SnapshotPeriod[] VALUES = values(); + + public static SnapshotPeriod 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 SnapshotPeriod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod) + } + + public static final int PERSISTENCE_MODE_FIELD_NUMBER = 1; + private int persistenceMode_ = 0; + /** + * + * + *
+   * Optional. Controls whether Persistence features are enabled.
+   * If not provided, the existing value will be used.
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.PersistenceMode persistence_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for persistenceMode. + */ + @java.lang.Override + public int getPersistenceModeValue() { + return persistenceMode_; + } + /** + * + * + *
+   * Optional. Controls whether Persistence features are enabled.
+   * If not provided, the existing value will be used.
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.PersistenceMode persistence_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The persistenceMode. + */ + @java.lang.Override + public com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode getPersistenceMode() { + com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode result = + com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode.forNumber(persistenceMode_); + return result == null + ? com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode.UNRECOGNIZED + : result; + } + + public static final int RDB_SNAPSHOT_PERIOD_FIELD_NUMBER = 2; + private int rdbSnapshotPeriod_ = 0; + /** + * + * + *
+   * Optional. Period between RDB snapshots. Snapshots will be attempted every
+   * period starting from the provided snapshot start time. For example, a start
+   * time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing
+   * until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45,
+   * 18:45, and 00:45 the next day, and so on. If not provided,
+   * TWENTY_FOUR_HOURS will be used as default.
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod rdb_snapshot_period = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rdbSnapshotPeriod. + */ + @java.lang.Override + public int getRdbSnapshotPeriodValue() { + return rdbSnapshotPeriod_; + } + /** + * + * + *
+   * Optional. Period between RDB snapshots. Snapshots will be attempted every
+   * period starting from the provided snapshot start time. For example, a start
+   * time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing
+   * until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45,
+   * 18:45, and 00:45 the next day, and so on. If not provided,
+   * TWENTY_FOUR_HOURS will be used as default.
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod rdb_snapshot_period = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotPeriod. + */ + @java.lang.Override + public com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod getRdbSnapshotPeriod() { + com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod result = + com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod.forNumber(rdbSnapshotPeriod_); + return result == null + ? com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod.UNRECOGNIZED + : result; + } + + public static final int RDB_NEXT_SNAPSHOT_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp rdbNextSnapshotTime_; + /** + * + * + *
+   * Output only. The next time that a snapshot attempt is scheduled to occur.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the rdbNextSnapshotTime field is set. + */ + @java.lang.Override + public boolean hasRdbNextSnapshotTime() { + return rdbNextSnapshotTime_ != null; + } + /** + * + * + *
+   * Output only. The next time that a snapshot attempt is scheduled to occur.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rdbNextSnapshotTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRdbNextSnapshotTime() { + return rdbNextSnapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbNextSnapshotTime_; + } + /** + * + * + *
+   * Output only. The next time that a snapshot attempt is scheduled to occur.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRdbNextSnapshotTimeOrBuilder() { + return rdbNextSnapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbNextSnapshotTime_; + } + + public static final int RDB_SNAPSHOT_START_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp rdbSnapshotStartTime_; + /** + * + * + *
+   * Optional. Date and time that the first snapshot was/will be attempted, and
+   * to which future snapshots will be aligned. If not provided, the current
+   * time will be used.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbSnapshotStartTime field is set. + */ + @java.lang.Override + public boolean hasRdbSnapshotStartTime() { + return rdbSnapshotStartTime_ != null; + } + /** + * + * + *
+   * Optional. Date and time that the first snapshot was/will be attempted, and
+   * to which future snapshots will be aligned. If not provided, the current
+   * time will be used.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotStartTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRdbSnapshotStartTime() { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } + /** + * + * + *
+   * Optional. Date and time that the first snapshot was/will be attempted, and
+   * to which future snapshots will be aligned. If not provided, the current
+   * time will be used.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRdbSnapshotStartTimeOrBuilder() { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } + + 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 (persistenceMode_ + != com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode.PERSISTENCE_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, persistenceMode_); + } + if (rdbSnapshotPeriod_ + != com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod.SNAPSHOT_PERIOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, rdbSnapshotPeriod_); + } + if (rdbNextSnapshotTime_ != null) { + output.writeMessage(4, getRdbNextSnapshotTime()); + } + if (rdbSnapshotStartTime_ != null) { + output.writeMessage(5, getRdbSnapshotStartTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (persistenceMode_ + != com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode.PERSISTENCE_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, persistenceMode_); + } + if (rdbSnapshotPeriod_ + != com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod.SNAPSHOT_PERIOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, rdbSnapshotPeriod_); + } + if (rdbNextSnapshotTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRdbNextSnapshotTime()); + } + if (rdbSnapshotStartTime_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRdbSnapshotStartTime()); + } + size += getUnknownFields().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.v1.PersistenceConfig)) { + return super.equals(obj); + } + com.google.cloud.redis.v1.PersistenceConfig other = + (com.google.cloud.redis.v1.PersistenceConfig) obj; + + if (persistenceMode_ != other.persistenceMode_) return false; + if (rdbSnapshotPeriod_ != other.rdbSnapshotPeriod_) return false; + if (hasRdbNextSnapshotTime() != other.hasRdbNextSnapshotTime()) return false; + if (hasRdbNextSnapshotTime()) { + if (!getRdbNextSnapshotTime().equals(other.getRdbNextSnapshotTime())) return false; + } + if (hasRdbSnapshotStartTime() != other.hasRdbSnapshotStartTime()) return false; + if (hasRdbSnapshotStartTime()) { + if (!getRdbSnapshotStartTime().equals(other.getRdbSnapshotStartTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PERSISTENCE_MODE_FIELD_NUMBER; + hash = (53 * hash) + persistenceMode_; + hash = (37 * hash) + RDB_SNAPSHOT_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + rdbSnapshotPeriod_; + if (hasRdbNextSnapshotTime()) { + hash = (37 * hash) + RDB_NEXT_SNAPSHOT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRdbNextSnapshotTime().hashCode(); + } + if (hasRdbSnapshotStartTime()) { + hash = (37 * hash) + RDB_SNAPSHOT_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRdbSnapshotStartTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.v1.PersistenceConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.v1.PersistenceConfig 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.v1.PersistenceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.v1.PersistenceConfig 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.v1.PersistenceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.v1.PersistenceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.v1.PersistenceConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.v1.PersistenceConfig 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.v1.PersistenceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.v1.PersistenceConfig 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.v1.PersistenceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.v1.PersistenceConfig 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.v1.PersistenceConfig 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; + } + /** + * + * + *
+   * Configuration of the persistence functionality.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.v1.PersistenceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.v1.PersistenceConfig) + com.google.cloud.redis.v1.PersistenceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.v1.CloudRedisServiceV1Proto + .internal_static_google_cloud_redis_v1_PersistenceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.v1.CloudRedisServiceV1Proto + .internal_static_google_cloud_redis_v1_PersistenceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.v1.PersistenceConfig.class, + com.google.cloud.redis.v1.PersistenceConfig.Builder.class); + } + + // Construct using com.google.cloud.redis.v1.PersistenceConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + persistenceMode_ = 0; + rdbSnapshotPeriod_ = 0; + rdbNextSnapshotTime_ = null; + if (rdbNextSnapshotTimeBuilder_ != null) { + rdbNextSnapshotTimeBuilder_.dispose(); + rdbNextSnapshotTimeBuilder_ = null; + } + rdbSnapshotStartTime_ = null; + if (rdbSnapshotStartTimeBuilder_ != null) { + rdbSnapshotStartTimeBuilder_.dispose(); + rdbSnapshotStartTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.v1.CloudRedisServiceV1Proto + .internal_static_google_cloud_redis_v1_PersistenceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.v1.PersistenceConfig getDefaultInstanceForType() { + return com.google.cloud.redis.v1.PersistenceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.v1.PersistenceConfig build() { + com.google.cloud.redis.v1.PersistenceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.v1.PersistenceConfig buildPartial() { + com.google.cloud.redis.v1.PersistenceConfig result = + new com.google.cloud.redis.v1.PersistenceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.v1.PersistenceConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.persistenceMode_ = persistenceMode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rdbSnapshotPeriod_ = rdbSnapshotPeriod_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rdbNextSnapshotTime_ = + rdbNextSnapshotTimeBuilder_ == null + ? rdbNextSnapshotTime_ + : rdbNextSnapshotTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rdbSnapshotStartTime_ = + rdbSnapshotStartTimeBuilder_ == null + ? rdbSnapshotStartTime_ + : rdbSnapshotStartTimeBuilder_.build(); + } + } + + @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.v1.PersistenceConfig) { + return mergeFrom((com.google.cloud.redis.v1.PersistenceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.v1.PersistenceConfig other) { + if (other == com.google.cloud.redis.v1.PersistenceConfig.getDefaultInstance()) return this; + if (other.persistenceMode_ != 0) { + setPersistenceModeValue(other.getPersistenceModeValue()); + } + if (other.rdbSnapshotPeriod_ != 0) { + setRdbSnapshotPeriodValue(other.getRdbSnapshotPeriodValue()); + } + if (other.hasRdbNextSnapshotTime()) { + mergeRdbNextSnapshotTime(other.getRdbNextSnapshotTime()); + } + if (other.hasRdbSnapshotStartTime()) { + mergeRdbSnapshotStartTime(other.getRdbSnapshotStartTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + persistenceMode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + rdbSnapshotPeriod_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 34: + { + input.readMessage( + getRdbNextSnapshotTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage( + getRdbSnapshotStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int persistenceMode_ = 0; + /** + * + * + *
+     * Optional. Controls whether Persistence features are enabled.
+     * If not provided, the existing value will be used.
+     * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.PersistenceMode persistence_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for persistenceMode. + */ + @java.lang.Override + public int getPersistenceModeValue() { + return persistenceMode_; + } + /** + * + * + *
+     * Optional. Controls whether Persistence features are enabled.
+     * If not provided, the existing value will be used.
+     * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.PersistenceMode persistence_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for persistenceMode to set. + * @return This builder for chaining. + */ + public Builder setPersistenceModeValue(int value) { + persistenceMode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Controls whether Persistence features are enabled.
+     * If not provided, the existing value will be used.
+     * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.PersistenceMode persistence_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The persistenceMode. + */ + @java.lang.Override + public com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode getPersistenceMode() { + com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode result = + com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode.forNumber(persistenceMode_); + return result == null + ? com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Controls whether Persistence features are enabled.
+     * If not provided, the existing value will be used.
+     * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.PersistenceMode persistence_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The persistenceMode to set. + * @return This builder for chaining. + */ + public Builder setPersistenceMode( + com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + persistenceMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Controls whether Persistence features are enabled.
+     * If not provided, the existing value will be used.
+     * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.PersistenceMode persistence_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPersistenceMode() { + bitField0_ = (bitField0_ & ~0x00000001); + persistenceMode_ = 0; + onChanged(); + return this; + } + + private int rdbSnapshotPeriod_ = 0; + /** + * + * + *
+     * Optional. Period between RDB snapshots. Snapshots will be attempted every
+     * period starting from the provided snapshot start time. For example, a start
+     * time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing
+     * until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45,
+     * 18:45, and 00:45 the next day, and so on. If not provided,
+     * TWENTY_FOUR_HOURS will be used as default.
+     * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod rdb_snapshot_period = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rdbSnapshotPeriod. + */ + @java.lang.Override + public int getRdbSnapshotPeriodValue() { + return rdbSnapshotPeriod_; + } + /** + * + * + *
+     * Optional. Period between RDB snapshots. Snapshots will be attempted every
+     * period starting from the provided snapshot start time. For example, a start
+     * time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing
+     * until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45,
+     * 18:45, and 00:45 the next day, and so on. If not provided,
+     * TWENTY_FOUR_HOURS will be used as default.
+     * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod rdb_snapshot_period = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for rdbSnapshotPeriod to set. + * @return This builder for chaining. + */ + public Builder setRdbSnapshotPeriodValue(int value) { + rdbSnapshotPeriod_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Period between RDB snapshots. Snapshots will be attempted every
+     * period starting from the provided snapshot start time. For example, a start
+     * time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing
+     * until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45,
+     * 18:45, and 00:45 the next day, and so on. If not provided,
+     * TWENTY_FOUR_HOURS will be used as default.
+     * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod rdb_snapshot_period = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotPeriod. + */ + @java.lang.Override + public com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod getRdbSnapshotPeriod() { + com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod result = + com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod.forNumber(rdbSnapshotPeriod_); + return result == null + ? com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Period between RDB snapshots. Snapshots will be attempted every
+     * period starting from the provided snapshot start time. For example, a start
+     * time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing
+     * until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45,
+     * 18:45, and 00:45 the next day, and so on. If not provided,
+     * TWENTY_FOUR_HOURS will be used as default.
+     * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod rdb_snapshot_period = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The rdbSnapshotPeriod to set. + * @return This builder for chaining. + */ + public Builder setRdbSnapshotPeriod( + com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + rdbSnapshotPeriod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Period between RDB snapshots. Snapshots will be attempted every
+     * period starting from the provided snapshot start time. For example, a start
+     * time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing
+     * until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45,
+     * 18:45, and 00:45 the next day, and so on. If not provided,
+     * TWENTY_FOUR_HOURS will be used as default.
+     * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod rdb_snapshot_period = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRdbSnapshotPeriod() { + bitField0_ = (bitField0_ & ~0x00000002); + rdbSnapshotPeriod_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp rdbNextSnapshotTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + rdbNextSnapshotTimeBuilder_; + /** + * + * + *
+     * Output only. The next time that a snapshot attempt is scheduled to occur.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the rdbNextSnapshotTime field is set. + */ + public boolean hasRdbNextSnapshotTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The next time that a snapshot attempt is scheduled to occur.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rdbNextSnapshotTime. + */ + public com.google.protobuf.Timestamp getRdbNextSnapshotTime() { + if (rdbNextSnapshotTimeBuilder_ == null) { + return rdbNextSnapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbNextSnapshotTime_; + } else { + return rdbNextSnapshotTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The next time that a snapshot attempt is scheduled to occur.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRdbNextSnapshotTime(com.google.protobuf.Timestamp value) { + if (rdbNextSnapshotTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rdbNextSnapshotTime_ = value; + } else { + rdbNextSnapshotTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The next time that a snapshot attempt is scheduled to occur.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRdbNextSnapshotTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (rdbNextSnapshotTimeBuilder_ == null) { + rdbNextSnapshotTime_ = builderForValue.build(); + } else { + rdbNextSnapshotTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The next time that a snapshot attempt is scheduled to occur.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRdbNextSnapshotTime(com.google.protobuf.Timestamp value) { + if (rdbNextSnapshotTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && rdbNextSnapshotTime_ != null + && rdbNextSnapshotTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRdbNextSnapshotTimeBuilder().mergeFrom(value); + } else { + rdbNextSnapshotTime_ = value; + } + } else { + rdbNextSnapshotTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The next time that a snapshot attempt is scheduled to occur.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRdbNextSnapshotTime() { + bitField0_ = (bitField0_ & ~0x00000004); + rdbNextSnapshotTime_ = null; + if (rdbNextSnapshotTimeBuilder_ != null) { + rdbNextSnapshotTimeBuilder_.dispose(); + rdbNextSnapshotTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The next time that a snapshot attempt is scheduled to occur.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getRdbNextSnapshotTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getRdbNextSnapshotTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The next time that a snapshot attempt is scheduled to occur.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRdbNextSnapshotTimeOrBuilder() { + if (rdbNextSnapshotTimeBuilder_ != null) { + return rdbNextSnapshotTimeBuilder_.getMessageOrBuilder(); + } else { + return rdbNextSnapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbNextSnapshotTime_; + } + } + /** + * + * + *
+     * Output only. The next time that a snapshot attempt is scheduled to occur.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRdbNextSnapshotTimeFieldBuilder() { + if (rdbNextSnapshotTimeBuilder_ == null) { + rdbNextSnapshotTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRdbNextSnapshotTime(), getParentForChildren(), isClean()); + rdbNextSnapshotTime_ = null; + } + return rdbNextSnapshotTimeBuilder_; + } + + private com.google.protobuf.Timestamp rdbSnapshotStartTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + rdbSnapshotStartTimeBuilder_; + /** + * + * + *
+     * Optional. Date and time that the first snapshot was/will be attempted, and
+     * to which future snapshots will be aligned. If not provided, the current
+     * time will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbSnapshotStartTime field is set. + */ + public boolean hasRdbSnapshotStartTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Optional. Date and time that the first snapshot was/will be attempted, and
+     * to which future snapshots will be aligned. If not provided, the current
+     * time will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotStartTime. + */ + public com.google.protobuf.Timestamp getRdbSnapshotStartTime() { + if (rdbSnapshotStartTimeBuilder_ == null) { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } else { + return rdbSnapshotStartTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Date and time that the first snapshot was/will be attempted, and
+     * to which future snapshots will be aligned. If not provided, the current
+     * time will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRdbSnapshotStartTime(com.google.protobuf.Timestamp value) { + if (rdbSnapshotStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rdbSnapshotStartTime_ = value; + } else { + rdbSnapshotStartTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Date and time that the first snapshot was/will be attempted, and
+     * to which future snapshots will be aligned. If not provided, the current
+     * time will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRdbSnapshotStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (rdbSnapshotStartTimeBuilder_ == null) { + rdbSnapshotStartTime_ = builderForValue.build(); + } else { + rdbSnapshotStartTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Date and time that the first snapshot was/will be attempted, and
+     * to which future snapshots will be aligned. If not provided, the current
+     * time will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRdbSnapshotStartTime(com.google.protobuf.Timestamp value) { + if (rdbSnapshotStartTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && rdbSnapshotStartTime_ != null + && rdbSnapshotStartTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRdbSnapshotStartTimeBuilder().mergeFrom(value); + } else { + rdbSnapshotStartTime_ = value; + } + } else { + rdbSnapshotStartTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Date and time that the first snapshot was/will be attempted, and
+     * to which future snapshots will be aligned. If not provided, the current
+     * time will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRdbSnapshotStartTime() { + bitField0_ = (bitField0_ & ~0x00000008); + rdbSnapshotStartTime_ = null; + if (rdbSnapshotStartTimeBuilder_ != null) { + rdbSnapshotStartTimeBuilder_.dispose(); + rdbSnapshotStartTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Date and time that the first snapshot was/will be attempted, and
+     * to which future snapshots will be aligned. If not provided, the current
+     * time will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getRdbSnapshotStartTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getRdbSnapshotStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Date and time that the first snapshot was/will be attempted, and
+     * to which future snapshots will be aligned. If not provided, the current
+     * time will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRdbSnapshotStartTimeOrBuilder() { + if (rdbSnapshotStartTimeBuilder_ != null) { + return rdbSnapshotStartTimeBuilder_.getMessageOrBuilder(); + } else { + return rdbSnapshotStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rdbSnapshotStartTime_; + } + } + /** + * + * + *
+     * Optional. Date and time that the first snapshot was/will be attempted, and
+     * to which future snapshots will be aligned. If not provided, the current
+     * time will be used.
+     * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRdbSnapshotStartTimeFieldBuilder() { + if (rdbSnapshotStartTimeBuilder_ == null) { + rdbSnapshotStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRdbSnapshotStartTime(), getParentForChildren(), isClean()); + rdbSnapshotStartTime_ = null; + } + return rdbSnapshotStartTimeBuilder_; + } + + @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.v1.PersistenceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.v1.PersistenceConfig) + private static final com.google.cloud.redis.v1.PersistenceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.v1.PersistenceConfig(); + } + + public static com.google.cloud.redis.v1.PersistenceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PersistenceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.v1.PersistenceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/PersistenceConfigOrBuilder.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/PersistenceConfigOrBuilder.java new file mode 100644 index 000000000000..1fc9815cf9c3 --- /dev/null +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/PersistenceConfigOrBuilder.java @@ -0,0 +1,183 @@ +/* + * 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/v1/cloud_redis.proto + +package com.google.cloud.redis.v1; + +public interface PersistenceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.v1.PersistenceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Controls whether Persistence features are enabled.
+   * If not provided, the existing value will be used.
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.PersistenceMode persistence_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for persistenceMode. + */ + int getPersistenceModeValue(); + /** + * + * + *
+   * Optional. Controls whether Persistence features are enabled.
+   * If not provided, the existing value will be used.
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.PersistenceMode persistence_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The persistenceMode. + */ + com.google.cloud.redis.v1.PersistenceConfig.PersistenceMode getPersistenceMode(); + + /** + * + * + *
+   * Optional. Period between RDB snapshots. Snapshots will be attempted every
+   * period starting from the provided snapshot start time. For example, a start
+   * time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing
+   * until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45,
+   * 18:45, and 00:45 the next day, and so on. If not provided,
+   * TWENTY_FOUR_HOURS will be used as default.
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod rdb_snapshot_period = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rdbSnapshotPeriod. + */ + int getRdbSnapshotPeriodValue(); + /** + * + * + *
+   * Optional. Period between RDB snapshots. Snapshots will be attempted every
+   * period starting from the provided snapshot start time. For example, a start
+   * time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing
+   * until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45,
+   * 18:45, and 00:45 the next day, and so on. If not provided,
+   * TWENTY_FOUR_HOURS will be used as default.
+   * 
+ * + * + * .google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod rdb_snapshot_period = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotPeriod. + */ + com.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod getRdbSnapshotPeriod(); + + /** + * + * + *
+   * Output only. The next time that a snapshot attempt is scheduled to occur.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the rdbNextSnapshotTime field is set. + */ + boolean hasRdbNextSnapshotTime(); + /** + * + * + *
+   * Output only. The next time that a snapshot attempt is scheduled to occur.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rdbNextSnapshotTime. + */ + com.google.protobuf.Timestamp getRdbNextSnapshotTime(); + /** + * + * + *
+   * Output only. The next time that a snapshot attempt is scheduled to occur.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getRdbNextSnapshotTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Date and time that the first snapshot was/will be attempted, and
+   * to which future snapshots will be aligned. If not provided, the current
+   * time will be used.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rdbSnapshotStartTime field is set. + */ + boolean hasRdbSnapshotStartTime(); + /** + * + * + *
+   * Optional. Date and time that the first snapshot was/will be attempted, and
+   * to which future snapshots will be aligned. If not provided, the current
+   * time will be used.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rdbSnapshotStartTime. + */ + com.google.protobuf.Timestamp getRdbSnapshotStartTime(); + /** + * + * + *
+   * Optional. Date and time that the first snapshot was/will be attempted, and
+   * to which future snapshots will be aligned. If not provided, the current
+   * time will be used.
+   * 
+ * + * + * .google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getRdbSnapshotStartTimeOrBuilder(); +} diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/RescheduleMaintenanceRequest.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/RescheduleMaintenanceRequest.java index 3110f9f976b6..d675e52ece88 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/RescheduleMaintenanceRequest.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/RescheduleMaintenanceRequest.java @@ -22,7 +22,8 @@ * * *
- * Request for [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance].
+ * Request for
+ * [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance].
  * 
* * Protobuf type {@code google.cloud.redis.v1.RescheduleMaintenanceRequest} @@ -316,7 +317,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
+   * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
+   * well.
    * 
* * @@ -333,7 +335,8 @@ public int getRescheduleTypeValue() { * * *
-   * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
+   * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
+   * well.
    * 
* * @@ -604,7 +607,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request for [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance].
+   * Request for
+   * [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance].
    * 
* * Protobuf type {@code google.cloud.redis.v1.RescheduleMaintenanceRequest} @@ -945,7 +949,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
+     * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
+     * well.
      * 
* * @@ -962,7 +967,8 @@ public int getRescheduleTypeValue() { * * *
-     * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
+     * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
+     * well.
      * 
* * @@ -982,7 +988,8 @@ public Builder setRescheduleTypeValue(int value) { * * *
-     * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
+     * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
+     * well.
      * 
* * @@ -1005,7 +1012,8 @@ public Builder setRescheduleTypeValue(int value) { * * *
-     * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
+     * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
+     * well.
      * 
* * @@ -1029,7 +1037,8 @@ public Builder setRescheduleType( * * *
-     * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
+     * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
+     * well.
      * 
* * diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/RescheduleMaintenanceRequestOrBuilder.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/RescheduleMaintenanceRequestOrBuilder.java index 0ec63873739b..17e711cae753 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/RescheduleMaintenanceRequestOrBuilder.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/RescheduleMaintenanceRequestOrBuilder.java @@ -60,7 +60,8 @@ public interface RescheduleMaintenanceRequestOrBuilder * * *
-   * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
+   * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
+   * well.
    * 
* * @@ -74,7 +75,8 @@ public interface RescheduleMaintenanceRequestOrBuilder * * *
-   * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
+   * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
+   * well.
    * 
* * diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java index 6a653e4be850..7d8a87d651af 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java @@ -22,7 +22,8 @@ * * *
- * Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance].
+ * Request for
+ * [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance].
  * 
* * Protobuf type {@code google.cloud.redis.v1.UpdateInstanceRequest} @@ -369,7 +370,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance].
+   * Request for
+   * [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance].
    * 
* * Protobuf type {@code google.cloud.redis.v1.UpdateInstanceRequest} diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpgradeInstanceRequest.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpgradeInstanceRequest.java index 174df289bb8b..b0ffd4f9db9f 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpgradeInstanceRequest.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpgradeInstanceRequest.java @@ -22,7 +22,8 @@ * * *
- * Request for [UpgradeInstance][google.cloud.redis.v1.CloudRedis.UpgradeInstance].
+ * Request for
+ * [UpgradeInstance][google.cloud.redis.v1.CloudRedis.UpgradeInstance].
  * 
* * Protobuf type {@code google.cloud.redis.v1.UpgradeInstanceRequest} @@ -350,7 +351,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request for [UpgradeInstance][google.cloud.redis.v1.CloudRedis.UpgradeInstance].
+   * Request for
+   * [UpgradeInstance][google.cloud.redis.v1.CloudRedis.UpgradeInstance].
    * 
* * Protobuf type {@code google.cloud.redis.v1.UpgradeInstanceRequest} diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/WeeklyMaintenanceWindow.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/WeeklyMaintenanceWindow.java index f4d59995b08c..ec656b71d27b 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/WeeklyMaintenanceWindow.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/WeeklyMaintenanceWindow.java @@ -154,7 +154,8 @@ public com.google.type.TimeOfDayOrBuilder getStartTimeOrBuilder() { * * *
-   * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+   * Output only. Duration of the maintenance window. The current window is
+   * fixed at 1 hour.
    * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -170,7 +171,8 @@ public boolean hasDuration() { * * *
-   * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+   * Output only. Duration of the maintenance window. The current window is
+   * fixed at 1 hour.
    * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -186,7 +188,8 @@ public com.google.protobuf.Duration getDuration() { * * *
-   * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+   * Output only. Duration of the maintenance window. The current window is
+   * fixed at 1 hour.
    * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -878,7 +881,8 @@ public com.google.type.TimeOfDayOrBuilder getStartTimeOrBuilder() { * * *
-     * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+     * Output only. Duration of the maintenance window. The current window is
+     * fixed at 1 hour.
      * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -893,7 +897,8 @@ public boolean hasDuration() { * * *
-     * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+     * Output only. Duration of the maintenance window. The current window is
+     * fixed at 1 hour.
      * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -912,7 +917,8 @@ public com.google.protobuf.Duration getDuration() { * * *
-     * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+     * Output only. Duration of the maintenance window. The current window is
+     * fixed at 1 hour.
      * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -935,7 +941,8 @@ public Builder setDuration(com.google.protobuf.Duration value) { * * *
-     * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+     * Output only. Duration of the maintenance window. The current window is
+     * fixed at 1 hour.
      * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -955,7 +962,8 @@ public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) * * *
-     * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+     * Output only. Duration of the maintenance window. The current window is
+     * fixed at 1 hour.
      * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -981,7 +989,8 @@ public Builder mergeDuration(com.google.protobuf.Duration value) { * * *
-     * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+     * Output only. Duration of the maintenance window. The current window is
+     * fixed at 1 hour.
      * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1001,7 +1010,8 @@ public Builder clearDuration() { * * *
-     * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+     * Output only. Duration of the maintenance window. The current window is
+     * fixed at 1 hour.
      * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1016,7 +1026,8 @@ public com.google.protobuf.Duration.Builder getDurationBuilder() { * * *
-     * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+     * Output only. Duration of the maintenance window. The current window is
+     * fixed at 1 hour.
      * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1033,7 +1044,8 @@ public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { * * *
-     * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+     * Output only. Duration of the maintenance window. The current window is
+     * fixed at 1 hour.
      * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/WeeklyMaintenanceWindowOrBuilder.java b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/WeeklyMaintenanceWindowOrBuilder.java index bbf7132704bc..a9c77a1ad20e 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/WeeklyMaintenanceWindowOrBuilder.java +++ b/java-redis/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/WeeklyMaintenanceWindowOrBuilder.java @@ -87,7 +87,8 @@ public interface WeeklyMaintenanceWindowOrBuilder * * *
-   * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+   * Output only. Duration of the maintenance window. The current window is
+   * fixed at 1 hour.
    * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -100,7 +101,8 @@ public interface WeeklyMaintenanceWindowOrBuilder * * *
-   * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+   * Output only. Duration of the maintenance window. The current window is
+   * fixed at 1 hour.
    * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -113,7 +115,8 @@ public interface WeeklyMaintenanceWindowOrBuilder * * *
-   * Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
+   * Output only. Duration of the maintenance window. The current window is
+   * fixed at 1 hour.
    * 
* * .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-redis/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto b/java-redis/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto index 51659ed119f7..5ff9e9c8b4de 100644 --- a/java-redis/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto +++ b/java-redis/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/type/dayofweek.proto"; @@ -49,7 +50,8 @@ option java_package = "com.google.cloud.redis.v1"; // * `projects/redpepper-1290/locations/us-central1/instances/my-redis` service CloudRedis { option (google.api.default_host) = "redis.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists all Redis instances owned by a project in either the specified // location (region) or all locations. @@ -78,7 +80,8 @@ service CloudRedis { // Gets the AUTH string for a Redis instance. If AUTH is not enabled for the // instance the response will be empty. This information is not included in // the details returned to GetInstance. - rpc GetInstanceAuthString(GetInstanceAuthStringRequest) returns (InstanceAuthString) { + rpc GetInstanceAuthString(GetInstanceAuthStringRequest) + returns (InstanceAuthString) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/instances/*}/authString" }; @@ -97,7 +100,8 @@ service CloudRedis { // // The returned operation is automatically deleted after a few hours, so there // is no need to call DeleteOperation. - rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { + rpc CreateInstance(CreateInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/instances" body: "instance" @@ -114,7 +118,8 @@ service CloudRedis { // Completed longrunning.Operation will contain the new instance object // in the response field. The returned operation is automatically deleted // after a few hours, so there is no need to call DeleteOperation. - rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { + rpc UpdateInstance(UpdateInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{instance.name=projects/*/locations/*/instances/*}" body: "instance" @@ -128,7 +133,8 @@ service CloudRedis { // Upgrades Redis instance to the newer Redis version specified in the // request. - rpc UpgradeInstance(UpgradeInstanceRequest) returns (google.longrunning.Operation) { + rpc UpgradeInstance(UpgradeInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:upgrade" body: "*" @@ -148,7 +154,8 @@ service CloudRedis { // // The returned operation is automatically deleted after a few hours, so // there is no need to call DeleteOperation. - rpc ImportInstance(ImportInstanceRequest) returns (google.longrunning.Operation) { + rpc ImportInstance(ImportInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:import" body: "*" @@ -166,7 +173,8 @@ service CloudRedis { // // The returned operation is automatically deleted after a few hours, so // there is no need to call DeleteOperation. - rpc ExportInstance(ExportInstanceRequest) returns (google.longrunning.Operation) { + rpc ExportInstance(ExportInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:export" body: "*" @@ -180,7 +188,8 @@ service CloudRedis { // Initiates a failover of the primary node to current replica node for a // specific STANDARD tier Cloud Memorystore for Redis instance. - rpc FailoverInstance(FailoverInstanceRequest) returns (google.longrunning.Operation) { + rpc FailoverInstance(FailoverInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:failover" body: "*" @@ -194,7 +203,8 @@ service CloudRedis { // Deletes a specific Redis instance. Instance stops serving and data is // deleted. - rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { + rpc DeleteInstance(DeleteInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/instances/*}" }; @@ -207,12 +217,14 @@ service CloudRedis { // Reschedule maintenance for a given instance in a given project and // location. - rpc RescheduleMaintenance(RescheduleMaintenanceRequest) returns (google.longrunning.Operation) { + rpc RescheduleMaintenance(RescheduleMaintenanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:rescheduleMaintenance" body: "*" }; - option (google.api.method_signature) = "name, reschedule_type, schedule_time"; + option (google.api.method_signature) = + "name, reschedule_type, schedule_time"; option (google.longrunning.operation_info) = { response_type: "google.cloud.redis.v1.Instance" metadata_type: "google.cloud.redis.v1.OperationMetadata" @@ -321,6 +333,15 @@ message Instance { READ_REPLICAS_ENABLED = 2; } + // Possible reasons for the instance to be in a "SUSPENDED" state. + enum SuspensionReason { + // Not set. + SUSPENSION_REASON_UNSPECIFIED = 0; + + // Something wrong with the CMEK key provided by customer. + CUSTOMER_MANAGED_KEY_ISSUE = 1; + } + // 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}` @@ -328,8 +349,10 @@ 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][google.cloud.redis.v1.Instance.location_id] and - // [alternative_location_id][google.cloud.redis.v1.Instance.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. @@ -372,11 +395,11 @@ message Instance { // the default block size is /28. string reserved_ip_range = 9 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Additional IP range for node placement. Required when enabling read - // replicas on an existing instance. For DIRECT_PEERING mode value must be a - // CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value - // must be the name of an allocated address range associated with the private - // service access connection, or "auto". + // Optional. Additional IP range for node placement. Required when enabling + // read replicas on an existing instance. For DIRECT_PEERING mode value must + // be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode + // value must be the name of an allocated address range associated with the + // private service access connection, or "auto". string secondary_ip_range = 30 [(google.api.field_behavior) = OPTIONAL]; // Output only. Hostname or IP address of the exposed Redis endpoint used by @@ -392,7 +415,8 @@ message Instance { string current_location_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the instance was created. - google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of this instance. State state = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -421,7 +445,8 @@ message Instance { // // * stream-node-max-bytes // * stream-node-max-entries - map redis_configs = 16 [(google.api.field_behavior) = OPTIONAL]; + map redis_configs = 16 + [(google.api.field_behavior) = OPTIONAL]; // Required. The service tier of the instance. Tier tier = 17 [(google.api.field_behavior) = REQUIRED]; @@ -440,43 +465,42 @@ message Instance { // "serviceAccount:". The value may change over time // for a given instance so should be checked before each import/export // operation. - string persistence_iam_identity = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + string persistence_iam_identity = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The network connect mode of the Redis instance. // If not provided, the connect mode defaults to DIRECT_PEERING. ConnectMode connect_mode = 22 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to - // "true" AUTH is enabled on the instance. Default value is "false" meaning - // AUTH is disabled. + // Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If + // set to "true" AUTH is enabled on the instance. Default value is "false" + // meaning AUTH is disabled. bool auth_enabled = 23 [(google.api.field_behavior) = OPTIONAL]; // Output only. List of server CA certificates for the instance. - repeated TlsCertificate server_ca_certs = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated TlsCertificate server_ca_certs = 25 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The TLS mode of the Redis instance. // If not provided, TLS is disabled for the instance. - TransitEncryptionMode transit_encryption_mode = 26 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of replica nodes. The valid range for the Standard Tier with - // read replicas enabled is [1-5] and defaults to 2. If read replicas are not - // enabled for a Standard Tier instance, the only valid value is 1 and the - // default is 1. The valid value for basic tier is 0 and the default is also - // 0. + TransitEncryptionMode transit_encryption_mode = 26 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The maintenance policy for the instance. If not provided, // maintenance events can be performed at any time. - MaintenancePolicy maintenance_policy = 27 [(google.api.field_behavior) = OPTIONAL]; + MaintenancePolicy maintenance_policy = 27 + [(google.api.field_behavior) = OPTIONAL]; // Output only. Date and time of upcoming maintenance events which have been // scheduled. - MaintenanceSchedule maintenance_schedule = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The number of replica nodes. The valid range for the Standard Tier with - // read replicas enabled is [1-5] and defaults to 2. If read replicas are not - // enabled for a Standard Tier instance, the only valid value is 1 and the - // default is 1. The valid value for basic tier is 0 and the default is also - // 0. + MaintenanceSchedule maintenance_schedule = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The number of replica nodes. The valid range for the Standard + // Tier with read replicas enabled is [1-5] and defaults to 2. If read + // replicas are not enabled for a Standard Tier instance, the only valid value + // is 1 and the default is 1. The valid value for basic tier is 0 and the + // default is also 0. int32 replica_count = 31 [(google.api.field_behavior) = OPTIONAL]; // Output only. Info per node. @@ -492,11 +516,92 @@ message Instance { // endpoint. Standard tier only. Write requests should target 'port'. int32 read_endpoint_port = 34 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED. - ReadReplicasMode read_replicas_mode = 35 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Read replicas mode for the instance. Defaults to + // READ_REPLICAS_DISABLED. + ReadReplicasMode read_replicas_mode = 35 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The KMS key reference that the customer provides when trying to + // create the instance. + string customer_managed_key = 36 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Persistence configuration parameters + PersistenceConfig persistence_config = 37 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. reasons that causes instance in "SUSPENDED" state. + repeated SuspensionReason suspension_reasons = 38 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The self service update maintenance version. + // The version is date based such as "20210712_00_00". + string maintenance_version = 39 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The available maintenance versions that an instance could update + // to. + repeated string available_maintenance_versions = 40 + [(google.api.field_behavior) = OPTIONAL]; } -// Request for [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance]. +// Configuration of the persistence functionality. +message PersistenceConfig { + // Available Persistence modes. + enum PersistenceMode { + // Not set. + PERSISTENCE_MODE_UNSPECIFIED = 0; + + // Persistence is disabled for the instance, + // and any existing snapshots are deleted. + DISABLED = 1; + + // RDB based Persistence is enabled. + RDB = 2; + } + + // Available snapshot periods for scheduling. + enum SnapshotPeriod { + // Not set. + SNAPSHOT_PERIOD_UNSPECIFIED = 0; + + // Snapshot every 1 hour. + ONE_HOUR = 3; + + // Snapshot every 6 hours. + SIX_HOURS = 4; + + // Snapshot every 12 hours. + TWELVE_HOURS = 5; + + // Snapshot every 24 hours. + TWENTY_FOUR_HOURS = 6; + } + + // Optional. Controls whether Persistence features are enabled. + // If not provided, the existing value will be used. + PersistenceMode persistence_mode = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Period between RDB snapshots. Snapshots will be attempted every + // period starting from the provided snapshot start time. For example, a start + // time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing + // until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45, + // 18:45, and 00:45 the next day, and so on. If not provided, + // TWENTY_FOUR_HOURS will be used as default. + SnapshotPeriod rdb_snapshot_period = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The next time that a snapshot attempt is scheduled to occur. + google.protobuf.Timestamp rdb_next_snapshot_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Date and time that the first snapshot was/will be attempted, and + // to which future snapshots will be aligned. If not provided, the current + // time will be used. + google.protobuf.Timestamp rdb_snapshot_start_time = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for +// [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance]. message RescheduleMaintenanceRequest { // Reschedule options. enum RescheduleType { @@ -519,27 +624,29 @@ message RescheduleMaintenanceRequest { // 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" - } + (google.api.resource_reference) = { type: "redis.googleapis.com/Instance" } ]; - // Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + // Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as + // well. RescheduleType reschedule_type = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Timestamp when the maintenance shall be rescheduled to if // reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for // example `2012-11-15T16:19:00.094Z`. - google.protobuf.Timestamp schedule_time = 3 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Timestamp schedule_time = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Maintenance policy for an instance. message MaintenancePolicy { // Output only. The time when the policy was created. - google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the policy was last updated. - google.protobuf.Timestamp update_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. Description of what this policy is for. Create/Update methods // return INVALID_ARGUMENT if the length is greater than 512. @@ -548,7 +655,8 @@ message MaintenancePolicy { // Optional. Maintenance window that is applied to resources covered by this // policy. Minimum 1. For the current version, the maximum number of // weekly_window is expected to be one. - repeated WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(google.api.field_behavior) = OPTIONAL]; + repeated WeeklyMaintenanceWindow weekly_maintenance_window = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Time window in which disruptive maintenance updates occur. Non-disruptive @@ -560,25 +668,32 @@ message WeeklyMaintenanceWindow { // Required. Start time of the window in UTC time. google.type.TimeOfDay start_time = 2 [(google.api.field_behavior) = REQUIRED]; - // Output only. Duration of the maintenance window. The current window is fixed at 1 hour. - google.protobuf.Duration duration = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Duration of the maintenance window. The current window is + // fixed at 1 hour. + google.protobuf.Duration duration = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Upcoming maintenance schedule. If no maintenance is scheduled, fields are not // populated. message MaintenanceSchedule { - // Output only. The start time of any upcoming scheduled maintenance for this instance. - google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The start time of any upcoming scheduled maintenance for this + // instance. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The end time of any upcoming scheduled maintenance for this instance. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The end time of any upcoming scheduled maintenance for this + // instance. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // If the scheduled maintenance can be rescheduled, default is true. bool can_reschedule = 3 [deprecated = true]; - // Output only. The deadline that the maintenance schedule start time can not go beyond, - // including reschedule. - google.protobuf.Timestamp schedule_deadline_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The deadline that the maintenance schedule start time can not + // go beyond, including reschedule. + google.protobuf.Timestamp schedule_deadline_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. @@ -603,7 +718,8 @@ message ListInstancesRequest { int32 page_size = 2; // The `next_page_token` value returned from a previous - // [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any. + // [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if + // any. string page_token = 3; } @@ -637,22 +753,19 @@ message GetInstanceRequest { // 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" - } + (google.api.resource_reference) = { type: "redis.googleapis.com/Instance" } ]; } -// Request for [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString]. +// Request for +// [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString]. message GetInstanceAuthStringRequest { // 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" - } + (google.api.resource_reference) = { type: "redis.googleapis.com/Instance" } ]; } @@ -662,7 +775,8 @@ message InstanceAuthString { string auth_string = 1; } -// Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. +// Request for +// [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. message CreateInstanceRequest { // Required. The resource name of the instance location using the form: // `projects/{project_id}/locations/{location_id}` @@ -688,7 +802,8 @@ message CreateInstanceRequest { Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; } -// Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. +// Request for +// [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. 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 @@ -699,39 +814,38 @@ message UpdateInstanceRequest { // * `memorySizeGb` // * `redisConfig` // * `replica_count` - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. Update description. // Only fields specified in update_mask are updated. Instance instance = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request for [UpgradeInstance][google.cloud.redis.v1.CloudRedis.UpgradeInstance]. +// Request for +// [UpgradeInstance][google.cloud.redis.v1.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" - } + (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.v1.CloudRedis.DeleteInstance]. +// Request for +// [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. message DeleteInstanceRequest { // 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" - } + (google.api.resource_reference) = { type: "redis.googleapis.com/Instance" } ]; } @@ -811,14 +925,13 @@ message FailoverInstanceRequest { // 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" - } + (google.api.resource_reference) = { type: "redis.googleapis.com/Instance" } ]; // Optional. Available data protection modes that the user can choose. If it's // unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - DataProtectionMode data_protection_mode = 2 [(google.api.field_behavior) = OPTIONAL]; + DataProtectionMode data_protection_mode = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Represents the v1 metadata of the long-running operation. @@ -854,14 +967,13 @@ message LocationMetadata { // by the lowercase ID of each zone, as defined by GCE. These keys can be // specified in `location_id` or `alternative_location_id` fields when // creating a Redis instance. - map available_zones = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + map available_zones = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Defines specific information for a particular zone. Currently empty and // reserved for future use only. -message ZoneMetadata { - -} +message ZoneMetadata {} // TlsCertificate Resource message TlsCertificate { @@ -874,12 +986,14 @@ message TlsCertificate { // Output only. The time when the certificate was created in [RFC // 3339](https://tools.ietf.org/html/rfc3339) format, for example // `2020-05-18T00:00:00.094Z`. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the certificate expires in [RFC // 3339](https://tools.ietf.org/html/rfc3339) format, for example // `2020-05-18T00:00:00.094Z`. - google.protobuf.Timestamp expire_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp expire_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Sha1 Fingerprint of the certificate. string sha1_fingerprint = 5; diff --git a/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/getlocation/AsyncGetLocation.java b/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..6a1ea4554331 --- /dev/null +++ b/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 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. + */ + +package com.google.cloud.redis.v1.samples; + +// [START redis_v1_generated_CloudRedis_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.v1.CloudRedisClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = cloudRedisClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END redis_v1_generated_CloudRedis_GetLocation_async] diff --git a/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/getlocation/SyncGetLocation.java b/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..dd0daca4d17c --- /dev/null +++ b/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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. + */ + +package com.google.cloud.redis.v1.samples; + +// [START redis_v1_generated_CloudRedis_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.v1.CloudRedisClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = cloudRedisClient.getLocation(request); + } + } +} +// [END redis_v1_generated_CloudRedis_GetLocation_sync] diff --git a/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/listlocations/AsyncListLocations.java b/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..f2c50a694cda --- /dev/null +++ b/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 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. + */ + +package com.google.cloud.redis.v1.samples; + +// [START redis_v1_generated_CloudRedis_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.v1.CloudRedisClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudRedisClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END redis_v1_generated_CloudRedis_ListLocations_async] diff --git a/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/listlocations/AsyncListLocationsPaged.java b/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..57b97293f7ca --- /dev/null +++ b/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 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. + */ + +package com.google.cloud.redis.v1.samples; + +// [START redis_v1_generated_CloudRedis_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.v1.CloudRedisClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = cloudRedisClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END redis_v1_generated_CloudRedis_ListLocations_Paged_async] diff --git a/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/listlocations/SyncListLocations.java b/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..72472176a4a9 --- /dev/null +++ b/java-redis/samples/snippets/generated/com/google/cloud/redis/v1/cloudredis/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 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. + */ + +package com.google.cloud.redis.v1.samples; + +// [START redis_v1_generated_CloudRedis_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.v1.CloudRedisClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : cloudRedisClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END redis_v1_generated_CloudRedis_ListLocations_sync]