diff --git a/java-alloydb/README.md b/java-alloydb/README.md index a8df5e53a65d..12fb9e2fa009 100644 --- a/java-alloydb/README.md +++ b/java-alloydb/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.32.0 + 26.33.0 pom import @@ -201,7 +201,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/java-alloydb/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-alloydb.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb/0.24.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb/0.25.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-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClient.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClient.java index 9ac0db1891d1..48e51e099592 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClient.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClient.java @@ -670,6 +670,26 @@ * * * + *

ListDatabases + *

Lists Databases in a given project and location. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ * + *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ * + *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ * + * + * + * *

ListLocations *

Lists information about the supported locations for this service. * @@ -5278,6 +5298,171 @@ public final UnaryCallable deleteUserCallable() { return stub.deleteUserCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Databases in a given project and 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 (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   for (Database element : alloyDBAdminClient.listDatabases(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListDatabasesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDatabasesPagedResponse listDatabases(ClusterName parent) { + ListDatabasesRequest request = + ListDatabasesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDatabases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Databases in a given project and 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 (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   for (Database element : alloyDBAdminClient.listDatabases(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListDatabasesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDatabasesPagedResponse listDatabases(String parent) { + ListDatabasesRequest request = ListDatabasesRequest.newBuilder().setParent(parent).build(); + return listDatabases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Databases in a given project and 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 (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) {
+   *   ListDatabasesRequest request =
+   *       ListDatabasesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Database element : alloyDBAdminClient.listDatabases(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 ListDatabasesPagedResponse listDatabases(ListDatabasesRequest request) { + return listDatabasesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Databases in a given project and 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 (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) {
+   *   ListDatabasesRequest request =
+   *       ListDatabasesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       alloyDBAdminClient.listDatabasesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Database element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDatabasesPagedCallable() { + return stub.listDatabasesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Databases in a given project and 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 (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) {
+   *   ListDatabasesRequest request =
+   *       ListDatabasesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListDatabasesResponse response = alloyDBAdminClient.listDatabasesCallable().call(request);
+   *     for (Database element : response.getDatabasesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listDatabasesCallable() { + return stub.listDatabasesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. @@ -5848,6 +6033,82 @@ protected ListUsersFixedSizeCollection createCollection( } } + public static class ListDatabasesPagedResponse + extends AbstractPagedListResponse< + ListDatabasesRequest, + ListDatabasesResponse, + Database, + ListDatabasesPage, + ListDatabasesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDatabasesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDatabasesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDatabasesPagedResponse(ListDatabasesPage page) { + super(page, ListDatabasesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDatabasesPage + extends AbstractPage< + ListDatabasesRequest, ListDatabasesResponse, Database, ListDatabasesPage> { + + private ListDatabasesPage( + PageContext context, + ListDatabasesResponse response) { + super(context, response); + } + + private static ListDatabasesPage createEmptyPage() { + return new ListDatabasesPage(null, null); + } + + @Override + protected ListDatabasesPage createPage( + PageContext context, + ListDatabasesResponse response) { + return new ListDatabasesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDatabasesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDatabasesRequest, + ListDatabasesResponse, + Database, + ListDatabasesPage, + ListDatabasesFixedSizeCollection> { + + private ListDatabasesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDatabasesFixedSizeCollection createEmptyCollection() { + return new ListDatabasesFixedSizeCollection(null, 0); + } + + @Override + protected ListDatabasesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDatabasesFixedSizeCollection(pages, collectionSize); + } + } + public static class ListLocationsPagedResponse extends AbstractPagedListResponse< ListLocationsRequest, diff --git a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminSettings.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminSettings.java index 636bc53d8ff3..c5d763889b9e 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminSettings.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminSettings.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -357,6 +358,12 @@ public UnaryCallSettings deleteUserSettings() { return ((AlloyDBAdminStubSettings) getStubSettings()).deleteUserSettings(); } + /** Returns the object with the settings used for calls to listDatabases. */ + public PagedCallSettings + listDatabasesSettings() { + return ((AlloyDBAdminStubSettings) getStubSettings()).listDatabasesSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -759,6 +766,13 @@ public UnaryCallSettings.Builder deleteUserSettings() return getStubSettingsBuilder().deleteUserSettings(); } + /** Returns the builder for the settings used for calls to listDatabases. */ + public PagedCallSettings.Builder< + ListDatabasesRequest, ListDatabasesResponse, ListDatabasesPagedResponse> + listDatabasesSettings() { + return getStubSettingsBuilder().listDatabasesSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/gapic_metadata.json b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/gapic_metadata.json index d1a5059c22fb..224b29f91354 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/gapic_metadata.json +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/gapic_metadata.json @@ -76,6 +76,9 @@ "ListClusters": { "methods": ["listClusters", "listClusters", "listClusters", "listClustersPagedCallable", "listClustersCallable"] }, + "ListDatabases": { + "methods": ["listDatabases", "listDatabases", "listDatabases", "listDatabasesPagedCallable", "listDatabasesCallable"] + }, "ListInstances": { "methods": ["listInstances", "listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] }, diff --git a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/AlloyDBAdminStub.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/AlloyDBAdminStub.java index c5297e163837..def850d65a2d 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/AlloyDBAdminStub.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/AlloyDBAdminStub.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -56,6 +57,8 @@ import com.google.cloud.alloydb.v1beta.ListBackupsResponse; import com.google.cloud.alloydb.v1beta.ListClustersRequest; import com.google.cloud.alloydb.v1beta.ListClustersResponse; +import com.google.cloud.alloydb.v1beta.ListDatabasesRequest; +import com.google.cloud.alloydb.v1beta.ListDatabasesResponse; import com.google.cloud.alloydb.v1beta.ListInstancesRequest; import com.google.cloud.alloydb.v1beta.ListInstancesResponse; import com.google.cloud.alloydb.v1beta.ListSupportedDatabaseFlagsRequest; @@ -338,6 +341,15 @@ public UnaryCallable deleteUserCallable() { throw new UnsupportedOperationException("Not implemented: deleteUserCallable()"); } + public UnaryCallable + listDatabasesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDatabasesPagedCallable()"); + } + + public UnaryCallable listDatabasesCallable() { + throw new UnsupportedOperationException("Not implemented: listDatabasesCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/AlloyDBAdminStubSettings.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/AlloyDBAdminStubSettings.java index 3f35f5c1fecf..502fee41b2f8 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/AlloyDBAdminStubSettings.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/AlloyDBAdminStubSettings.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -63,6 +64,7 @@ import com.google.cloud.alloydb.v1beta.CreateSecondaryClusterRequest; import com.google.cloud.alloydb.v1beta.CreateSecondaryInstanceRequest; import com.google.cloud.alloydb.v1beta.CreateUserRequest; +import com.google.cloud.alloydb.v1beta.Database; import com.google.cloud.alloydb.v1beta.DeleteBackupRequest; import com.google.cloud.alloydb.v1beta.DeleteClusterRequest; import com.google.cloud.alloydb.v1beta.DeleteInstanceRequest; @@ -81,6 +83,8 @@ import com.google.cloud.alloydb.v1beta.ListBackupsResponse; import com.google.cloud.alloydb.v1beta.ListClustersRequest; import com.google.cloud.alloydb.v1beta.ListClustersResponse; +import com.google.cloud.alloydb.v1beta.ListDatabasesRequest; +import com.google.cloud.alloydb.v1beta.ListDatabasesResponse; import com.google.cloud.alloydb.v1beta.ListInstancesRequest; import com.google.cloud.alloydb.v1beta.ListInstancesResponse; import com.google.cloud.alloydb.v1beta.ListSupportedDatabaseFlagsRequest; @@ -238,6 +242,9 @@ public class AlloyDBAdminStubSettings extends StubSettings createUserSettings; private final UnaryCallSettings updateUserSettings; private final UnaryCallSettings deleteUserSettings; + private final PagedCallSettings< + ListDatabasesRequest, ListDatabasesResponse, ListDatabasesPagedResponse> + listDatabasesSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -436,6 +443,42 @@ public Iterable extractResources(ListUsersResponse payload) { } }; + private static final PagedListDescriptor + LIST_DATABASES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDatabasesRequest injectToken(ListDatabasesRequest payload, String token) { + return ListDatabasesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDatabasesRequest injectPageSize(ListDatabasesRequest payload, int pageSize) { + return ListDatabasesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDatabasesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDatabasesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDatabasesResponse payload) { + return payload.getDatabasesList() == null + ? ImmutableList.of() + : payload.getDatabasesList(); + } + }; + private static final PagedListDescriptor LIST_LOCATIONS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -568,6 +611,23 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListDatabasesRequest, ListDatabasesResponse, ListDatabasesPagedResponse> + LIST_DATABASES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDatabasesRequest, ListDatabasesResponse, ListDatabasesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDatabasesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATABASES_PAGE_STR_DESC, request, context); + return ListDatabasesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> LIST_LOCATIONS_PAGE_STR_FACT = @@ -854,6 +914,12 @@ public UnaryCallSettings deleteUserSettings() { return deleteUserSettings; } + /** Returns the object with the settings used for calls to listDatabases. */ + public PagedCallSettings + listDatabasesSettings() { + return listDatabasesSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -1036,6 +1102,7 @@ protected AlloyDBAdminStubSettings(Builder settingsBuilder) throws IOException { createUserSettings = settingsBuilder.createUserSettings().build(); updateUserSettings = settingsBuilder.updateUserSettings().build(); deleteUserSettings = settingsBuilder.deleteUserSettings().build(); + listDatabasesSettings = settingsBuilder.listDatabasesSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -1137,6 +1204,9 @@ public static class Builder extends StubSettings.Builder createUserSettings; private final UnaryCallSettings.Builder updateUserSettings; private final UnaryCallSettings.Builder deleteUserSettings; + private final PagedCallSettings.Builder< + ListDatabasesRequest, ListDatabasesResponse, ListDatabasesPagedResponse> + listDatabasesSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -1238,6 +1308,7 @@ protected Builder(ClientContext clientContext) { createUserSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateUserSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteUserSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDatabasesSettings = PagedCallSettings.newBuilder(LIST_DATABASES_PAGE_STR_FACT); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -1274,6 +1345,7 @@ protected Builder(ClientContext clientContext) { createUserSettings, updateUserSettings, deleteUserSettings, + listDatabasesSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -1333,6 +1405,7 @@ protected Builder(AlloyDBAdminStubSettings settings) { createUserSettings = settings.createUserSettings.toBuilder(); updateUserSettings = settings.updateUserSettings.toBuilder(); deleteUserSettings = settings.deleteUserSettings.toBuilder(); + listDatabasesSettings = settings.listDatabasesSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -1369,6 +1442,7 @@ protected Builder(AlloyDBAdminStubSettings settings) { createUserSettings, updateUserSettings, deleteUserSettings, + listDatabasesSettings, listLocationsSettings, getLocationSettings); } @@ -1553,6 +1627,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .listDatabasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) @@ -2300,6 +2379,13 @@ public UnaryCallSettings.Builder deleteUserSettings() return deleteUserSettings; } + /** Returns the builder for the settings used for calls to listDatabases. */ + public PagedCallSettings.Builder< + ListDatabasesRequest, ListDatabasesResponse, ListDatabasesPagedResponse> + listDatabasesSettings() { + return listDatabasesSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/GrpcAlloyDBAdminStub.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/GrpcAlloyDBAdminStub.java index 7bd9cae5192b..4d808d753a27 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/GrpcAlloyDBAdminStub.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/GrpcAlloyDBAdminStub.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -61,6 +62,8 @@ import com.google.cloud.alloydb.v1beta.ListBackupsResponse; import com.google.cloud.alloydb.v1beta.ListClustersRequest; import com.google.cloud.alloydb.v1beta.ListClustersResponse; +import com.google.cloud.alloydb.v1beta.ListDatabasesRequest; +import com.google.cloud.alloydb.v1beta.ListDatabasesResponse; import com.google.cloud.alloydb.v1beta.ListInstancesRequest; import com.google.cloud.alloydb.v1beta.ListInstancesResponse; import com.google.cloud.alloydb.v1beta.ListSupportedDatabaseFlagsRequest; @@ -397,6 +400,17 @@ public class GrpcAlloyDBAdminStub extends AlloyDBAdminStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor + listDatabasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.alloydb.v1beta.AlloyDBAdmin/ListDatabases") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDatabasesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDatabasesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -496,6 +510,9 @@ public class GrpcAlloyDBAdminStub extends AlloyDBAdminStub { private final UnaryCallable createUserCallable; private final UnaryCallable updateUserCallable; private final UnaryCallable deleteUserCallable; + private final UnaryCallable listDatabasesCallable; + private final UnaryCallable + listDatabasesPagedCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -859,6 +876,16 @@ protected GrpcAlloyDBAdminStub( return builder.build(); }) .build(); + GrpcCallSettings listDatabasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDatabasesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -1104,6 +1131,12 @@ protected GrpcAlloyDBAdminStub( this.deleteUserCallable = callableFactory.createUnaryCallable( deleteUserTransportSettings, settings.deleteUserSettings(), clientContext); + this.listDatabasesCallable = + callableFactory.createUnaryCallable( + listDatabasesTransportSettings, settings.listDatabasesSettings(), clientContext); + this.listDatabasesPagedCallable = + callableFactory.createPagedCallable( + listDatabasesTransportSettings, settings.listDatabasesSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -1410,6 +1443,17 @@ public UnaryCallable deleteUserCallable() { return deleteUserCallable; } + @Override + public UnaryCallable listDatabasesCallable() { + return listDatabasesCallable; + } + + @Override + public UnaryCallable + listDatabasesPagedCallable() { + return listDatabasesPagedCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/HttpJsonAlloyDBAdminStub.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/HttpJsonAlloyDBAdminStub.java index 1ee5728bcf41..5e368cbd6be9 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/HttpJsonAlloyDBAdminStub.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1beta/stub/HttpJsonAlloyDBAdminStub.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -69,6 +70,8 @@ import com.google.cloud.alloydb.v1beta.ListBackupsResponse; import com.google.cloud.alloydb.v1beta.ListClustersRequest; import com.google.cloud.alloydb.v1beta.ListClustersResponse; +import com.google.cloud.alloydb.v1beta.ListDatabasesRequest; +import com.google.cloud.alloydb.v1beta.ListDatabasesResponse; import com.google.cloud.alloydb.v1beta.ListInstancesRequest; import com.google.cloud.alloydb.v1beta.ListInstancesResponse; import com.google.cloud.alloydb.v1beta.ListSupportedDatabaseFlagsRequest; @@ -1358,6 +1361,43 @@ public class HttpJsonAlloyDBAdminStub extends AlloyDBAdminStub { .build()) .build(); + private static final ApiMethodDescriptor + listDatabasesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.alloydb.v1beta.AlloyDBAdmin/ListDatabases") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/clusters/*}/databases", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDatabasesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -1506,6 +1546,9 @@ public class HttpJsonAlloyDBAdminStub extends AlloyDBAdminStub { private final UnaryCallable createUserCallable; private final UnaryCallable updateUserCallable; private final UnaryCallable deleteUserCallable; + private final UnaryCallable listDatabasesCallable; + private final UnaryCallable + listDatabasesPagedCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -1931,6 +1974,18 @@ protected HttpJsonAlloyDBAdminStub( return builder.build(); }) .build(); + HttpJsonCallSettings + listDatabasesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDatabasesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -2179,6 +2234,12 @@ protected HttpJsonAlloyDBAdminStub( this.deleteUserCallable = callableFactory.createUnaryCallable( deleteUserTransportSettings, settings.deleteUserSettings(), clientContext); + this.listDatabasesCallable = + callableFactory.createUnaryCallable( + listDatabasesTransportSettings, settings.listDatabasesSettings(), clientContext); + this.listDatabasesPagedCallable = + callableFactory.createPagedCallable( + listDatabasesTransportSettings, settings.listDatabasesSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -2227,6 +2288,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(createUserMethodDescriptor); methodDescriptors.add(updateUserMethodDescriptor); methodDescriptors.add(deleteUserMethodDescriptor); + methodDescriptors.add(listDatabasesMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -2524,6 +2586,17 @@ public UnaryCallable deleteUserCallable() { return deleteUserCallable; } + @Override + public UnaryCallable listDatabasesCallable() { + return listDatabasesCallable; + } + + @Override + public UnaryCallable + listDatabasesPagedCallable() { + return listDatabasesPagedCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-alloydb/google-cloud-alloydb/src/main/resources/META-INF/native-image/com.google.cloud.alloydb.v1beta/reflect-config.json b/java-alloydb/google-cloud-alloydb/src/main/resources/META-INF/native-image/com.google.cloud.alloydb.v1beta/reflect-config.json index 3a0c24ebcc88..f8bbbfee2f34 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/resources/META-INF/native-image/com.google.cloud.alloydb.v1beta/reflect-config.json +++ b/java-alloydb/google-cloud-alloydb/src/main/resources/META-INF/native-image/com.google.cloud.alloydb.v1beta/reflect-config.json @@ -116,6 +116,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.FieldInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Format", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.GoSettings", "queryAllDeclaredConstructors": true, @@ -899,6 +926,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.alloydb.v1beta.Database", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1beta.Database$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.alloydb.v1beta.DatabaseVersion", "queryAllDeclaredConstructors": true, @@ -1241,6 +1286,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.alloydb.v1beta.Instance$InstanceNetworkConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1beta.Instance$InstanceNetworkConfig$AuthorizedNetwork", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1beta.Instance$InstanceNetworkConfig$AuthorizedNetwork$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1beta.Instance$InstanceNetworkConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.alloydb.v1beta.Instance$InstanceType", "queryAllDeclaredConstructors": true, @@ -1286,6 +1367,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.alloydb.v1beta.Instance$PscInstanceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1beta.Instance$PscInstanceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1beta.Instance$PscInterfaceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1beta.Instance$PscInterfaceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.alloydb.v1beta.Instance$QueryInsightsInstanceConfig", "queryAllDeclaredConstructors": true, @@ -1439,6 +1556,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.alloydb.v1beta.ListDatabasesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1beta.ListDatabasesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1beta.ListDatabasesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1beta.ListDatabasesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.alloydb.v1beta.ListInstancesRequest", "queryAllDeclaredConstructors": true, diff --git a/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClientHttpJsonTest.java b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClientHttpJsonTest.java index 257ce5df94a3..93417b882eea 100644 --- a/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClientHttpJsonTest.java +++ b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClientHttpJsonTest.java @@ -1209,6 +1209,7 @@ public void getInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1277,6 +1278,7 @@ public void getInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1347,6 +1349,7 @@ public void createInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1424,6 +1427,7 @@ public void createInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1501,6 +1505,7 @@ public void createSecondaryInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1579,6 +1584,7 @@ public void createSecondaryInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1716,6 +1722,7 @@ public void updateInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1752,6 +1759,7 @@ public void updateInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1808,6 +1816,7 @@ public void updateInstanceExceptionTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1937,6 +1946,7 @@ public void failoverInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -2010,6 +2020,7 @@ public void failoverInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -2085,6 +2096,7 @@ public void injectFaultTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -2160,6 +2172,7 @@ public void injectFaultTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -2237,6 +2250,7 @@ public void restartInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -2310,6 +2324,7 @@ public void restartInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -3149,6 +3164,7 @@ public void getConnectionInfoTest() throws Exception { .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") + .setPscDnsName("pscDnsName1984562292") .build(); mockService.addResponse(expectedResponse); @@ -3197,6 +3213,7 @@ public void getConnectionInfoTest2() throws Exception { .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") + .setPscDnsName("pscDnsName1984562292") .build(); mockService.addResponse(expectedResponse); diff --git a/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClientTest.java b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClientTest.java index c83a1b0f4c36..7c84c1d7cf3b 100644 --- a/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClientTest.java +++ b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClientTest.java @@ -1116,6 +1116,7 @@ public void getInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1178,6 +1179,7 @@ public void getInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1240,6 +1242,7 @@ public void createInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1316,6 +1319,7 @@ public void createInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1392,6 +1396,7 @@ public void createSecondaryInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1470,6 +1475,7 @@ public void createSecondaryInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1607,6 +1613,7 @@ public void updateInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1764,6 +1771,7 @@ public void failoverInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1834,6 +1842,7 @@ public void failoverInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1904,6 +1913,7 @@ public void injectFaultTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -1977,6 +1987,7 @@ public void injectFaultTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -2050,6 +2061,7 @@ public void restartInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -2120,6 +2132,7 @@ public void restartInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) @@ -2854,6 +2867,7 @@ public void getConnectionInfoTest() throws Exception { .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") + .setPscDnsName("pscDnsName1984562292") .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -2896,6 +2910,7 @@ public void getConnectionInfoTest2() throws Exception { .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") + .setPscDnsName("pscDnsName1984562292") .build(); mockAlloyDBAdmin.addResponse(expectedResponse); diff --git a/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClientHttpJsonTest.java b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClientHttpJsonTest.java index 7869ba99ea7c..d1b06ae05732 100644 --- a/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClientHttpJsonTest.java +++ b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClientHttpJsonTest.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -218,6 +219,7 @@ public void getClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); mockService.addResponse(expectedResponse); @@ -283,6 +285,7 @@ public void getClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); mockService.addResponse(expectedResponse); @@ -348,6 +351,7 @@ public void createClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -422,6 +426,7 @@ public void createClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -496,6 +501,7 @@ public void updateClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -529,6 +535,7 @@ public void updateClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -582,6 +589,7 @@ public void updateClusterExceptionTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateClusterAsync(cluster, updateMask).get(); @@ -706,6 +714,7 @@ public void promoteClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -776,6 +785,7 @@ public void promoteClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -846,6 +856,7 @@ public void restoreClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -930,6 +941,7 @@ public void createSecondaryClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1004,6 +1016,7 @@ public void createSecondaryClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1172,11 +1185,15 @@ public void getInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1236,11 +1253,15 @@ public void getInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1302,11 +1323,15 @@ public void createInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1375,11 +1400,15 @@ public void createInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1448,11 +1477,15 @@ public void createSecondaryInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1522,11 +1555,15 @@ public void createSecondaryInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1655,11 +1692,15 @@ public void updateInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1687,11 +1728,15 @@ public void updateInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1739,11 +1784,15 @@ public void updateInstanceExceptionTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateInstanceAsync(instance, updateMask).get(); @@ -1864,11 +1913,15 @@ public void failoverInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1933,11 +1986,15 @@ public void failoverInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2004,11 +2061,15 @@ public void injectFaultTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2075,11 +2136,15 @@ public void injectFaultTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2148,11 +2213,15 @@ public void restartInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2217,11 +2286,15 @@ public void restartInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2390,6 +2463,7 @@ public void getBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); mockService.addResponse(expectedResponse); @@ -2452,6 +2526,7 @@ public void getBackupTest2() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); mockService.addResponse(expectedResponse); @@ -2514,6 +2589,7 @@ public void createBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); Operation resultOperation = @@ -2585,6 +2661,7 @@ public void createBackupTest2() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); Operation resultOperation = @@ -2656,6 +2733,7 @@ public void updateBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); Operation resultOperation = @@ -2686,6 +2764,7 @@ public void updateBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -2736,6 +2815,7 @@ public void updateBackupExceptionTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -3035,8 +3115,10 @@ public void getConnectionInfoTest() throws Exception { ConnectionInfo.newBuilder() .setName("name3373707") .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") + .setPscDnsName("pscDnsName1984562292") .build(); mockService.addResponse(expectedResponse); @@ -3082,8 +3164,10 @@ public void getConnectionInfoTest2() throws Exception { ConnectionInfo.newBuilder() .setName("name3373707") .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") + .setPscDnsName("pscDnsName1984562292") .build(); mockService.addResponse(expectedResponse); @@ -3559,6 +3643,106 @@ public void deleteUserExceptionTest2() throws Exception { } } + @Test + public void listDatabasesTest() throws Exception { + Database responsesElement = Database.newBuilder().build(); + ListDatabasesResponse expectedResponse = + ListDatabasesResponse.newBuilder() + .setNextPageToken("") + .addAllDatabases(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListDatabasesPagedResponse pagedListResponse = client.listDatabases(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDatabasesList().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 listDatabasesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listDatabases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDatabasesTest2() throws Exception { + Database responsesElement = Database.newBuilder().build(); + ListDatabasesResponse expectedResponse = + ListDatabasesResponse.newBuilder() + .setNextPageToken("") + .addAllDatabases(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + + ListDatabasesPagedResponse pagedListResponse = client.listDatabases(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDatabasesList().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 listDatabasesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + client.listDatabases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClientTest.java b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClientTest.java index 88191004584d..52888d705476 100644 --- a/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClientTest.java +++ b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminClientTest.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1beta.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -215,6 +216,7 @@ public void getClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -274,6 +276,7 @@ public void getClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -333,6 +336,7 @@ public void createClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -406,6 +410,7 @@ public void createClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -479,6 +484,7 @@ public void updateClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -633,6 +639,7 @@ public void promoteClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -700,6 +707,7 @@ public void promoteClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -767,6 +775,7 @@ public void restoreClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -855,6 +864,7 @@ public void createSecondaryClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -929,6 +939,7 @@ public void createSecondaryClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1085,11 +1096,15 @@ public void getInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -1143,11 +1158,15 @@ public void getInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -1201,11 +1220,15 @@ public void createInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1273,11 +1296,15 @@ public void createInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1345,11 +1372,15 @@ public void createSecondaryInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1419,11 +1450,15 @@ public void createSecondaryInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1552,11 +1587,15 @@ public void updateInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1705,11 +1744,15 @@ public void failoverInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1771,11 +1814,15 @@ public void failoverInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1837,11 +1884,15 @@ public void injectFaultTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1906,11 +1957,15 @@ public void injectFaultTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1975,11 +2030,15 @@ public void restartInstanceTest() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2041,11 +2100,15 @@ public void restartInstanceTest2() throws Exception { .setQueryInsightsConfig(Instance.QueryInsightsInstanceConfig.newBuilder().build()) .setReadPoolConfig(Instance.ReadPoolConfig.newBuilder().build()) .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .setReconciling(true) .setEtag("etag3123477") .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2197,6 +2260,7 @@ public void getBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -2253,6 +2317,7 @@ public void getBackupTest2() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -2309,6 +2374,7 @@ public void createBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); Operation resultOperation = @@ -2379,6 +2445,7 @@ public void createBackupTest2() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); Operation resultOperation = @@ -2449,6 +2516,7 @@ public void updateBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); Operation resultOperation = @@ -2758,8 +2826,10 @@ public void getConnectionInfoTest() throws Exception { ConnectionInfo.newBuilder() .setName("name3373707") .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") + .setPscDnsName("pscDnsName1984562292") .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -2799,8 +2869,10 @@ public void getConnectionInfoTest2() throws Exception { ConnectionInfo.newBuilder() .setName("name3373707") .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") + .setPscDnsName("pscDnsName1984562292") .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -3205,6 +3277,94 @@ public void deleteUserExceptionTest2() throws Exception { } } + @Test + public void listDatabasesTest() throws Exception { + Database responsesElement = Database.newBuilder().build(); + ListDatabasesResponse expectedResponse = + ListDatabasesResponse.newBuilder() + .setNextPageToken("") + .addAllDatabases(Arrays.asList(responsesElement)) + .build(); + mockAlloyDBAdmin.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListDatabasesPagedResponse pagedListResponse = client.listDatabases(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDatabasesList().get(0), resources.get(0)); + + List actualRequests = mockAlloyDBAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDatabasesRequest actualRequest = ((ListDatabasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDatabasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAlloyDBAdmin.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listDatabases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDatabasesTest2() throws Exception { + Database responsesElement = Database.newBuilder().build(); + ListDatabasesResponse expectedResponse = + ListDatabasesResponse.newBuilder() + .setNextPageToken("") + .addAllDatabases(Arrays.asList(responsesElement)) + .build(); + mockAlloyDBAdmin.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDatabasesPagedResponse pagedListResponse = client.listDatabases(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDatabasesList().get(0), resources.get(0)); + + List actualRequests = mockAlloyDBAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDatabasesRequest actualRequest = ((ListDatabasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDatabasesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAlloyDBAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDatabases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/MockAlloyDBAdminImpl.java b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/MockAlloyDBAdminImpl.java index 4a06cc900984..de3d36a104ad 100644 --- a/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/MockAlloyDBAdminImpl.java +++ b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1beta/MockAlloyDBAdminImpl.java @@ -704,4 +704,25 @@ public void deleteUser(DeleteUserRequest request, StreamObserver response Exception.class.getName()))); } } + + @Override + public void listDatabases( + ListDatabasesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDatabasesResponse) { + requests.add(request); + responseObserver.onNext(((ListDatabasesResponse) 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 ListDatabases, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDatabasesResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-alloydb/grpc-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminGrpc.java b/java-alloydb/grpc-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminGrpc.java index bf45990c7e35..5bfdf901af8e 100644 --- a/java-alloydb/grpc-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminGrpc.java +++ b/java-alloydb/grpc-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/AlloyDBAdminGrpc.java @@ -1414,6 +1414,53 @@ private AlloyDBAdminGrpc() {} return getDeleteUserMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.alloydb.v1beta.ListDatabasesRequest, + com.google.cloud.alloydb.v1beta.ListDatabasesResponse> + getListDatabasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDatabases", + requestType = com.google.cloud.alloydb.v1beta.ListDatabasesRequest.class, + responseType = com.google.cloud.alloydb.v1beta.ListDatabasesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.alloydb.v1beta.ListDatabasesRequest, + com.google.cloud.alloydb.v1beta.ListDatabasesResponse> + getListDatabasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.alloydb.v1beta.ListDatabasesRequest, + com.google.cloud.alloydb.v1beta.ListDatabasesResponse> + getListDatabasesMethod; + if ((getListDatabasesMethod = AlloyDBAdminGrpc.getListDatabasesMethod) == null) { + synchronized (AlloyDBAdminGrpc.class) { + if ((getListDatabasesMethod = AlloyDBAdminGrpc.getListDatabasesMethod) == null) { + AlloyDBAdminGrpc.getListDatabasesMethod = + getListDatabasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDatabases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.alloydb.v1beta.ListDatabasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.alloydb.v1beta.ListDatabasesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AlloyDBAdminMethodDescriptorSupplier("ListDatabases")) + .build(); + } + } + } + return getListDatabasesMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static AlloyDBAdminStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -1922,6 +1969,21 @@ default void deleteUser( io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteUserMethod(), responseObserver); } + + /** + * + * + *
+     * Lists Databases in a given project and location.
+     * 
+ */ + default void listDatabases( + com.google.cloud.alloydb.v1beta.ListDatabasesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDatabasesMethod(), responseObserver); + } } /** @@ -2471,6 +2533,23 @@ public void deleteUser( io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getDeleteUserMethod(), getCallOptions()), request, responseObserver); } + + /** + * + * + *
+     * Lists Databases in a given project and location.
+     * 
+ */ + public void listDatabases( + com.google.cloud.alloydb.v1beta.ListDatabasesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDatabasesMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -2919,6 +2998,19 @@ public com.google.protobuf.Empty deleteUser( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteUserMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Lists Databases in a given project and location.
+     * 
+ */ + public com.google.cloud.alloydb.v1beta.ListDatabasesResponse listDatabases( + com.google.cloud.alloydb.v1beta.ListDatabasesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDatabasesMethod(), getCallOptions(), request); + } } /** @@ -3379,6 +3471,20 @@ public com.google.common.util.concurrent.ListenableFuture + * Lists Databases in a given project and location. + * + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.alloydb.v1beta.ListDatabasesResponse> + listDatabases(com.google.cloud.alloydb.v1beta.ListDatabasesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDatabasesMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_CLUSTERS = 0; @@ -3412,6 +3518,7 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3597,6 +3704,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.alloydb.v1beta.DeleteUserRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_DATABASES: + serviceImpl.listDatabases( + (com.google.cloud.alloydb.v1beta.ListDatabasesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -3808,6 +3921,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.alloydb.v1beta.DeleteUserRequest, com.google.protobuf.Empty>( service, METHODID_DELETE_USER))) + .addMethod( + getListDatabasesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.alloydb.v1beta.ListDatabasesRequest, + com.google.cloud.alloydb.v1beta.ListDatabasesResponse>( + service, METHODID_LIST_DATABASES))) .build(); } @@ -3890,6 +4010,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateUserMethod()) .addMethod(getUpdateUserMethod()) .addMethod(getDeleteUserMethod()) + .addMethod(getListDatabasesMethod()) .build(); } } diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ConnectionInfo.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ConnectionInfo.java index d6fc728cad03..4b9864b25af7 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ConnectionInfo.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ConnectionInfo.java @@ -45,6 +45,7 @@ private ConnectionInfo() { publicIpAddress_ = ""; pemCertificateChain_ = com.google.protobuf.LazyStringArrayList.emptyList(); instanceUid_ = ""; + pscDnsName_ = ""; } @java.lang.Override @@ -255,7 +256,7 @@ public com.google.protobuf.ByteString getPublicIpAddressBytes() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @return A list containing the pemCertificateChain. */ @java.lang.Deprecated @@ -275,7 +276,7 @@ public com.google.protobuf.ProtocolStringList getPemCertificateChainList() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @return The count of pemCertificateChain. */ @java.lang.Deprecated @@ -295,7 +296,7 @@ public int getPemCertificateChainCount() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @param index The index of the element to return. * @return The pemCertificateChain at the given index. */ @@ -316,7 +317,7 @@ public java.lang.String getPemCertificateChain(int index) { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @param index The index of the value to return. * @return The bytes of the pemCertificateChain at the given index. */ @@ -376,6 +377,57 @@ public com.google.protobuf.ByteString getInstanceUidBytes() { } } + public static final int PSC_DNS_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object pscDnsName_ = ""; + /** + * + * + *
+   * Output only. The DNS name to use with PSC for the Instance.
+   * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscDnsName. + */ + @java.lang.Override + public java.lang.String getPscDnsName() { + java.lang.Object ref = pscDnsName_; + 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(); + pscDnsName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The DNS name to use with PSC for the Instance.
+   * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscDnsName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPscDnsNameBytes() { + java.lang.Object ref = pscDnsName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pscDnsName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -405,6 +457,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIpAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, publicIpAddress_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pscDnsName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pscDnsName_); + } getUnknownFields().writeTo(output); } @@ -434,6 +489,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIpAddress_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, publicIpAddress_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pscDnsName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pscDnsName_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -455,6 +513,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPublicIpAddress().equals(other.getPublicIpAddress())) return false; if (!getPemCertificateChainList().equals(other.getPemCertificateChainList())) return false; if (!getInstanceUid().equals(other.getInstanceUid())) return false; + if (!getPscDnsName().equals(other.getPscDnsName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -478,6 +537,8 @@ public int hashCode() { } hash = (37 * hash) + INSTANCE_UID_FIELD_NUMBER; hash = (53 * hash) + getInstanceUid().hashCode(); + hash = (37 * hash) + PSC_DNS_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPscDnsName().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -623,6 +684,7 @@ public Builder clear() { publicIpAddress_ = ""; pemCertificateChain_ = com.google.protobuf.LazyStringArrayList.emptyList(); instanceUid_ = ""; + pscDnsName_ = ""; return this; } @@ -675,6 +737,9 @@ private void buildPartial0(com.google.cloud.alloydb.v1alpha.ConnectionInfo resul if (((from_bitField0_ & 0x00000010) != 0)) { result.instanceUid_ = instanceUid_; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pscDnsName_ = pscDnsName_; + } } @java.lang.Override @@ -753,6 +818,11 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.ConnectionInfo other) bitField0_ |= 0x00000010; onChanged(); } + if (!other.getPscDnsName().isEmpty()) { + pscDnsName_ = other.pscDnsName_; + bitField0_ |= 0x00000020; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -810,6 +880,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 42 + case 50: + { + pscDnsName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1209,7 +1285,7 @@ private void ensurePemCertificateChainIsMutable() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @return A list containing the pemCertificateChain. */ @java.lang.Deprecated @@ -1230,7 +1306,7 @@ public com.google.protobuf.ProtocolStringList getPemCertificateChainList() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @return The count of pemCertificateChain. */ @java.lang.Deprecated @@ -1250,7 +1326,7 @@ public int getPemCertificateChainCount() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @param index The index of the element to return. * @return The pemCertificateChain at the given index. */ @@ -1271,7 +1347,7 @@ public java.lang.String getPemCertificateChain(int index) { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @param index The index of the value to return. * @return The bytes of the pemCertificateChain at the given index. */ @@ -1292,7 +1368,7 @@ public com.google.protobuf.ByteString getPemCertificateChainBytes(int index) { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @param index The index to set the value at. * @param value The pemCertificateChain to set. * @return This builder for chaining. @@ -1321,7 +1397,7 @@ public Builder setPemCertificateChain(int index, java.lang.String value) { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @param value The pemCertificateChain to add. * @return This builder for chaining. */ @@ -1349,7 +1425,7 @@ public Builder addPemCertificateChain(java.lang.String value) { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @param values The pemCertificateChain to add. * @return This builder for chaining. */ @@ -1374,7 +1450,7 @@ public Builder addAllPemCertificateChain(java.lang.Iterable va * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1398,7 +1474,7 @@ public Builder clearPemCertificateChain() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @param value The bytes of the pemCertificateChain to add. * @return This builder for chaining. */ @@ -1521,6 +1597,112 @@ public Builder setInstanceUidBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object pscDnsName_ = ""; + /** + * + * + *
+     * Output only. The DNS name to use with PSC for the Instance.
+     * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscDnsName. + */ + public java.lang.String getPscDnsName() { + java.lang.Object ref = pscDnsName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pscDnsName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The DNS name to use with PSC for the Instance.
+     * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscDnsName. + */ + public com.google.protobuf.ByteString getPscDnsNameBytes() { + java.lang.Object ref = pscDnsName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pscDnsName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The DNS name to use with PSC for the Instance.
+     * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pscDnsName to set. + * @return This builder for chaining. + */ + public Builder setPscDnsName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pscDnsName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The DNS name to use with PSC for the Instance.
+     * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPscDnsName() { + pscDnsName_ = getDefaultInstance().getPscDnsName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The DNS name to use with PSC for the Instance.
+     * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pscDnsName to set. + * @return This builder for chaining. + */ + public Builder setPscDnsNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pscDnsName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ConnectionInfoOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ConnectionInfoOrBuilder.java index 98d51c7a4d6a..dbee61a4d566 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ConnectionInfoOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ConnectionInfoOrBuilder.java @@ -128,7 +128,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @return A list containing the pemCertificateChain. */ @java.lang.Deprecated @@ -146,7 +146,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @return The count of pemCertificateChain. */ @java.lang.Deprecated @@ -164,7 +164,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @param index The index of the element to return. * @return The pemCertificateChain at the given index. */ @@ -183,7 +183,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1032 * @param index The index of the value to return. * @return The bytes of the pemCertificateChain at the given index. */ @@ -214,4 +214,29 @@ public interface ConnectionInfoOrBuilder * @return The bytes for instanceUid. */ com.google.protobuf.ByteString getInstanceUidBytes(); + + /** + * + * + *
+   * Output only. The DNS name to use with PSC for the Instance.
+   * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscDnsName. + */ + java.lang.String getPscDnsName(); + /** + * + * + *
+   * Output only. The DNS name to use with PSC for the Instance.
+   * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscDnsName. + */ + com.google.protobuf.ByteString getPscDnsNameBytes(); } diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Instance.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Instance.java index 5a0a66bcaabc..7ead3d69753a 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Instance.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Instance.java @@ -49,6 +49,7 @@ private Instance() { gceZone_ = ""; nodes_ = java.util.Collections.emptyList(); ipAddress_ = ""; + publicIpAddress_ = ""; etag_ = ""; } @@ -12648,6 +12649,61 @@ public com.google.protobuf.ByteString getIpAddressBytes() { } } + public static final int PUBLIC_IP_ADDRESS_FIELD_NUMBER = 27; + + @SuppressWarnings("serial") + private volatile java.lang.Object publicIpAddress_ = ""; + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicIpAddress. + */ + @java.lang.Override + public java.lang.String getPublicIpAddress() { + java.lang.Object ref = publicIpAddress_; + 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(); + publicIpAddress_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublicIpAddressBytes() { + java.lang.Object ref = publicIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int RECONCILING_FIELD_NUMBER = 16; private boolean reconciling_ = false; /** @@ -13190,6 +13246,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (satisfiesPzs_ != false) { output.writeBool(24, satisfiesPzs_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIpAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 27, publicIpAddress_); + } if (((bitField0_ & 0x00000200) != 0)) { output.writeMessage(28, getPscInstanceConfig()); } @@ -13307,6 +13366,9 @@ public int getSerializedSize() { if (satisfiesPzs_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(24, satisfiesPzs_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIpAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, publicIpAddress_); + } if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getPscInstanceConfig()); } @@ -13371,6 +13433,7 @@ public boolean equals(final java.lang.Object obj) { if (!getReadPoolConfig().equals(other.getReadPoolConfig())) return false; } if (!getIpAddress().equals(other.getIpAddress())) return false; + if (!getPublicIpAddress().equals(other.getPublicIpAddress())) return false; if (getReconciling() != other.getReconciling()) return false; if (!getEtag().equals(other.getEtag())) return false; if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; @@ -13459,6 +13522,8 @@ public int hashCode() { } hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PUBLIC_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getPublicIpAddress().hashCode(); hash = (37 * hash) + RECONCILING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReconciling()); hash = (37 * hash) + ETAG_FIELD_NUMBER; @@ -13729,6 +13794,7 @@ public Builder clear() { readPoolConfigBuilder_ = null; } ipAddress_ = ""; + publicIpAddress_ = ""; reconciling_ = false; etag_ = ""; internalGetMutableAnnotations().clear(); @@ -13871,41 +13937,44 @@ private void buildPartial0(com.google.cloud.alloydb.v1alpha.Instance result) { result.ipAddress_ = ipAddress_; } if (((from_bitField0_ & 0x00040000) != 0)) { - result.reconciling_ = reconciling_; + result.publicIpAddress_ = publicIpAddress_; } if (((from_bitField0_ & 0x00080000) != 0)) { - result.etag_ = etag_; + result.reconciling_ = reconciling_; } if (((from_bitField0_ & 0x00100000) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { result.annotations_ = internalGetAnnotations(); result.annotations_.makeImmutable(); } - if (((from_bitField0_ & 0x00200000) != 0)) { + if (((from_bitField0_ & 0x00400000) != 0)) { result.updatePolicy_ = updatePolicyBuilder_ == null ? updatePolicy_ : updatePolicyBuilder_.build(); to_bitField0_ |= 0x00000080; } - if (((from_bitField0_ & 0x00400000) != 0)) { + if (((from_bitField0_ & 0x00800000) != 0)) { result.clientConnectionConfig_ = clientConnectionConfigBuilder_ == null ? clientConnectionConfig_ : clientConnectionConfigBuilder_.build(); to_bitField0_ |= 0x00000100; } - if (((from_bitField0_ & 0x00800000) != 0)) { + if (((from_bitField0_ & 0x01000000) != 0)) { result.satisfiesPzi_ = satisfiesPzi_; } - if (((from_bitField0_ & 0x01000000) != 0)) { + if (((from_bitField0_ & 0x02000000) != 0)) { result.satisfiesPzs_ = satisfiesPzs_; } - if (((from_bitField0_ & 0x02000000) != 0)) { + if (((from_bitField0_ & 0x04000000) != 0)) { result.pscInstanceConfig_ = pscInstanceConfigBuilder_ == null ? pscInstanceConfig_ : pscInstanceConfigBuilder_.build(); to_bitField0_ |= 0x00000200; } - if (((from_bitField0_ & 0x04000000) != 0)) { + if (((from_bitField0_ & 0x08000000) != 0)) { result.networkConfig_ = networkConfigBuilder_ == null ? networkConfig_ : networkConfigBuilder_.build(); to_bitField0_ |= 0x00000400; @@ -14044,16 +14113,21 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.Instance other) { bitField0_ |= 0x00020000; onChanged(); } + if (!other.getPublicIpAddress().isEmpty()) { + publicIpAddress_ = other.publicIpAddress_; + bitField0_ |= 0x00040000; + onChanged(); + } if (other.getReconciling() != false) { setReconciling(other.getReconciling()); } if (!other.getEtag().isEmpty()) { etag_ = other.etag_; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); } internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; if (other.hasUpdatePolicy()) { mergeUpdatePolicy(other.getUpdatePolicy()); } @@ -14203,13 +14277,13 @@ public Builder mergeFrom( case 128: { reconciling_ = input.readBool(); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; break; } // case 128 case 138: { etag_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; break; } // case 138 case 146: @@ -14221,7 +14295,7 @@ public Builder mergeFrom( internalGetMutableAnnotations() .getMutableMap() .put(annotations__.getKey(), annotations__.getValue()); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; break; } // case 146 case 154: @@ -14253,39 +14327,45 @@ public Builder mergeFrom( case 178: { input.readMessage(getUpdatePolicyFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; break; } // case 178 case 186: { input.readMessage( getClientConnectionConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; break; } // case 186 case 192: { satisfiesPzs_ = input.readBool(); - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; break; } // case 192 + case 218: + { + publicIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case 218 case 226: { input.readMessage( getPscInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; break; } // case 226 case 234: { input.readMessage(getNetworkConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; break; } // case 234 case 240: { satisfiesPzi_ = input.readBool(); - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; break; } // case 240 default: @@ -17493,6 +17573,122 @@ public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object publicIpAddress_ = ""; + /** + * + * + *
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
+     * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicIpAddress. + */ + public java.lang.String getPublicIpAddress() { + java.lang.Object ref = publicIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
+     * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicIpAddress. + */ + public com.google.protobuf.ByteString getPublicIpAddressBytes() { + java.lang.Object ref = publicIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
+     * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The publicIpAddress to set. + * @return This builder for chaining. + */ + public Builder setPublicIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + publicIpAddress_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
+     * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPublicIpAddress() { + publicIpAddress_ = getDefaultInstance().getPublicIpAddress(); + bitField0_ = (bitField0_ & ~0x00040000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
+     * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for publicIpAddress to set. + * @return This builder for chaining. + */ + public Builder setPublicIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + publicIpAddress_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + private boolean reconciling_; /** * @@ -17532,7 +17728,7 @@ public boolean getReconciling() { public Builder setReconciling(boolean value) { reconciling_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -17552,7 +17748,7 @@ public Builder setReconciling(boolean value) { * @return This builder for chaining. */ public Builder clearReconciling() { - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); reconciling_ = false; onChanged(); return this; @@ -17620,7 +17816,7 @@ public Builder setEtag(java.lang.String value) { throw new NullPointerException(); } etag_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -17637,7 +17833,7 @@ public Builder setEtag(java.lang.String value) { */ public Builder clearEtag() { etag_ = getDefaultInstance().getEtag(); - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00100000); onChanged(); return this; } @@ -17659,7 +17855,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); etag_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -17684,7 +17880,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { if (!annotations_.isMutable()) { annotations_ = annotations_.copy(); } - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return annotations_; } @@ -17777,7 +17973,7 @@ public java.lang.String getAnnotationsOrThrow(java.lang.String key) { } public Builder clearAnnotations() { - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); internalGetMutableAnnotations().getMutableMap().clear(); return this; } @@ -17802,7 +17998,7 @@ public Builder removeAnnotations(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableAnnotations() { - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; return internalGetMutableAnnotations().getMutableMap(); } /** @@ -17824,7 +18020,7 @@ public Builder putAnnotations(java.lang.String key, java.lang.String value) { throw new NullPointerException("map value"); } internalGetMutableAnnotations().getMutableMap().put(key, value); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; return this; } /** @@ -17840,7 +18036,7 @@ public Builder putAnnotations(java.lang.String key, java.lang.String value) { */ public Builder putAllAnnotations(java.util.Map values) { internalGetMutableAnnotations().getMutableMap().putAll(values); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; return this; } @@ -17865,7 +18061,7 @@ public Builder putAllAnnotations(java.util.Map.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy update_policy = 22; */ public Builder clearUpdatePolicy() { - bitField0_ = (bitField0_ & ~0x00200000); + bitField0_ = (bitField0_ & ~0x00400000); updatePolicy_ = null; if (updatePolicyBuilder_ != null) { updatePolicyBuilder_.dispose(); @@ -18004,7 +18200,7 @@ public Builder clearUpdatePolicy() { * .google.cloud.alloydb.v1alpha.Instance.UpdatePolicy update_policy = 22; */ public com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder getUpdatePolicyBuilder() { - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return getUpdatePolicyFieldBuilder().getBuilder(); } @@ -18080,7 +18276,7 @@ public com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder getUpdateP * @return Whether the clientConnectionConfig field is set. */ public boolean hasClientConnectionConfig() { - return ((bitField0_ & 0x00400000) != 0); + return ((bitField0_ & 0x00800000) != 0); } /** * @@ -18126,7 +18322,7 @@ public Builder setClientConnectionConfig( } else { clientConnectionConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -18148,7 +18344,7 @@ public Builder setClientConnectionConfig( } else { clientConnectionConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -18166,7 +18362,7 @@ public Builder setClientConnectionConfig( public Builder mergeClientConnectionConfig( com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig value) { if (clientConnectionConfigBuilder_ == null) { - if (((bitField0_ & 0x00400000) != 0) + if (((bitField0_ & 0x00800000) != 0) && clientConnectionConfig_ != null && clientConnectionConfig_ != com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig @@ -18179,7 +18375,7 @@ public Builder mergeClientConnectionConfig( clientConnectionConfigBuilder_.mergeFrom(value); } if (clientConnectionConfig_ != null) { - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); } return this; @@ -18196,7 +18392,7 @@ public Builder mergeClientConnectionConfig( * */ public Builder clearClientConnectionConfig() { - bitField0_ = (bitField0_ & ~0x00400000); + bitField0_ = (bitField0_ & ~0x00800000); clientConnectionConfig_ = null; if (clientConnectionConfigBuilder_ != null) { clientConnectionConfigBuilder_.dispose(); @@ -18218,7 +18414,7 @@ public Builder clearClientConnectionConfig() { */ public com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.Builder getClientConnectionConfigBuilder() { - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); return getClientConnectionConfigFieldBuilder().getBuilder(); } @@ -18302,7 +18498,7 @@ public boolean getSatisfiesPzi() { public Builder setSatisfiesPzi(boolean value) { satisfiesPzi_ = value; - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; onChanged(); return this; } @@ -18318,7 +18514,7 @@ public Builder setSatisfiesPzi(boolean value) { * @return This builder for chaining. */ public Builder clearSatisfiesPzi() { - bitField0_ = (bitField0_ & ~0x00800000); + bitField0_ = (bitField0_ & ~0x01000000); satisfiesPzi_ = false; onChanged(); return this; @@ -18355,7 +18551,7 @@ public boolean getSatisfiesPzs() { public Builder setSatisfiesPzs(boolean value) { satisfiesPzs_ = value; - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -18371,7 +18567,7 @@ public Builder setSatisfiesPzs(boolean value) { * @return This builder for chaining. */ public Builder clearSatisfiesPzs() { - bitField0_ = (bitField0_ & ~0x01000000); + bitField0_ = (bitField0_ & ~0x02000000); satisfiesPzs_ = false; onChanged(); return this; @@ -18398,7 +18594,7 @@ public Builder clearSatisfiesPzs() { * @return Whether the pscInstanceConfig field is set. */ public boolean hasPscInstanceConfig() { - return ((bitField0_ & 0x02000000) != 0); + return ((bitField0_ & 0x04000000) != 0); } /** * @@ -18445,7 +18641,7 @@ public Builder setPscInstanceConfig( } else { pscInstanceConfigBuilder_.setMessage(value); } - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -18468,7 +18664,7 @@ public Builder setPscInstanceConfig( } else { pscInstanceConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -18487,7 +18683,7 @@ public Builder setPscInstanceConfig( public Builder mergePscInstanceConfig( com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig value) { if (pscInstanceConfigBuilder_ == null) { - if (((bitField0_ & 0x02000000) != 0) + if (((bitField0_ & 0x04000000) != 0) && pscInstanceConfig_ != null && pscInstanceConfig_ != com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig @@ -18500,7 +18696,7 @@ public Builder mergePscInstanceConfig( pscInstanceConfigBuilder_.mergeFrom(value); } if (pscInstanceConfig_ != null) { - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; onChanged(); } return this; @@ -18518,7 +18714,7 @@ public Builder mergePscInstanceConfig( * */ public Builder clearPscInstanceConfig() { - bitField0_ = (bitField0_ & ~0x02000000); + bitField0_ = (bitField0_ & ~0x04000000); pscInstanceConfig_ = null; if (pscInstanceConfigBuilder_ != null) { pscInstanceConfigBuilder_.dispose(); @@ -18541,7 +18737,7 @@ public Builder clearPscInstanceConfig() { */ public com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig.Builder getPscInstanceConfigBuilder() { - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; onChanged(); return getPscInstanceConfigFieldBuilder().getBuilder(); } @@ -18616,7 +18812,7 @@ public Builder clearPscInstanceConfig() { * @return Whether the networkConfig field is set. */ public boolean hasNetworkConfig() { - return ((bitField0_ & 0x04000000) != 0); + return ((bitField0_ & 0x08000000) != 0); } /** * @@ -18661,7 +18857,7 @@ public Builder setNetworkConfig( } else { networkConfigBuilder_.setMessage(value); } - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -18683,7 +18879,7 @@ public Builder setNetworkConfig( } else { networkConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -18701,7 +18897,7 @@ public Builder setNetworkConfig( public Builder mergeNetworkConfig( com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig value) { if (networkConfigBuilder_ == null) { - if (((bitField0_ & 0x04000000) != 0) + if (((bitField0_ & 0x08000000) != 0) && networkConfig_ != null && networkConfig_ != com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig @@ -18714,7 +18910,7 @@ public Builder mergeNetworkConfig( networkConfigBuilder_.mergeFrom(value); } if (networkConfig_ != null) { - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); } return this; @@ -18731,7 +18927,7 @@ public Builder mergeNetworkConfig( * */ public Builder clearNetworkConfig() { - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); networkConfig_ = null; if (networkConfigBuilder_ != null) { networkConfigBuilder_.dispose(); @@ -18753,7 +18949,7 @@ public Builder clearNetworkConfig() { */ public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.Builder getNetworkConfigBuilder() { - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return getNetworkConfigFieldBuilder().getBuilder(); } diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/InstanceOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/InstanceOrBuilder.java index 1c39f3668878..e2535cd822c9 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/InstanceOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/InstanceOrBuilder.java @@ -796,6 +796,35 @@ java.lang.String getDatabaseFlagsOrDefault( */ com.google.protobuf.ByteString getIpAddressBytes(); + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicIpAddress. + */ + java.lang.String getPublicIpAddress(); + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicIpAddress. + */ + com.google.protobuf.ByteString getPublicIpAddressBytes(); + /** * * diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ResourcesProto.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ResourcesProto.java index 64d167f84081..c07bd37d40b4 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ResourcesProto.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ResourcesProto.java @@ -218,13 +218,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n,google/cloud/alloydb/v1alpha/resources" - + ".proto\022\034google.cloud.alloydb.v1alpha\032\036go" - + "ogle/protobuf/duration.proto\032\037google/pro" - + "tobuf/timestamp.proto\032\036google/protobuf/w" - + "rappers.proto\032\033google/type/dayofweek.pro" - + "to\032\033google/type/timeofday.proto\032\037google/" - + "api/field_behavior.proto\032\033google/api/fie" - + "ld_info.proto\032\031google/api/resource.proto" + + ".proto\022\034google.cloud.alloydb.v1alpha\032\037go" + + "ogle/api/field_behavior.proto\032\033google/ap" + + "i/field_info.proto\032\031google/api/resource." + + "proto\032\036google/protobuf/duration.proto\032\037g" + + "oogle/protobuf/timestamp.proto\032\036google/p" + + "rotobuf/wrappers.proto\032\033google/type/dayo" + + "fweek.proto\032\033google/type/timeofday.proto" + "\".\n\014UserPassword\022\014\n\004user\030\001 \001(\t\022\020\n\010passwo" + "rd\030\002 \001(\t\"\350\001\n\017MigrationSource\022\026\n\thost_por" + "t\030\001 \001(\tB\003\340A\003\022\031\n\014reference_id\030\002 \001(\tB\003\340A\003\022" @@ -350,7 +350,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022\r\n\tSECONDARY\020\002:b\352A_\n\036alloydb.googleapis" + ".com/Cluster\022:projects/{project}/locatio" + "ns/{location}/clusters/{cluster}R\001\001B\010\n\006s" - + "ource\"\212\033\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n" + + "ource\"\252\033\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n" + "\014display_name\030\002 \001(\t\022\020\n\003uid\030\003 \001(\tB\003\340A\003\0224\n" + "\013create_time\030\004 \001(\0132\032.google.protobuf.Tim" + "estampB\003\340A\003\0224\n\013update_time\030\005 \001(\0132\032.googl" @@ -376,182 +376,183 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "stance.QueryInsightsInstanceConfig\022O\n\020re" + "ad_pool_config\030\016 \001(\01325.google.cloud.allo" + "ydb.v1alpha.Instance.ReadPoolConfig\022\027\n\ni" - + "p_address\030\017 \001(\tB\003\340A\003\022\030\n\013reconciling\030\020 \001(" - + "\010B\003\340A\003\022\014\n\004etag\030\021 \001(\t\022L\n\013annotations\030\022 \003(" - + "\01327.google.cloud.alloydb.v1alpha.Instanc" - + "e.AnnotationsEntry\022J\n\rupdate_policy\030\026 \001(" - + "\01323.google.cloud.alloydb.v1alpha.Instanc" - + "e.UpdatePolicy\022d\n\030client_connection_conf" - + "ig\030\027 \001(\0132=.google.cloud.alloydb.v1alpha." - + "Instance.ClientConnectionConfigB\003\340A\001\022\032\n\r" - + "satisfies_pzi\030\036 \001(\010B\003\340A\003\022\032\n\rsatisfies_pz" - + "s\030\030 \001(\010B\003\340A\003\022Z\n\023psc_instance_config\030\034 \001(" - + "\01328.google.cloud.alloydb.v1alpha.Instanc" - + "e.PscInstanceConfigB\003\340A\001\022Y\n\016network_conf" - + "ig\030\035 \001(\0132<.google.cloud.alloydb.v1alpha." - + "Instance.InstanceNetworkConfigB\003\340A\001\032\"\n\rM" - + "achineConfig\022\021\n\tcpu_count\030\001 \001(\005\032>\n\004Node\022" - + "\017\n\007zone_id\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\n\n\002ip\030\003 \001(\t" - + "\022\r\n\005state\030\004 \001(\t\032\372\001\n\033QueryInsightsInstanc" - + "eConfig\022$\n\027record_application_tags\030\002 \001(\010" - + "H\000\210\001\001\022\"\n\025record_client_address\030\003 \001(\010H\001\210\001" - + "\001\022\033\n\023query_string_length\030\004 \001(\r\022#\n\026query_" - + "plans_per_minute\030\005 \001(\rH\002\210\001\001B\032\n\030_record_a" - + "pplication_tagsB\030\n\026_record_client_addres" - + "sB\031\n\027_query_plans_per_minute\032$\n\016ReadPool" - + "Config\022\022\n\nnode_count\030\001 \001(\005\032\222\001\n\014UpdatePol" - + "icy\022F\n\004mode\030\001 \001(\01628.google.cloud.alloydb" - + ".v1alpha.Instance.UpdatePolicy.Mode\":\n\004M" - + "ode\022\024\n\020MODE_UNSPECIFIED\020\000\022\013\n\007DEFAULT\020\001\022\017" - + "\n\013FORCE_APPLY\020\002\032{\n\026ClientConnectionConfi" - + "g\022\037\n\022require_connectors\030\001 \001(\010B\003\340A\001\022@\n\nss" - + "l_config\030\002 \001(\0132\'.google.cloud.alloydb.v1" - + "alpha.SslConfigB\003\340A\001\032O\n\022PscInterfaceConf" - + "ig\022\035\n\025consumer_endpoint_ips\030\001 \003(\t\022\032\n\022net" - + "work_attachment\030\002 \001(\t\032\262\002\n\021PscInstanceCon" - + "fig\022$\n\027service_attachment_link\030\001 \001(\tB\003\340A" - + "\003\022&\n\031allowed_consumer_projects\030\002 \003(\tB\003\340A" - + "\001\022&\n\031allowed_consumer_networks\030\003 \003(\tB\003\340A" - + "\001\022]\n\025psc_interface_configs\030\004 \003(\01329.googl" - + "e.cloud.alloydb.v1alpha.Instance.PscInte" - + "rfaceConfigB\003\340A\001\022.\n!outgoing_service_att" - + "achment_links\030\005 \003(\tB\003\340A\001\022\030\n\013psc_enabled\030" - + "\006 \001(\010B\003\340A\001\032\344\001\n\025InstanceNetworkConfig\022y\n\034" - + "authorized_external_networks\030\001 \003(\0132N.goo" - + "gle.cloud.alloydb.v1alpha.Instance.Insta" - + "nceNetworkConfig.AuthorizedNetworkB\003\340A\001\022" - + "\035\n\020enable_public_ip\030\002 \001(\010B\003\340A\001\0321\n\021Author" - + "izedNetwork\022\034\n\ncidr_range\030\001 \001(\tB\010\342\214\317\327\010\002\010" - + "\002\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001\0324\n\022DatabaseFlagsEntry\022\013\n\003key\030\001 " - + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020AnnotationsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\221\001\n\005S" - + "tate\022\025\n\021STATE_UNSPECIFIED\020\000\022\t\n\005READY\020\001\022\013" - + "\n\007STOPPED\020\002\022\014\n\010CREATING\020\003\022\014\n\010DELETING\020\004\022" - + "\017\n\013MAINTENANCE\020\005\022\n\n\006FAILED\020\006\022\021\n\rBOOTSTRA" - + "PPING\020\010\022\r\n\tPROMOTING\020\t\"X\n\014InstanceType\022\035" - + "\n\031INSTANCE_TYPE_UNSPECIFIED\020\000\022\013\n\007PRIMARY" - + "\020\001\022\r\n\tREAD_POOL\020\002\022\r\n\tSECONDARY\020\003\"N\n\020Avai" - + "labilityType\022!\n\035AVAILABILITY_TYPE_UNSPEC" - + "IFIED\020\000\022\t\n\005ZONAL\020\001\022\014\n\010REGIONAL\020\002:x\352Au\n\037a" - + "lloydb.googleapis.com/Instance\022Oprojects" - + "/{project}/locations/{location}/clusters" - + "/{cluster}/instances/{instance}R\001\001\"\256\002\n\016C" - + "onnectionInfo\022\014\n\004name\030\001 \001(\t\022\027\n\nip_addres" - + "s\030\002 \001(\tB\003\340A\003\022&\n\021public_ip_address\030\005 \001(\tB" - + "\013\340A\003\342\214\317\327\010\002\010\002\022$\n\025pem_certificate_chain\030\003 " - + "\003(\tB\005\030\001\340A\003\022\031\n\014instance_uid\030\004 \001(\tB\003\340A\003:\213\001" - + "\352A\207\001\n%alloydb.googleapis.com/ConnectionI" - + "nfo\022^projects/{project}/locations/{locat" - + "ion}/clusters/{cluster}/instances/{insta" - + "nce}/connectionInfo\"\206\014\n\006Backup\022\021\n\004name\030\001" - + " \001(\tB\003\340A\003\022\024\n\014display_name\030\002 \001(\t\022\020\n\003uid\030\003" - + " \001(\tB\003\340A\003\0224\n\013create_time\030\004 \001(\0132\032.google." - + "protobuf.TimestampB\003\340A\003\0224\n\013update_time\030\005" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" - + "\013delete_time\030\017 \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\003\022@\n\006labels\030\006 \003(\01320.google.clo" - + "ud.alloydb.v1alpha.Backup.LabelsEntry\022>\n" - + "\005state\030\007 \001(\0162*.google.cloud.alloydb.v1al" - + "pha.Backup.StateB\003\340A\003\0227\n\004type\030\010 \001(\0162).go" - + "ogle.cloud.alloydb.v1alpha.Backup.Type\022\023" - + "\n\013description\030\t \001(\t\022\030\n\013cluster_uid\030\022 \001(\t" - + "B\003\340A\003\022<\n\014cluster_name\030\n \001(\tB&\340A\002\372A \n\036all" - + "oydb.googleapis.com/Cluster\022\030\n\013reconcili" - + "ng\030\013 \001(\010B\003\340A\003\022N\n\021encryption_config\030\014 \001(\013" - + "2..google.cloud.alloydb.v1alpha.Encrypti" - + "onConfigB\003\340A\001\022J\n\017encryption_info\030\r \001(\0132," - + ".google.cloud.alloydb.v1alpha.Encryption" - + "InfoB\003\340A\003\022\014\n\004etag\030\016 \001(\t\022J\n\013annotations\030\020" - + " \003(\01325.google.cloud.alloydb.v1alpha.Back" - + "up.AnnotationsEntry\022\027\n\nsize_bytes\030\021 \001(\003B" - + "\003\340A\003\0224\n\013expiry_time\030\023 \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\003\022V\n\017expiry_quantity\030\024 " - + "\001(\01328.google.cloud.alloydb.v1alpha.Backu" - + "p.QuantityBasedExpiryB\003\340A\003\022\032\n\rsatisfies_" - + "pzi\030\027 \001(\010B\003\340A\003\022\032\n\rsatisfies_pzs\030\025 \001(\010B\003\340" - + "A\003\022L\n\020database_version\030\026 \001(\0162-.google.cl" - + "oud.alloydb.v1alpha.DatabaseVersionB\003\340A\003" - + "\032W\n\023QuantityBasedExpiry\022\034\n\017retention_cou" - + "nt\030\001 \001(\005B\003\340A\003\022\"\n\025total_retention_count\030\002" - + " \001(\005B\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\0322\n\020AnnotationsEntry\022\013\n\003" - + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"Q\n\005State\022\025\n" - + "\021STATE_UNSPECIFIED\020\000\022\t\n\005READY\020\001\022\014\n\010CREAT" - + "ING\020\002\022\n\n\006FAILED\020\003\022\014\n\010DELETING\020\004\"J\n\004Type\022" - + "\024\n\020TYPE_UNSPECIFIED\020\000\022\r\n\tON_DEMAND\020\001\022\r\n\t" - + "AUTOMATED\020\002\022\016\n\nCONTINUOUS\020\003:_\352A\\\n\035alloyd" - + "b.googleapis.com/Backup\0228projects/{proje" - + "ct}/locations/{location}/backups/{backup" - + "}R\001\001\"\334\006\n\025SupportedDatabaseFlag\022e\n\023string" - + "_restrictions\030\007 \001(\0132F.google.cloud.alloy" - + "db.v1alpha.SupportedDatabaseFlag.StringR" - + "estrictionsH\000\022g\n\024integer_restrictions\030\010 " - + "\001(\0132G.google.cloud.alloydb.v1alpha.Suppo" - + "rtedDatabaseFlag.IntegerRestrictionsH\000\022\014" - + "\n\004name\030\001 \001(\t\022\021\n\tflag_name\030\002 \001(\t\022Q\n\nvalue" - + "_type\030\003 \001(\0162=.google.cloud.alloydb.v1alp" - + "ha.SupportedDatabaseFlag.ValueType\022\037\n\027ac" - + "cepts_multiple_values\030\004 \001(\010\022L\n\025supported" - + "_db_versions\030\005 \003(\0162-.google.cloud.alloyd" - + "b.v1alpha.DatabaseVersion\022\033\n\023requires_db" - + "_restart\030\006 \001(\010\032,\n\022StringRestrictions\022\026\n\016" - + "allowed_values\030\001 \003(\t\032u\n\023IntegerRestricti" - + "ons\022.\n\tmin_value\030\001 \001(\0132\033.google.protobuf" - + ".Int64Value\022.\n\tmax_value\030\002 \001(\0132\033.google." - + "protobuf.Int64Value\"U\n\tValueType\022\032\n\026VALU" - + "E_TYPE_UNSPECIFIED\020\000\022\n\n\006STRING\020\001\022\013\n\007INTE" - + "GER\020\002\022\t\n\005FLOAT\020\003\022\010\n\004NONE\020\004:g\352Ad\n,alloydb" - + ".googleapis.com/SupportedDatabaseFlag\0224p" - + "rojects/{project}/locations/{location}/f" - + "lags/{flag}B\016\n\014restrictions\"\323\002\n\004User\022\021\n\004" - + "name\030\001 \001(\tB\003\340A\003\022\025\n\010password\030\002 \001(\tB\003\340A\004\022\033" - + "\n\016database_roles\030\004 \003(\tB\003\340A\001\022C\n\tuser_type" - + "\030\005 \001(\0162+.google.cloud.alloydb.v1alpha.Us" - + "er.UserTypeB\003\340A\001\"Q\n\010UserType\022\031\n\025USER_TYP" - + "E_UNSPECIFIED\020\000\022\024\n\020ALLOYDB_BUILT_IN\020\001\022\024\n" - + "\020ALLOYDB_IAM_USER\020\002:l\352Ai\n\033alloydb.google" - + "apis.com/User\022Gprojects/{project}/locati" - + "ons/{location}/clusters/{cluster}/users/" - + "{user}R\001\001\"\334\001\n\010Database\022\021\n\004name\030\001 \001(\tB\003\340A" - + "\010\022\024\n\007charset\030\002 \001(\tB\003\340A\001\022\026\n\tcollation\030\003 \001" - + "(\tB\003\340A\001:\216\001\352A\212\001\n\037alloydb.googleapis.com/D" - + "atabase\022Oprojects/{project}/locations/{l" - + "ocation}/clusters/{cluster}/databases/{d" - + "atabase}*\tdatabases2\010databaseR\001\001*^\n\014Inst" - + "anceView\022\035\n\031INSTANCE_VIEW_UNSPECIFIED\020\000\022" - + "\027\n\023INSTANCE_VIEW_BASIC\020\001\022\026\n\022INSTANCE_VIE" - + "W_FULL\020\002*g\n\013ClusterView\022\034\n\030CLUSTER_VIEW_" - + "UNSPECIFIED\020\000\022\026\n\022CLUSTER_VIEW_BASIC\020\001\022\"\n" - + "\036CLUSTER_VIEW_CONTINUOUS_BACKUP\020\002*j\n\017Dat" - + "abaseVersion\022 \n\034DATABASE_VERSION_UNSPECI" - + "FIED\020\000\022\023\n\013POSTGRES_13\020\001\032\002\010\001\022\017\n\013POSTGRES_" - + "14\020\002\022\017\n\013POSTGRES_15\020\003B\313\003\n com.google.clo" - + "ud.alloydb.v1alphaB\016ResourcesProtoP\001Z:cl" - + "oud.google.com/go/alloydb/apiv1alpha/all" - + "oydbpb;alloydbpb\252\002\034Google.Cloud.AlloyDb." - + "V1Alpha\312\002\034Google\\Cloud\\AlloyDb\\V1alpha\352\002" - + "\037Google::Cloud::AlloyDB::V1alpha\352A\246\001\n(cl" - + "oudkms.googleapis.com/CryptoKeyVersion\022z" - + "projects/{project}/locations/{location}/" - + "keyRings/{key_ring}/cryptoKeys/{crypto_k" - + "ey}/cryptoKeyVersions/{crypto_key_versio" - + "n}\352AN\n\036compute.googleapis.com/Network\022,p" - + "rojects/{project}/global/networks/{netwo" - + "rk}b\006proto3" + + "p_address\030\017 \001(\tB\003\340A\003\022\036\n\021public_ip_addres" + + "s\030\033 \001(\tB\003\340A\003\022\030\n\013reconciling\030\020 \001(\010B\003\340A\003\022\014" + + "\n\004etag\030\021 \001(\t\022L\n\013annotations\030\022 \003(\01327.goog" + + "le.cloud.alloydb.v1alpha.Instance.Annota" + + "tionsEntry\022J\n\rupdate_policy\030\026 \001(\01323.goog" + + "le.cloud.alloydb.v1alpha.Instance.Update" + + "Policy\022d\n\030client_connection_config\030\027 \001(\013" + + "2=.google.cloud.alloydb.v1alpha.Instance" + + ".ClientConnectionConfigB\003\340A\001\022\032\n\rsatisfie" + + "s_pzi\030\036 \001(\010B\003\340A\003\022\032\n\rsatisfies_pzs\030\030 \001(\010B" + + "\003\340A\003\022Z\n\023psc_instance_config\030\034 \001(\01328.goog" + + "le.cloud.alloydb.v1alpha.Instance.PscIns" + + "tanceConfigB\003\340A\001\022Y\n\016network_config\030\035 \001(\013" + + "2<.google.cloud.alloydb.v1alpha.Instance" + + ".InstanceNetworkConfigB\003\340A\001\032\"\n\rMachineCo" + + "nfig\022\021\n\tcpu_count\030\001 \001(\005\032>\n\004Node\022\017\n\007zone_" + + "id\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\n\n\002ip\030\003 \001(\t\022\r\n\005stat" + + "e\030\004 \001(\t\032\372\001\n\033QueryInsightsInstanceConfig\022" + + "$\n\027record_application_tags\030\002 \001(\010H\000\210\001\001\022\"\n" + + "\025record_client_address\030\003 \001(\010H\001\210\001\001\022\033\n\023que" + + "ry_string_length\030\004 \001(\r\022#\n\026query_plans_pe" + + "r_minute\030\005 \001(\rH\002\210\001\001B\032\n\030_record_applicati" + + "on_tagsB\030\n\026_record_client_addressB\031\n\027_qu" + + "ery_plans_per_minute\032$\n\016ReadPoolConfig\022\022" + + "\n\nnode_count\030\001 \001(\005\032\222\001\n\014UpdatePolicy\022F\n\004m" + + "ode\030\001 \001(\01628.google.cloud.alloydb.v1alpha" + + ".Instance.UpdatePolicy.Mode\":\n\004Mode\022\024\n\020M" + + "ODE_UNSPECIFIED\020\000\022\013\n\007DEFAULT\020\001\022\017\n\013FORCE_" + + "APPLY\020\002\032{\n\026ClientConnectionConfig\022\037\n\022req" + + "uire_connectors\030\001 \001(\010B\003\340A\001\022@\n\nssl_config" + + "\030\002 \001(\0132\'.google.cloud.alloydb.v1alpha.Ss" + + "lConfigB\003\340A\001\032O\n\022PscInterfaceConfig\022\035\n\025co" + + "nsumer_endpoint_ips\030\001 \003(\t\022\032\n\022network_att" + + "achment\030\002 \001(\t\032\262\002\n\021PscInstanceConfig\022$\n\027s" + + "ervice_attachment_link\030\001 \001(\tB\003\340A\003\022&\n\031all" + + "owed_consumer_projects\030\002 \003(\tB\003\340A\001\022&\n\031all" + + "owed_consumer_networks\030\003 \003(\tB\003\340A\001\022]\n\025psc" + + "_interface_configs\030\004 \003(\01329.google.cloud." + + "alloydb.v1alpha.Instance.PscInterfaceCon" + + "figB\003\340A\001\022.\n!outgoing_service_attachment_" + + "links\030\005 \003(\tB\003\340A\001\022\030\n\013psc_enabled\030\006 \001(\010B\003\340" + + "A\001\032\344\001\n\025InstanceNetworkConfig\022y\n\034authoriz" + + "ed_external_networks\030\001 \003(\0132N.google.clou" + + "d.alloydb.v1alpha.Instance.InstanceNetwo" + + "rkConfig.AuthorizedNetworkB\003\340A\001\022\035\n\020enabl" + + "e_public_ip\030\002 \001(\010B\003\340A\001\0321\n\021AuthorizedNetw" + + "ork\022\034\n\ncidr_range\030\001 \001(\tB\010\342\214\317\327\010\002\010\002\032-\n\013Lab" + + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\0324\n\022DatabaseFlagsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001\0322\n\020AnnotationsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\221\001\n\005State\022\025\n\021" + + "STATE_UNSPECIFIED\020\000\022\t\n\005READY\020\001\022\013\n\007STOPPE" + + "D\020\002\022\014\n\010CREATING\020\003\022\014\n\010DELETING\020\004\022\017\n\013MAINT" + + "ENANCE\020\005\022\n\n\006FAILED\020\006\022\021\n\rBOOTSTRAPPING\020\010\022" + + "\r\n\tPROMOTING\020\t\"X\n\014InstanceType\022\035\n\031INSTAN" + + "CE_TYPE_UNSPECIFIED\020\000\022\013\n\007PRIMARY\020\001\022\r\n\tRE" + + "AD_POOL\020\002\022\r\n\tSECONDARY\020\003\"N\n\020Availability" + + "Type\022!\n\035AVAILABILITY_TYPE_UNSPECIFIED\020\000\022" + + "\t\n\005ZONAL\020\001\022\014\n\010REGIONAL\020\002:x\352Au\n\037alloydb.g" + + "oogleapis.com/Instance\022Oprojects/{projec" + + "t}/locations/{location}/clusters/{cluste" + + "r}/instances/{instance}R\001\001\"\311\002\n\016Connectio" + + "nInfo\022\014\n\004name\030\001 \001(\t\022\027\n\nip_address\030\002 \001(\tB" + + "\003\340A\003\022&\n\021public_ip_address\030\005 \001(\tB\013\340A\003\342\214\317\327" + + "\010\002\010\002\022$\n\025pem_certificate_chain\030\003 \003(\tB\005\030\001\340" + + "A\003\022\031\n\014instance_uid\030\004 \001(\tB\003\340A\003\022\031\n\014psc_dns" + + "_name\030\006 \001(\tB\003\340A\003:\213\001\352A\207\001\n%alloydb.googlea" + + "pis.com/ConnectionInfo\022^projects/{projec" + + "t}/locations/{location}/clusters/{cluste" + + "r}/instances/{instance}/connectionInfo\"\206" + + "\014\n\006Backup\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014display_" + + "name\030\002 \001(\t\022\020\n\003uid\030\003 \001(\tB\003\340A\003\0224\n\013create_t" + + "ime\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\0224\n\013update_time\030\005 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\0224\n\013delete_time\030\017 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\022@\n\006labels" + + "\030\006 \003(\01320.google.cloud.alloydb.v1alpha.Ba" + + "ckup.LabelsEntry\022>\n\005state\030\007 \001(\0162*.google" + + ".cloud.alloydb.v1alpha.Backup.StateB\003\340A\003" + + "\0227\n\004type\030\010 \001(\0162).google.cloud.alloydb.v1" + + "alpha.Backup.Type\022\023\n\013description\030\t \001(\t\022\030" + + "\n\013cluster_uid\030\022 \001(\tB\003\340A\003\022<\n\014cluster_name" + + "\030\n \001(\tB&\340A\002\372A \n\036alloydb.googleapis.com/C" + + "luster\022\030\n\013reconciling\030\013 \001(\010B\003\340A\003\022N\n\021encr" + + "yption_config\030\014 \001(\0132..google.cloud.alloy" + + "db.v1alpha.EncryptionConfigB\003\340A\001\022J\n\017encr" + + "yption_info\030\r \001(\0132,.google.cloud.alloydb" + + ".v1alpha.EncryptionInfoB\003\340A\003\022\014\n\004etag\030\016 \001" + + "(\t\022J\n\013annotations\030\020 \003(\01325.google.cloud.a" + + "lloydb.v1alpha.Backup.AnnotationsEntry\022\027" + + "\n\nsize_bytes\030\021 \001(\003B\003\340A\003\0224\n\013expiry_time\030\023" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022V\n" + + "\017expiry_quantity\030\024 \001(\01328.google.cloud.al" + + "loydb.v1alpha.Backup.QuantityBasedExpiry" + + "B\003\340A\003\022\032\n\rsatisfies_pzi\030\027 \001(\010B\003\340A\003\022\032\n\rsat" + + "isfies_pzs\030\025 \001(\010B\003\340A\003\022L\n\020database_versio" + + "n\030\026 \001(\0162-.google.cloud.alloydb.v1alpha.D" + + "atabaseVersionB\003\340A\003\032W\n\023QuantityBasedExpi" + + "ry\022\034\n\017retention_count\030\001 \001(\005B\003\340A\003\022\"\n\025tota" + + "l_retention_count\030\002 \001(\005B\003\340A\003\032-\n\013LabelsEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020A" + + "nnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001\"Q\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" + + "\t\n\005READY\020\001\022\014\n\010CREATING\020\002\022\n\n\006FAILED\020\003\022\014\n\010" + + "DELETING\020\004\"J\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000" + + "\022\r\n\tON_DEMAND\020\001\022\r\n\tAUTOMATED\020\002\022\016\n\nCONTIN" + + "UOUS\020\003:_\352A\\\n\035alloydb.googleapis.com/Back" + + "up\0228projects/{project}/locations/{locati" + + "on}/backups/{backup}R\001\001\"\334\006\n\025SupportedDat" + + "abaseFlag\022e\n\023string_restrictions\030\007 \001(\0132F" + + ".google.cloud.alloydb.v1alpha.SupportedD" + + "atabaseFlag.StringRestrictionsH\000\022g\n\024inte" + + "ger_restrictions\030\010 \001(\0132G.google.cloud.al" + + "loydb.v1alpha.SupportedDatabaseFlag.Inte" + + "gerRestrictionsH\000\022\014\n\004name\030\001 \001(\t\022\021\n\tflag_" + + "name\030\002 \001(\t\022Q\n\nvalue_type\030\003 \001(\0162=.google." + + "cloud.alloydb.v1alpha.SupportedDatabaseF" + + "lag.ValueType\022\037\n\027accepts_multiple_values" + + "\030\004 \001(\010\022L\n\025supported_db_versions\030\005 \003(\0162-." + + "google.cloud.alloydb.v1alpha.DatabaseVer" + + "sion\022\033\n\023requires_db_restart\030\006 \001(\010\032,\n\022Str" + + "ingRestrictions\022\026\n\016allowed_values\030\001 \003(\t\032" + + "u\n\023IntegerRestrictions\022.\n\tmin_value\030\001 \001(" + + "\0132\033.google.protobuf.Int64Value\022.\n\tmax_va" + + "lue\030\002 \001(\0132\033.google.protobuf.Int64Value\"U" + + "\n\tValueType\022\032\n\026VALUE_TYPE_UNSPECIFIED\020\000\022" + + "\n\n\006STRING\020\001\022\013\n\007INTEGER\020\002\022\t\n\005FLOAT\020\003\022\010\n\004N" + + "ONE\020\004:g\352Ad\n,alloydb.googleapis.com/Suppo" + + "rtedDatabaseFlag\0224projects/{project}/loc" + + "ations/{location}/flags/{flag}B\016\n\014restri" + + "ctions\"\323\002\n\004User\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\025\n\010pa" + + "ssword\030\002 \001(\tB\003\340A\004\022\033\n\016database_roles\030\004 \003(" + + "\tB\003\340A\001\022C\n\tuser_type\030\005 \001(\0162+.google.cloud" + + ".alloydb.v1alpha.User.UserTypeB\003\340A\001\"Q\n\010U" + + "serType\022\031\n\025USER_TYPE_UNSPECIFIED\020\000\022\024\n\020AL" + + "LOYDB_BUILT_IN\020\001\022\024\n\020ALLOYDB_IAM_USER\020\002:l" + + "\352Ai\n\033alloydb.googleapis.com/User\022Gprojec" + + "ts/{project}/locations/{location}/cluste" + + "rs/{cluster}/users/{user}R\001\001\"\334\001\n\010Databas" + + "e\022\021\n\004name\030\001 \001(\tB\003\340A\010\022\024\n\007charset\030\002 \001(\tB\003\340" + + "A\001\022\026\n\tcollation\030\003 \001(\tB\003\340A\001:\216\001\352A\212\001\n\037alloy" + + "db.googleapis.com/Database\022Oprojects/{pr" + + "oject}/locations/{location}/clusters/{cl" + + "uster}/databases/{database}*\tdatabases2\010" + + "databaseR\001\001*^\n\014InstanceView\022\035\n\031INSTANCE_" + + "VIEW_UNSPECIFIED\020\000\022\027\n\023INSTANCE_VIEW_BASI" + + "C\020\001\022\026\n\022INSTANCE_VIEW_FULL\020\002*g\n\013ClusterVi" + + "ew\022\034\n\030CLUSTER_VIEW_UNSPECIFIED\020\000\022\026\n\022CLUS" + + "TER_VIEW_BASIC\020\001\022\"\n\036CLUSTER_VIEW_CONTINU" + + "OUS_BACKUP\020\002*j\n\017DatabaseVersion\022 \n\034DATAB" + + "ASE_VERSION_UNSPECIFIED\020\000\022\023\n\013POSTGRES_13" + + "\020\001\032\002\010\001\022\017\n\013POSTGRES_14\020\002\022\017\n\013POSTGRES_15\020\003" + + "B\313\003\n com.google.cloud.alloydb.v1alphaB\016R" + + "esourcesProtoP\001Z:cloud.google.com/go/all" + + "oydb/apiv1alpha/alloydbpb;alloydbpb\252\002\034Go" + + "ogle.Cloud.AlloyDb.V1Alpha\312\002\034Google\\Clou" + + "d\\AlloyDb\\V1alpha\352\002\037Google::Cloud::Alloy" + + "DB::V1alpha\352A\246\001\n(cloudkms.googleapis.com" + + "/CryptoKeyVersion\022zprojects/{project}/lo" + + "cations/{location}/keyRings/{key_ring}/c" + + "ryptoKeys/{crypto_key}/cryptoKeyVersions" + + "/{crypto_key_version}\352AN\n\036compute.google" + + "apis.com/Network\022,projects/{project}/glo" + + "bal/networks/{network}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.protobuf.WrappersProto.getDescriptor(), com.google.type.DayOfWeekProto.getDescriptor(), com.google.type.TimeOfDayProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.FieldInfoProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), }); internal_static_google_cloud_alloydb_v1alpha_UserPassword_descriptor = getDescriptor().getMessageTypes().get(0); @@ -791,6 +792,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "QueryInsightsConfig", "ReadPoolConfig", "IpAddress", + "PublicIpAddress", "Reconciling", "Etag", "Annotations", @@ -921,7 +923,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_alloydb_v1alpha_ConnectionInfo_descriptor, new java.lang.String[] { - "Name", "IpAddress", "PublicIpAddress", "PemCertificateChain", "InstanceUid", + "Name", + "IpAddress", + "PublicIpAddress", + "PemCertificateChain", + "InstanceUid", + "PscDnsName", }); internal_static_google_cloud_alloydb_v1alpha_Backup_descriptor = getDescriptor().getMessageTypes().get(13); @@ -1038,14 +1045,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.WrappersProto.getDescriptor(); com.google.type.DayOfWeekProto.getDescriptor(); com.google.type.TimeOfDayProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.FieldInfoProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/proto/google/cloud/alloydb/v1alpha/resources.proto b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/proto/google/cloud/alloydb/v1alpha/resources.proto index eb213a55c215..c3b347765258 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/proto/google/cloud/alloydb/v1alpha/resources.proto +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/proto/google/cloud/alloydb/v1alpha/resources.proto @@ -16,14 +16,14 @@ syntax = "proto3"; package google.cloud.alloydb.v1alpha; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/type/dayofweek.proto"; import "google/type/timeofday.proto"; -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; -import "google/api/resource.proto"; option csharp_namespace = "Google.Cloud.AlloyDb.V1Alpha"; option go_package = "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb;alloydbpb"; @@ -956,6 +956,11 @@ message Instance { // This is the connection endpoint for an end-user application. string ip_address = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The public IP addresses for the Instance. This is available + // ONLY when enable_public_ip is set. This is the connection endpoint for an + // end-user application. + string public_ip_address = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Reconciling (https://google.aip.dev/128#reconciliation). // Set to true if the current state of Instance does not match the user's // intended state, and the service is actively updating the resource to @@ -1030,6 +1035,9 @@ message ConnectionInfo { // Output only. The unique ID of the Instance. string instance_uid = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The DNS name to use with PSC for the Instance. + string psc_dns_name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Message describing Backup object diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Backup.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Backup.java index 7a6209928b36..ed6b95961768 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Backup.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Backup.java @@ -2255,6 +2255,24 @@ public com.google.cloud.alloydb.v1beta.Backup.QuantityBasedExpiry getExpiryQuant : expiryQuantity_; } + public static final int SATISFIES_PZS_FIELD_NUMBER = 21; + private boolean satisfiesPzs_ = false; + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzs = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + public static final int DATABASE_VERSION_FIELD_NUMBER = 22; private int databaseVersion_ = 0; /** @@ -2370,6 +2388,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { output.writeMessage(20, getExpiryQuantity()); } + if (satisfiesPzs_ != false) { + output.writeBool(21, satisfiesPzs_); + } if (databaseVersion_ != com.google.cloud.alloydb.v1beta.DatabaseVersion.DATABASE_VERSION_UNSPECIFIED .getNumber()) { @@ -2458,6 +2479,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getExpiryQuantity()); } + if (satisfiesPzs_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(21, satisfiesPzs_); + } if (databaseVersion_ != com.google.cloud.alloydb.v1beta.DatabaseVersion.DATABASE_VERSION_UNSPECIFIED .getNumber()) { @@ -2519,6 +2543,7 @@ public boolean equals(final java.lang.Object obj) { if (hasExpiryQuantity()) { if (!getExpiryQuantity().equals(other.getExpiryQuantity())) return false; } + if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; if (databaseVersion_ != other.databaseVersion_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -2589,6 +2614,8 @@ public int hashCode() { hash = (37 * hash) + EXPIRY_QUANTITY_FIELD_NUMBER; hash = (53 * hash) + getExpiryQuantity().hashCode(); } + hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); hash = (37 * hash) + DATABASE_VERSION_FIELD_NUMBER; hash = (53 * hash) + databaseVersion_; hash = (29 * hash) + getUnknownFields().hashCode(); @@ -2819,6 +2846,7 @@ public Builder clear() { expiryQuantityBuilder_.dispose(); expiryQuantityBuilder_ = null; } + satisfiesPzs_ = false; databaseVersion_ = 0; return this; } @@ -2930,6 +2958,9 @@ private void buildPartial0(com.google.cloud.alloydb.v1beta.Backup result) { to_bitField0_ |= 0x00000040; } if (((from_bitField0_ & 0x00100000) != 0)) { + result.satisfiesPzs_ = satisfiesPzs_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { result.databaseVersion_ = databaseVersion_; } result.bitField0_ |= to_bitField0_; @@ -3052,6 +3083,9 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1beta.Backup other) { if (other.hasExpiryQuantity()) { mergeExpiryQuantity(other.getExpiryQuantity()); } + if (other.getSatisfiesPzs() != false) { + setSatisfiesPzs(other.getSatisfiesPzs()); + } if (other.databaseVersion_ != 0) { setDatabaseVersionValue(other.getDatabaseVersionValue()); } @@ -3214,10 +3248,16 @@ public Builder mergeFrom( bitField0_ |= 0x00080000; break; } // case 162 + case 168: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x00100000; + break; + } // case 168 case 176: { databaseVersion_ = input.readEnum(); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; break; } // case 176 default: @@ -6190,6 +6230,59 @@ public Builder clearExpiryQuantity() { return expiryQuantityBuilder_; } + private boolean satisfiesPzs_; + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzs = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzs = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzs to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzs(boolean value) { + + satisfiesPzs_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzs = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzs() { + bitField0_ = (bitField0_ & ~0x00100000); + satisfiesPzs_ = false; + onChanged(); + return this; + } + private int databaseVersion_ = 0; /** * @@ -6228,7 +6321,7 @@ public int getDatabaseVersionValue() { */ public Builder setDatabaseVersionValue(int value) { databaseVersion_ = value; - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -6273,7 +6366,7 @@ public Builder setDatabaseVersion(com.google.cloud.alloydb.v1beta.DatabaseVersio if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; databaseVersion_ = value.getNumber(); onChanged(); return this; @@ -6294,7 +6387,7 @@ public Builder setDatabaseVersion(com.google.cloud.alloydb.v1beta.DatabaseVersio * @return This builder for chaining. */ public Builder clearDatabaseVersion() { - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); databaseVersion_ = 0; onChanged(); return this; diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/BackupOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/BackupOrBuilder.java index a8a933cffe6a..9eea5133d605 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/BackupOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/BackupOrBuilder.java @@ -730,6 +730,19 @@ java.lang.String getAnnotationsOrDefault( */ com.google.cloud.alloydb.v1beta.Backup.QuantityBasedExpiryOrBuilder getExpiryQuantityOrBuilder(); + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzs = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + boolean getSatisfiesPzs(); + /** * * diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Cluster.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Cluster.java index 033ec0e78397..c63fc5c962f7 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Cluster.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Cluster.java @@ -581,7 +581,7 @@ public interface NetworkConfigOrBuilder * * *
-     * Required. The resource link for the VPC network in which cluster
+     * Optional. The resource link for the VPC network in which cluster
      * resources are created and from which they are accessible via Private IP.
      * The network must belong to the same project as the cluster. It is
      * specified in the form:
@@ -590,7 +590,7 @@ public interface NetworkConfigOrBuilder
      * 
* * - * string network = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string network = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The network. @@ -600,7 +600,7 @@ public interface NetworkConfigOrBuilder * * *
-     * Required. The resource link for the VPC network in which cluster
+     * Optional. The resource link for the VPC network in which cluster
      * resources are created and from which they are accessible via Private IP.
      * The network must belong to the same project as the cluster. It is
      * specified in the form:
@@ -609,7 +609,7 @@ public interface NetworkConfigOrBuilder
      * 
* * - * string network = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string network = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The bytes for network. @@ -625,8 +625,8 @@ public interface NetworkConfigOrBuilder * instance IPs for this cluster will be created in the allocated range. The * range name must comply with RFC 1035. Specifically, the name must be 1-63 * characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Field name is intended to be consistent with CloudSQL. + * `[a-z]([-a-z0-9]*[a-z0-9])?`. + * Field name is intended to be consistent with Cloud SQL. * * * string allocated_ip_range = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -643,8 +643,8 @@ public interface NetworkConfigOrBuilder * instance IPs for this cluster will be created in the allocated range. The * range name must comply with RFC 1035. Specifically, the name must be 1-63 * characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Field name is intended to be consistent with CloudSQL. + * `[a-z]([-a-z0-9]*[a-z0-9])?`. + * Field name is intended to be consistent with Cloud SQL. * * * string allocated_ip_range = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -706,7 +706,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * Required. The resource link for the VPC network in which cluster
+     * Optional. The resource link for the VPC network in which cluster
      * resources are created and from which they are accessible via Private IP.
      * The network must belong to the same project as the cluster. It is
      * specified in the form:
@@ -715,7 +715,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      * 
* * - * string network = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string network = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The network. @@ -736,7 +736,7 @@ public java.lang.String getNetwork() { * * *
-     * Required. The resource link for the VPC network in which cluster
+     * Optional. The resource link for the VPC network in which cluster
      * resources are created and from which they are accessible via Private IP.
      * The network must belong to the same project as the cluster. It is
      * specified in the form:
@@ -745,7 +745,7 @@ public java.lang.String getNetwork() {
      * 
* * - * string network = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string network = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The bytes for network. @@ -776,8 +776,8 @@ public com.google.protobuf.ByteString getNetworkBytes() { * instance IPs for this cluster will be created in the allocated range. The * range name must comply with RFC 1035. Specifically, the name must be 1-63 * characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Field name is intended to be consistent with CloudSQL. + * `[a-z]([-a-z0-9]*[a-z0-9])?`. + * Field name is intended to be consistent with Cloud SQL. * * * string allocated_ip_range = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -805,8 +805,8 @@ public java.lang.String getAllocatedIpRange() { * instance IPs for this cluster will be created in the allocated range. The * range name must comply with RFC 1035. Specifically, the name must be 1-63 * characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Field name is intended to be consistent with CloudSQL. + * `[a-z]([-a-z0-9]*[a-z0-9])?`. + * Field name is intended to be consistent with Cloud SQL. * * * string allocated_ip_range = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1202,7 +1202,7 @@ public Builder mergeFrom( * * *
-       * Required. The resource link for the VPC network in which cluster
+       * Optional. The resource link for the VPC network in which cluster
        * resources are created and from which they are accessible via Private IP.
        * The network must belong to the same project as the cluster. It is
        * specified in the form:
@@ -1211,7 +1211,7 @@ public Builder mergeFrom(
        * 
* * - * string network = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string network = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The network. @@ -1231,7 +1231,7 @@ public java.lang.String getNetwork() { * * *
-       * Required. The resource link for the VPC network in which cluster
+       * Optional. The resource link for the VPC network in which cluster
        * resources are created and from which they are accessible via Private IP.
        * The network must belong to the same project as the cluster. It is
        * specified in the form:
@@ -1240,7 +1240,7 @@ public java.lang.String getNetwork() {
        * 
* * - * string network = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string network = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The bytes for network. @@ -1260,7 +1260,7 @@ public com.google.protobuf.ByteString getNetworkBytes() { * * *
-       * Required. The resource link for the VPC network in which cluster
+       * Optional. The resource link for the VPC network in which cluster
        * resources are created and from which they are accessible via Private IP.
        * The network must belong to the same project as the cluster. It is
        * specified in the form:
@@ -1269,7 +1269,7 @@ public com.google.protobuf.ByteString getNetworkBytes() {
        * 
* * - * string network = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string network = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param value The network to set. @@ -1288,7 +1288,7 @@ public Builder setNetwork(java.lang.String value) { * * *
-       * Required. The resource link for the VPC network in which cluster
+       * Optional. The resource link for the VPC network in which cluster
        * resources are created and from which they are accessible via Private IP.
        * The network must belong to the same project as the cluster. It is
        * specified in the form:
@@ -1297,7 +1297,7 @@ public Builder setNetwork(java.lang.String value) {
        * 
* * - * string network = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string network = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return This builder for chaining. @@ -1312,7 +1312,7 @@ public Builder clearNetwork() { * * *
-       * Required. The resource link for the VPC network in which cluster
+       * Optional. The resource link for the VPC network in which cluster
        * resources are created and from which they are accessible via Private IP.
        * The network must belong to the same project as the cluster. It is
        * specified in the form:
@@ -1321,7 +1321,7 @@ public Builder clearNetwork() {
        * 
* * - * string network = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string network = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param value The bytes for network to set. @@ -1348,8 +1348,8 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { * instance IPs for this cluster will be created in the allocated range. The * range name must comply with RFC 1035. Specifically, the name must be 1-63 * characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Field name is intended to be consistent with CloudSQL. + * `[a-z]([-a-z0-9]*[a-z0-9])?`. + * Field name is intended to be consistent with Cloud SQL. * * * string allocated_ip_range = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1376,8 +1376,8 @@ public java.lang.String getAllocatedIpRange() { * instance IPs for this cluster will be created in the allocated range. The * range name must comply with RFC 1035. Specifically, the name must be 1-63 * characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Field name is intended to be consistent with CloudSQL. + * `[a-z]([-a-z0-9]*[a-z0-9])?`. + * Field name is intended to be consistent with Cloud SQL. * * * string allocated_ip_range = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1404,8 +1404,8 @@ public com.google.protobuf.ByteString getAllocatedIpRangeBytes() { * instance IPs for this cluster will be created in the allocated range. The * range name must comply with RFC 1035. Specifically, the name must be 1-63 * characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Field name is intended to be consistent with CloudSQL. + * `[a-z]([-a-z0-9]*[a-z0-9])?`. + * Field name is intended to be consistent with Cloud SQL. * * * string allocated_ip_range = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1431,8 +1431,8 @@ public Builder setAllocatedIpRange(java.lang.String value) { * instance IPs for this cluster will be created in the allocated range. The * range name must comply with RFC 1035. Specifically, the name must be 1-63 * characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Field name is intended to be consistent with CloudSQL. + * `[a-z]([-a-z0-9]*[a-z0-9])?`. + * Field name is intended to be consistent with Cloud SQL. * * * string allocated_ip_range = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1454,8 +1454,8 @@ public Builder clearAllocatedIpRange() { * instance IPs for this cluster will be created in the allocated range. The * range name must comply with RFC 1035. Specifically, the name must be 1-63 * characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Field name is intended to be consistent with CloudSQL. + * `[a-z]([-a-z0-9]*[a-z0-9])?`. + * Field name is intended to be consistent with Cloud SQL. * * * string allocated_ip_range = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -3780,7 +3780,7 @@ public com.google.cloud.alloydb.v1beta.Cluster.NetworkConfig getNetworkConfig() * * * @deprecated google.cloud.alloydb.v1beta.Cluster.network is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=546 + * google/cloud/alloydb/v1beta/resources.proto;l=547 * @return The network. */ @java.lang.Override @@ -3812,7 +3812,7 @@ public java.lang.String getNetwork() { * * * @deprecated google.cloud.alloydb.v1beta.Cluster.network is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=546 + * google/cloud/alloydb/v1beta/resources.proto;l=547 * @return The bytes for network. */ @java.lang.Override @@ -4153,7 +4153,7 @@ public com.google.cloud.alloydb.v1beta.AutomatedBackupPolicy getAutomatedBackupP * .google.cloud.alloydb.v1beta.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1beta.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=581 + * google/cloud/alloydb/v1beta/resources.proto;l=582 * @return Whether the sslConfig field is set. */ @java.lang.Override @@ -4171,7 +4171,7 @@ public boolean hasSslConfig() { * .google.cloud.alloydb.v1beta.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1beta.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=581 + * google/cloud/alloydb/v1beta/resources.proto;l=582 * @return The sslConfig. */ @java.lang.Override @@ -4544,6 +4544,24 @@ public com.google.cloud.alloydb.v1beta.Cluster.PrimaryConfig getPrimaryConfig() : primaryConfig_; } + public static final int SATISFIES_PZS_FIELD_NUMBER = 30; + private boolean satisfiesPzs_ = false; + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzs = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4638,6 +4656,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(29, getNetworkConfig()); } + if (satisfiesPzs_ != false) { + output.writeBool(30, satisfiesPzs_); + } getUnknownFields().writeTo(output); } @@ -4750,6 +4771,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, getNetworkConfig()); } + if (satisfiesPzs_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(30, satisfiesPzs_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4828,6 +4852,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPrimaryConfig()) { if (!getPrimaryConfig().equals(other.getPrimaryConfig())) return false; } + if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 15: @@ -4928,6 +4953,8 @@ public int hashCode() { hash = (37 * hash) + PRIMARY_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getPrimaryConfig().hashCode(); } + hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); switch (sourceCase_) { case 15: hash = (37 * hash) + BACKUP_SOURCE_FIELD_NUMBER; @@ -5210,6 +5237,7 @@ public Builder clear() { primaryConfigBuilder_.dispose(); primaryConfigBuilder_ = null; } + satisfiesPzs_ = false; sourceCase_ = 0; source_ = null; return this; @@ -5352,6 +5380,9 @@ private void buildPartial0(com.google.cloud.alloydb.v1beta.Cluster result) { primaryConfigBuilder_ == null ? primaryConfig_ : primaryConfigBuilder_.build(); to_bitField0_ |= 0x00001000; } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.satisfiesPzs_ = satisfiesPzs_; + } result.bitField0_ |= to_bitField0_; } @@ -5491,6 +5522,9 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1beta.Cluster other) { if (other.hasPrimaryConfig()) { mergePrimaryConfig(other.getPrimaryConfig()); } + if (other.getSatisfiesPzs() != false) { + setSatisfiesPzs(other.getSatisfiesPzs()); + } switch (other.getSourceCase()) { case BACKUP_SOURCE: { @@ -5705,6 +5739,12 @@ public Builder mergeFrom( bitField0_ |= 0x00001000; break; } // case 234 + case 240: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x04000000; + break; + } // case 240 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -7813,7 +7853,7 @@ public com.google.cloud.alloydb.v1beta.Cluster.NetworkConfig.Builder getNetworkC * * * @deprecated google.cloud.alloydb.v1beta.Cluster.network is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=546 + * google/cloud/alloydb/v1beta/resources.proto;l=547 * @return The network. */ @java.lang.Deprecated @@ -7844,7 +7884,7 @@ public java.lang.String getNetwork() { * * * @deprecated google.cloud.alloydb.v1beta.Cluster.network is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=546 + * google/cloud/alloydb/v1beta/resources.proto;l=547 * @return The bytes for network. */ @java.lang.Deprecated @@ -7875,7 +7915,7 @@ public com.google.protobuf.ByteString getNetworkBytes() { * * * @deprecated google.cloud.alloydb.v1beta.Cluster.network is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=546 + * google/cloud/alloydb/v1beta/resources.proto;l=547 * @param value The network to set. * @return This builder for chaining. */ @@ -7905,7 +7945,7 @@ public Builder setNetwork(java.lang.String value) { * * * @deprecated google.cloud.alloydb.v1beta.Cluster.network is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=546 + * google/cloud/alloydb/v1beta/resources.proto;l=547 * @return This builder for chaining. */ @java.lang.Deprecated @@ -7931,7 +7971,7 @@ public Builder clearNetwork() { * * * @deprecated google.cloud.alloydb.v1beta.Cluster.network is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=546 + * google/cloud/alloydb/v1beta/resources.proto;l=547 * @param value The bytes for network to set. * @return This builder for chaining. */ @@ -8772,7 +8812,7 @@ public Builder clearAutomatedBackupPolicy() { * .google.cloud.alloydb.v1beta.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1beta.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=581 + * google/cloud/alloydb/v1beta/resources.proto;l=582 * @return Whether the sslConfig field is set. */ @java.lang.Deprecated @@ -8789,7 +8829,7 @@ public boolean hasSslConfig() { * .google.cloud.alloydb.v1beta.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1beta.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=581 + * google/cloud/alloydb/v1beta/resources.proto;l=582 * @return The sslConfig. */ @java.lang.Deprecated @@ -10215,6 +10255,59 @@ public com.google.cloud.alloydb.v1beta.Cluster.PrimaryConfig.Builder getPrimaryC return primaryConfigBuilder_; } + private boolean satisfiesPzs_; + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzs = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzs = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzs to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzs(boolean value) { + + satisfiesPzs_ = value; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzs = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzs() { + bitField0_ = (bitField0_ & ~0x04000000); + satisfiesPzs_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ClusterOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ClusterOrBuilder.java index 0892764f58d9..591d8757c967 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ClusterOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ClusterOrBuilder.java @@ -503,7 +503,7 @@ java.lang.String getLabelsOrDefault( * * * @deprecated google.cloud.alloydb.v1beta.Cluster.network is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=546 + * google/cloud/alloydb/v1beta/resources.proto;l=547 * @return The network. */ @java.lang.Deprecated @@ -524,7 +524,7 @@ java.lang.String getLabelsOrDefault( * * * @deprecated google.cloud.alloydb.v1beta.Cluster.network is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=546 + * google/cloud/alloydb/v1beta/resources.proto;l=547 * @return The bytes for network. */ @java.lang.Deprecated @@ -748,7 +748,7 @@ java.lang.String getAnnotationsOrDefault( * .google.cloud.alloydb.v1beta.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1beta.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=581 + * google/cloud/alloydb/v1beta/resources.proto;l=582 * @return Whether the sslConfig field is set. */ @java.lang.Deprecated @@ -763,7 +763,7 @@ java.lang.String getAnnotationsOrDefault( * .google.cloud.alloydb.v1beta.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1beta.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=581 + * google/cloud/alloydb/v1beta/resources.proto;l=582 * @return The sslConfig. */ @java.lang.Deprecated @@ -1033,5 +1033,18 @@ java.lang.String getAnnotationsOrDefault( */ com.google.cloud.alloydb.v1beta.Cluster.PrimaryConfigOrBuilder getPrimaryConfigOrBuilder(); + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzs = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + boolean getSatisfiesPzs(); + com.google.cloud.alloydb.v1beta.Cluster.SourceCase getSourceCase(); } diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ConnectionInfo.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ConnectionInfo.java index 1bed0003d536..331ed31de8e0 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ConnectionInfo.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ConnectionInfo.java @@ -42,8 +42,10 @@ private ConnectionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder private ConnectionInfo() { name_ = ""; ipAddress_ = ""; + publicIpAddress_ = ""; pemCertificateChain_ = com.google.protobuf.LazyStringArrayList.emptyList(); instanceUid_ = ""; + pscDnsName_ = ""; } @java.lang.Override @@ -177,6 +179,65 @@ public com.google.protobuf.ByteString getIpAddressBytes() { } } + public static final int PUBLIC_IP_ADDRESS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object publicIpAddress_ = ""; + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * + * string public_ip_address = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The publicIpAddress. + */ + @java.lang.Override + public java.lang.String getPublicIpAddress() { + java.lang.Object ref = publicIpAddress_; + 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(); + publicIpAddress_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * + * string public_ip_address = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for publicIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublicIpAddressBytes() { + java.lang.Object ref = publicIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int PEM_CERTIFICATE_CHAIN_FIELD_NUMBER = 3; @SuppressWarnings("serial") @@ -195,7 +256,7 @@ public com.google.protobuf.ByteString getIpAddressBytes() { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=912 + * google/cloud/alloydb/v1beta/resources.proto;l=1015 * @return A list containing the pemCertificateChain. */ @java.lang.Deprecated @@ -215,7 +276,7 @@ public com.google.protobuf.ProtocolStringList getPemCertificateChainList() { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=912 + * google/cloud/alloydb/v1beta/resources.proto;l=1015 * @return The count of pemCertificateChain. */ @java.lang.Deprecated @@ -235,7 +296,7 @@ public int getPemCertificateChainCount() { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=912 + * google/cloud/alloydb/v1beta/resources.proto;l=1015 * @param index The index of the element to return. * @return The pemCertificateChain at the given index. */ @@ -256,7 +317,7 @@ public java.lang.String getPemCertificateChain(int index) { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=912 + * google/cloud/alloydb/v1beta/resources.proto;l=1015 * @param index The index of the value to return. * @return The bytes of the pemCertificateChain at the given index. */ @@ -316,6 +377,57 @@ public com.google.protobuf.ByteString getInstanceUidBytes() { } } + public static final int PSC_DNS_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object pscDnsName_ = ""; + /** + * + * + *
+   * Output only. The DNS name to use with PSC for the Instance.
+   * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscDnsName. + */ + @java.lang.Override + public java.lang.String getPscDnsName() { + java.lang.Object ref = pscDnsName_; + 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(); + pscDnsName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The DNS name to use with PSC for the Instance.
+   * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscDnsName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPscDnsNameBytes() { + java.lang.Object ref = pscDnsName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pscDnsName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -342,6 +454,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceUid_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, instanceUid_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIpAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, publicIpAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pscDnsName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pscDnsName_); + } getUnknownFields().writeTo(output); } @@ -368,6 +486,12 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceUid_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, instanceUid_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIpAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, publicIpAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pscDnsName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pscDnsName_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -386,8 +510,10 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getIpAddress().equals(other.getIpAddress())) return false; + if (!getPublicIpAddress().equals(other.getPublicIpAddress())) return false; if (!getPemCertificateChainList().equals(other.getPemCertificateChainList())) return false; if (!getInstanceUid().equals(other.getInstanceUid())) return false; + if (!getPscDnsName().equals(other.getPscDnsName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -403,12 +529,16 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PUBLIC_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getPublicIpAddress().hashCode(); if (getPemCertificateChainCount() > 0) { hash = (37 * hash) + PEM_CERTIFICATE_CHAIN_FIELD_NUMBER; hash = (53 * hash) + getPemCertificateChainList().hashCode(); } hash = (37 * hash) + INSTANCE_UID_FIELD_NUMBER; hash = (53 * hash) + getInstanceUid().hashCode(); + hash = (37 * hash) + PSC_DNS_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPscDnsName().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -551,8 +681,10 @@ public Builder clear() { bitField0_ = 0; name_ = ""; ipAddress_ = ""; + publicIpAddress_ = ""; pemCertificateChain_ = com.google.protobuf.LazyStringArrayList.emptyList(); instanceUid_ = ""; + pscDnsName_ = ""; return this; } @@ -596,12 +728,18 @@ private void buildPartial0(com.google.cloud.alloydb.v1beta.ConnectionInfo result result.ipAddress_ = ipAddress_; } if (((from_bitField0_ & 0x00000004) != 0)) { + result.publicIpAddress_ = publicIpAddress_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { pemCertificateChain_.makeImmutable(); result.pemCertificateChain_ = pemCertificateChain_; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.instanceUid_ = instanceUid_; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pscDnsName_ = pscDnsName_; + } } @java.lang.Override @@ -659,10 +797,15 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1beta.ConnectionInfo other) { bitField0_ |= 0x00000002; onChanged(); } + if (!other.getPublicIpAddress().isEmpty()) { + publicIpAddress_ = other.publicIpAddress_; + bitField0_ |= 0x00000004; + onChanged(); + } if (!other.pemCertificateChain_.isEmpty()) { if (pemCertificateChain_.isEmpty()) { pemCertificateChain_ = other.pemCertificateChain_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } else { ensurePemCertificateChainIsMutable(); pemCertificateChain_.addAll(other.pemCertificateChain_); @@ -671,7 +814,12 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1beta.ConnectionInfo other) { } if (!other.getInstanceUid().isEmpty()) { instanceUid_ = other.instanceUid_; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getPscDnsName().isEmpty()) { + pscDnsName_ = other.pscDnsName_; + bitField0_ |= 0x00000020; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -722,9 +870,21 @@ public Builder mergeFrom( case 34: { instanceUid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 34 + case 42: + { + publicIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 50: + { + pscDnsName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -976,6 +1136,132 @@ public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object publicIpAddress_ = ""; + /** + * + * + *
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
+     * 
+ * + * + * string public_ip_address = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The publicIpAddress. + */ + public java.lang.String getPublicIpAddress() { + java.lang.Object ref = publicIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
+     * 
+ * + * + * string public_ip_address = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for publicIpAddress. + */ + public com.google.protobuf.ByteString getPublicIpAddressBytes() { + java.lang.Object ref = publicIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
+     * 
+ * + * + * string public_ip_address = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The publicIpAddress to set. + * @return This builder for chaining. + */ + public Builder setPublicIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + publicIpAddress_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
+     * 
+ * + * + * string public_ip_address = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPublicIpAddress() { + publicIpAddress_ = getDefaultInstance().getPublicIpAddress(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
+     * 
+ * + * + * string public_ip_address = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for publicIpAddress to set. + * @return This builder for chaining. + */ + public Builder setPublicIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + publicIpAddress_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + private com.google.protobuf.LazyStringArrayList pemCertificateChain_ = com.google.protobuf.LazyStringArrayList.emptyList(); @@ -983,7 +1269,7 @@ private void ensurePemCertificateChainIsMutable() { if (!pemCertificateChain_.isModifiable()) { pemCertificateChain_ = new com.google.protobuf.LazyStringArrayList(pemCertificateChain_); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } /** * @@ -998,7 +1284,7 @@ private void ensurePemCertificateChainIsMutable() { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1beta/resources.proto;l=912 + * See google/cloud/alloydb/v1beta/resources.proto;l=1015 * @return A list containing the pemCertificateChain. */ @java.lang.Deprecated @@ -1019,7 +1305,7 @@ public com.google.protobuf.ProtocolStringList getPemCertificateChainList() { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1beta/resources.proto;l=912 + * See google/cloud/alloydb/v1beta/resources.proto;l=1015 * @return The count of pemCertificateChain. */ @java.lang.Deprecated @@ -1039,7 +1325,7 @@ public int getPemCertificateChainCount() { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1beta/resources.proto;l=912 + * See google/cloud/alloydb/v1beta/resources.proto;l=1015 * @param index The index of the element to return. * @return The pemCertificateChain at the given index. */ @@ -1060,7 +1346,7 @@ public java.lang.String getPemCertificateChain(int index) { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1beta/resources.proto;l=912 + * See google/cloud/alloydb/v1beta/resources.proto;l=1015 * @param index The index of the value to return. * @return The bytes of the pemCertificateChain at the given index. */ @@ -1081,7 +1367,7 @@ public com.google.protobuf.ByteString getPemCertificateChainBytes(int index) { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1beta/resources.proto;l=912 + * See google/cloud/alloydb/v1beta/resources.proto;l=1015 * @param index The index to set the value at. * @param value The pemCertificateChain to set. * @return This builder for chaining. @@ -1093,7 +1379,7 @@ public Builder setPemCertificateChain(int index, java.lang.String value) { } ensurePemCertificateChainIsMutable(); pemCertificateChain_.set(index, value); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1110,7 +1396,7 @@ public Builder setPemCertificateChain(int index, java.lang.String value) { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1beta/resources.proto;l=912 + * See google/cloud/alloydb/v1beta/resources.proto;l=1015 * @param value The pemCertificateChain to add. * @return This builder for chaining. */ @@ -1121,7 +1407,7 @@ public Builder addPemCertificateChain(java.lang.String value) { } ensurePemCertificateChainIsMutable(); pemCertificateChain_.add(value); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1138,7 +1424,7 @@ public Builder addPemCertificateChain(java.lang.String value) { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1beta/resources.proto;l=912 + * See google/cloud/alloydb/v1beta/resources.proto;l=1015 * @param values The pemCertificateChain to add. * @return This builder for chaining. */ @@ -1146,7 +1432,7 @@ public Builder addPemCertificateChain(java.lang.String value) { public Builder addAllPemCertificateChain(java.lang.Iterable values) { ensurePemCertificateChainIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pemCertificateChain_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1163,13 +1449,13 @@ public Builder addAllPemCertificateChain(java.lang.Iterable va * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1beta/resources.proto;l=912 + * See google/cloud/alloydb/v1beta/resources.proto;l=1015 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearPemCertificateChain() { pemCertificateChain_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); ; onChanged(); return this; @@ -1187,7 +1473,7 @@ public Builder clearPemCertificateChain() { * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1beta/resources.proto;l=912 + * See google/cloud/alloydb/v1beta/resources.proto;l=1015 * @param value The bytes of the pemCertificateChain to add. * @return This builder for chaining. */ @@ -1199,7 +1485,7 @@ public Builder addPemCertificateChainBytes(com.google.protobuf.ByteString value) checkByteStringIsUtf8(value); ensurePemCertificateChainIsMutable(); pemCertificateChain_.add(value); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1266,7 +1552,7 @@ public Builder setInstanceUid(java.lang.String value) { throw new NullPointerException(); } instanceUid_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1283,7 +1569,7 @@ public Builder setInstanceUid(java.lang.String value) { */ public Builder clearInstanceUid() { instanceUid_ = getDefaultInstance().getInstanceUid(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -1305,7 +1591,113 @@ public Builder setInstanceUidBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); instanceUid_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object pscDnsName_ = ""; + /** + * + * + *
+     * Output only. The DNS name to use with PSC for the Instance.
+     * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscDnsName. + */ + public java.lang.String getPscDnsName() { + java.lang.Object ref = pscDnsName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pscDnsName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The DNS name to use with PSC for the Instance.
+     * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscDnsName. + */ + public com.google.protobuf.ByteString getPscDnsNameBytes() { + java.lang.Object ref = pscDnsName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pscDnsName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The DNS name to use with PSC for the Instance.
+     * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pscDnsName to set. + * @return This builder for chaining. + */ + public Builder setPscDnsName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pscDnsName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The DNS name to use with PSC for the Instance.
+     * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPscDnsName() { + pscDnsName_ = getDefaultInstance().getPscDnsName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The DNS name to use with PSC for the Instance.
+     * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pscDnsName to set. + * @return This builder for chaining. + */ + public Builder setPscDnsNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pscDnsName_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ConnectionInfoOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ConnectionInfoOrBuilder.java index 20be7db3c788..f1968c8ee273 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ConnectionInfoOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ConnectionInfoOrBuilder.java @@ -82,6 +82,39 @@ public interface ConnectionInfoOrBuilder */ com.google.protobuf.ByteString getIpAddressBytes(); + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * + * string public_ip_address = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The publicIpAddress. + */ + java.lang.String getPublicIpAddress(); + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * + * string public_ip_address = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for publicIpAddress. + */ + com.google.protobuf.ByteString getPublicIpAddressBytes(); + /** * * @@ -95,7 +128,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=912 + * google/cloud/alloydb/v1beta/resources.proto;l=1015 * @return A list containing the pemCertificateChain. */ @java.lang.Deprecated @@ -113,7 +146,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=912 + * google/cloud/alloydb/v1beta/resources.proto;l=1015 * @return The count of pemCertificateChain. */ @java.lang.Deprecated @@ -131,7 +164,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=912 + * google/cloud/alloydb/v1beta/resources.proto;l=1015 * @param index The index of the element to return. * @return The pemCertificateChain at the given index. */ @@ -150,7 +183,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1beta.ConnectionInfo.pem_certificate_chain is deprecated. See - * google/cloud/alloydb/v1beta/resources.proto;l=912 + * google/cloud/alloydb/v1beta/resources.proto;l=1015 * @param index The index of the value to return. * @return The bytes of the pemCertificateChain at the given index. */ @@ -181,4 +214,29 @@ public interface ConnectionInfoOrBuilder * @return The bytes for instanceUid. */ com.google.protobuf.ByteString getInstanceUidBytes(); + + /** + * + * + *
+   * Output only. The DNS name to use with PSC for the Instance.
+   * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscDnsName. + */ + java.lang.String getPscDnsName(); + /** + * + * + *
+   * Output only. The DNS name to use with PSC for the Instance.
+   * 
+ * + * string psc_dns_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscDnsName. + */ + com.google.protobuf.ByteString getPscDnsNameBytes(); } diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Database.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Database.java new file mode 100644 index 000000000000..864010b3ab0c --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Database.java @@ -0,0 +1,1022 @@ +/* + * Copyright 2024 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/alloydb/v1beta/resources.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.alloydb.v1beta; + +/** + * + * + *
+ * Message describing Database object.
+ * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.Database} + */ +public final class Database extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.Database) + DatabaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Database.newBuilder() to construct. + private Database(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Database() { + name_ = ""; + charset_ = ""; + collation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Database(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Database_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Database_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.Database.class, + com.google.cloud.alloydb.v1beta.Database.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. Name of the resource in the form of
+   * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Identifier. Name of the resource in the form of
+   * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHARSET_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object charset_ = ""; + /** + * + * + *
+   * Optional. Charset for the database.
+   * This field can contain any PostgreSQL supported charset name.
+   * Example values include "UTF8", "SQL_ASCII", etc.
+   * 
+ * + * string charset = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The charset. + */ + @java.lang.Override + public java.lang.String getCharset() { + java.lang.Object ref = charset_; + 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(); + charset_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Charset for the database.
+   * This field can contain any PostgreSQL supported charset name.
+   * Example values include "UTF8", "SQL_ASCII", etc.
+   * 
+ * + * string charset = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for charset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCharsetBytes() { + java.lang.Object ref = charset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + charset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLLATION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object collation_ = ""; + /** + * + * + *
+   * Optional. Collation for the database.
+   * Name of the custom or native collation for postgres.
+   * Example values include "C", "POSIX", etc
+   * 
+ * + * string collation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The collation. + */ + @java.lang.Override + public java.lang.String getCollation() { + java.lang.Object ref = collation_; + 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(); + collation_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Collation for the database.
+   * Name of the custom or native collation for postgres.
+   * Example values include "C", "POSIX", etc
+   * 
+ * + * string collation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for collation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCollationBytes() { + java.lang.Object ref = collation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(charset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, charset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, collation_); + } + 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(charset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, charset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, collation_); + } + 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.alloydb.v1beta.Database)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1beta.Database other = (com.google.cloud.alloydb.v1beta.Database) obj; + + if (!getName().equals(other.getName())) return false; + if (!getCharset().equals(other.getCharset())) return false; + if (!getCollation().equals(other.getCollation())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + CHARSET_FIELD_NUMBER; + hash = (53 * hash) + getCharset().hashCode(); + hash = (37 * hash) + COLLATION_FIELD_NUMBER; + hash = (53 * hash) + getCollation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.alloydb.v1beta.Database parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Database 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.alloydb.v1beta.Database parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Database 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.alloydb.v1beta.Database parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Database parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.alloydb.v1beta.Database parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Database 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.alloydb.v1beta.Database parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Database 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.alloydb.v1beta.Database parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Database 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.alloydb.v1beta.Database 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; + } + /** + * + * + *
+   * Message describing Database object.
+   * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.Database} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Database) + com.google.cloud.alloydb.v1beta.DatabaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Database_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Database_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.Database.class, + com.google.cloud.alloydb.v1beta.Database.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1beta.Database.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + charset_ = ""; + collation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Database_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Database getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1beta.Database.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Database build() { + com.google.cloud.alloydb.v1beta.Database result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Database buildPartial() { + com.google.cloud.alloydb.v1beta.Database result = + new com.google.cloud.alloydb.v1beta.Database(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.alloydb.v1beta.Database result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.charset_ = charset_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.collation_ = collation_; + } + } + + @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.alloydb.v1beta.Database) { + return mergeFrom((com.google.cloud.alloydb.v1beta.Database) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.alloydb.v1beta.Database other) { + if (other == com.google.cloud.alloydb.v1beta.Database.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCharset().isEmpty()) { + charset_ = other.charset_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getCollation().isEmpty()) { + collation_ = other.collation_; + bitField0_ |= 0x00000004; + onChanged(); + } + 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 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + charset_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + collation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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 java.lang.Object name_ = ""; + /** + * + * + *
+     * Identifier. Name of the resource in the form of
+     * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + /** + * + * + *
+     * Identifier. Name of the resource in the form of
+     * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + /** + * + * + *
+     * Identifier. Name of the resource in the form of
+     * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + /** + * + * + *
+     * Identifier. Name of the resource in the form of
+     * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier. Name of the resource in the form of
+     * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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 charset_ = ""; + /** + * + * + *
+     * Optional. Charset for the database.
+     * This field can contain any PostgreSQL supported charset name.
+     * Example values include "UTF8", "SQL_ASCII", etc.
+     * 
+ * + * string charset = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The charset. + */ + public java.lang.String getCharset() { + java.lang.Object ref = charset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + charset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Charset for the database.
+     * This field can contain any PostgreSQL supported charset name.
+     * Example values include "UTF8", "SQL_ASCII", etc.
+     * 
+ * + * string charset = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for charset. + */ + public com.google.protobuf.ByteString getCharsetBytes() { + java.lang.Object ref = charset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + charset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Charset for the database.
+     * This field can contain any PostgreSQL supported charset name.
+     * Example values include "UTF8", "SQL_ASCII", etc.
+     * 
+ * + * string charset = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The charset to set. + * @return This builder for chaining. + */ + public Builder setCharset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + charset_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Charset for the database.
+     * This field can contain any PostgreSQL supported charset name.
+     * Example values include "UTF8", "SQL_ASCII", etc.
+     * 
+ * + * string charset = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCharset() { + charset_ = getDefaultInstance().getCharset(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Charset for the database.
+     * This field can contain any PostgreSQL supported charset name.
+     * Example values include "UTF8", "SQL_ASCII", etc.
+     * 
+ * + * string charset = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for charset to set. + * @return This builder for chaining. + */ + public Builder setCharsetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + charset_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object collation_ = ""; + /** + * + * + *
+     * Optional. Collation for the database.
+     * Name of the custom or native collation for postgres.
+     * Example values include "C", "POSIX", etc
+     * 
+ * + * string collation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The collation. + */ + public java.lang.String getCollation() { + java.lang.Object ref = collation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Collation for the database.
+     * Name of the custom or native collation for postgres.
+     * Example values include "C", "POSIX", etc
+     * 
+ * + * string collation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for collation. + */ + public com.google.protobuf.ByteString getCollationBytes() { + java.lang.Object ref = collation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Collation for the database.
+     * Name of the custom or native collation for postgres.
+     * Example values include "C", "POSIX", etc
+     * 
+ * + * string collation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The collation to set. + * @return This builder for chaining. + */ + public Builder setCollation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + collation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Collation for the database.
+     * Name of the custom or native collation for postgres.
+     * Example values include "C", "POSIX", etc
+     * 
+ * + * string collation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCollation() { + collation_ = getDefaultInstance().getCollation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Collation for the database.
+     * Name of the custom or native collation for postgres.
+     * Example values include "C", "POSIX", etc
+     * 
+ * + * string collation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for collation to set. + * @return This builder for chaining. + */ + public Builder setCollationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + collation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.alloydb.v1beta.Database) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1beta.Database) + private static final com.google.cloud.alloydb.v1beta.Database DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1beta.Database(); + } + + public static com.google.cloud.alloydb.v1beta.Database getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Database 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.alloydb.v1beta.Database getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/DatabaseName.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/DatabaseName.java new file mode 100644 index 000000000000..51cee7bf7903 --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/DatabaseName.java @@ -0,0 +1,259 @@ +/* + * Copyright 2024 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.alloydb.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DatabaseName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CLUSTER_DATABASE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String cluster; + private final String database; + + @Deprecated + protected DatabaseName() { + project = null; + location = null; + cluster = null; + database = null; + } + + private DatabaseName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + cluster = Preconditions.checkNotNull(builder.getCluster()); + database = Preconditions.checkNotNull(builder.getDatabase()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public String getDatabase() { + return database; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DatabaseName of(String project, String location, String cluster, String database) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .setDatabase(database) + .build(); + } + + public static String format(String project, String location, String cluster, String database) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .setDatabase(database) + .build() + .toString(); + } + + public static DatabaseName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CLUSTER_DATABASE.validatedMatch( + formattedString, "DatabaseName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("cluster"), + matchMap.get("database")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DatabaseName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CLUSTER_DATABASE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (cluster != null) { + fieldMapBuilder.put("cluster", cluster); + } + if (database != null) { + fieldMapBuilder.put("database", database); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CLUSTER_DATABASE.instantiate( + "project", project, "location", location, "cluster", cluster, "database", database); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DatabaseName that = ((DatabaseName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.cluster, that.cluster) + && Objects.equals(this.database, that.database); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(cluster); + h *= 1000003; + h ^= Objects.hashCode(database); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}. + */ + public static class Builder { + private String project; + private String location; + private String cluster; + private String database; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public String getDatabase() { + return database; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCluster(String cluster) { + this.cluster = cluster; + return this; + } + + public Builder setDatabase(String database) { + this.database = database; + return this; + } + + private Builder(DatabaseName databaseName) { + this.project = databaseName.project; + this.location = databaseName.location; + this.cluster = databaseName.cluster; + this.database = databaseName.database; + } + + public DatabaseName build() { + return new DatabaseName(this); + } + } +} diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/DatabaseOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/DatabaseOrBuilder.java new file mode 100644 index 000000000000..022c9479d8cc --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/DatabaseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2024 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/alloydb/v1beta/resources.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.alloydb.v1beta; + +public interface DatabaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1beta.Database) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of the resource in the form of
+   * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. Name of the resource in the form of
+   * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Charset for the database.
+   * This field can contain any PostgreSQL supported charset name.
+   * Example values include "UTF8", "SQL_ASCII", etc.
+   * 
+ * + * string charset = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The charset. + */ + java.lang.String getCharset(); + /** + * + * + *
+   * Optional. Charset for the database.
+   * This field can contain any PostgreSQL supported charset name.
+   * Example values include "UTF8", "SQL_ASCII", etc.
+   * 
+ * + * string charset = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for charset. + */ + com.google.protobuf.ByteString getCharsetBytes(); + + /** + * + * + *
+   * Optional. Collation for the database.
+   * Name of the custom or native collation for postgres.
+   * Example values include "C", "POSIX", etc
+   * 
+ * + * string collation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The collation. + */ + java.lang.String getCollation(); + /** + * + * + *
+   * Optional. Collation for the database.
+   * Name of the custom or native collation for postgres.
+   * Example values include "C", "POSIX", etc
+   * 
+ * + * string collation = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for collation. + */ + com.google.protobuf.ByteString getCollationBytes(); +} diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateRequest.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateRequest.java index f5bb914ec7ba..64c2299bb28d 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateRequest.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateRequest.java @@ -209,13 +209,14 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * * *
-   * Optional. A pem-encoded X.509 certificate signing request (CSR).
+   * Optional. A pem-encoded X.509 certificate signing request (CSR). It is
+   * recommended to use public_key instead.
    * 
* * string pem_csr = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateRequest.pem_csr is deprecated. - * See google/cloud/alloydb/v1beta/service.proto;l=1351 + * See google/cloud/alloydb/v1beta/service.proto;l=1360 * @return The pemCsr. */ @java.lang.Override @@ -235,13 +236,14 @@ public java.lang.String getPemCsr() { * * *
-   * Optional. A pem-encoded X.509 certificate signing request (CSR).
+   * Optional. A pem-encoded X.509 certificate signing request (CSR). It is
+   * recommended to use public_key instead.
    * 
* * string pem_csr = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateRequest.pem_csr is deprecated. - * See google/cloud/alloydb/v1beta/service.proto;l=1351 + * See google/cloud/alloydb/v1beta/service.proto;l=1360 * @return The bytes for pemCsr. */ @java.lang.Override @@ -1172,13 +1174,14 @@ public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. A pem-encoded X.509 certificate signing request (CSR).
+     * Optional. A pem-encoded X.509 certificate signing request (CSR). It is
+     * recommended to use public_key instead.
      * 
* * string pem_csr = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1360 * @return The pemCsr. */ @java.lang.Deprecated @@ -1197,13 +1200,14 @@ public java.lang.String getPemCsr() { * * *
-     * Optional. A pem-encoded X.509 certificate signing request (CSR).
+     * Optional. A pem-encoded X.509 certificate signing request (CSR). It is
+     * recommended to use public_key instead.
      * 
* * string pem_csr = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1360 * @return The bytes for pemCsr. */ @java.lang.Deprecated @@ -1222,13 +1226,14 @@ public com.google.protobuf.ByteString getPemCsrBytes() { * * *
-     * Optional. A pem-encoded X.509 certificate signing request (CSR).
+     * Optional. A pem-encoded X.509 certificate signing request (CSR). It is
+     * recommended to use public_key instead.
      * 
* * string pem_csr = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1360 * @param value The pemCsr to set. * @return This builder for chaining. */ @@ -1246,13 +1251,14 @@ public Builder setPemCsr(java.lang.String value) { * * *
-     * Optional. A pem-encoded X.509 certificate signing request (CSR).
+     * Optional. A pem-encoded X.509 certificate signing request (CSR). It is
+     * recommended to use public_key instead.
      * 
* * string pem_csr = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1360 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1266,13 +1272,14 @@ public Builder clearPemCsr() { * * *
-     * Optional. A pem-encoded X.509 certificate signing request (CSR).
+     * Optional. A pem-encoded X.509 certificate signing request (CSR). It is
+     * recommended to use public_key instead.
      * 
* * string pem_csr = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1360 * @param value The bytes for pemCsr to set. * @return This builder for chaining. */ diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateRequestOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateRequestOrBuilder.java index 31ff36258dba..170076c25a6f 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateRequestOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateRequestOrBuilder.java @@ -108,13 +108,14 @@ public interface GenerateClientCertificateRequestOrBuilder * * *
-   * Optional. A pem-encoded X.509 certificate signing request (CSR).
+   * Optional. A pem-encoded X.509 certificate signing request (CSR). It is
+   * recommended to use public_key instead.
    * 
* * string pem_csr = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateRequest.pem_csr is deprecated. - * See google/cloud/alloydb/v1beta/service.proto;l=1351 + * See google/cloud/alloydb/v1beta/service.proto;l=1360 * @return The pemCsr. */ @java.lang.Deprecated @@ -123,13 +124,14 @@ public interface GenerateClientCertificateRequestOrBuilder * * *
-   * Optional. A pem-encoded X.509 certificate signing request (CSR).
+   * Optional. A pem-encoded X.509 certificate signing request (CSR). It is
+   * recommended to use public_key instead.
    * 
* * string pem_csr = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateRequest.pem_csr is deprecated. - * See google/cloud/alloydb/v1beta/service.proto;l=1351 + * See google/cloud/alloydb/v1beta/service.proto;l=1360 * @return The bytes for pemCsr. */ @java.lang.Deprecated diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateResponse.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateResponse.java index c9fda592e68b..9ef32728a0d1 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateResponse.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateResponse.java @@ -77,11 +77,16 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Output only. The pem-encoded, signed X.509 certificate. * * - * string pem_certificate = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string pem_certificate = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * + * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1383 * @return The pemCertificate. */ @java.lang.Override + @java.lang.Deprecated public java.lang.String getPemCertificate() { java.lang.Object ref = pemCertificate_; if (ref instanceof java.lang.String) { @@ -100,11 +105,16 @@ public java.lang.String getPemCertificate() { * Output only. The pem-encoded, signed X.509 certificate. * * - * string pem_certificate = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string pem_certificate = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * + * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1383 * @return The bytes for pemCertificate. */ @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString getPemCertificateBytes() { java.lang.Object ref = pemCertificate_; if (ref instanceof java.lang.String) { @@ -659,10 +669,15 @@ public Builder mergeFrom( * Output only. The pem-encoded, signed X.509 certificate. * * - * string pem_certificate = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string pem_certificate = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * + * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1383 * @return The pemCertificate. */ + @java.lang.Deprecated public java.lang.String getPemCertificate() { java.lang.Object ref = pemCertificate_; if (!(ref instanceof java.lang.String)) { @@ -681,10 +696,15 @@ public java.lang.String getPemCertificate() { * Output only. The pem-encoded, signed X.509 certificate. * * - * string pem_certificate = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string pem_certificate = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * + * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1383 * @return The bytes for pemCertificate. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getPemCertificateBytes() { java.lang.Object ref = pemCertificate_; if (ref instanceof String) { @@ -703,11 +723,16 @@ public com.google.protobuf.ByteString getPemCertificateBytes() { * Output only. The pem-encoded, signed X.509 certificate. * * - * string pem_certificate = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string pem_certificate = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * + * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1383 * @param value The pemCertificate to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setPemCertificate(java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -724,10 +749,15 @@ public Builder setPemCertificate(java.lang.String value) { * Output only. The pem-encoded, signed X.509 certificate. * * - * string pem_certificate = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string pem_certificate = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * + * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1383 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearPemCertificate() { pemCertificate_ = getDefaultInstance().getPemCertificate(); bitField0_ = (bitField0_ & ~0x00000001); @@ -741,11 +771,16 @@ public Builder clearPemCertificate() { * Output only. The pem-encoded, signed X.509 certificate. * * - * string pem_certificate = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string pem_certificate = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * + * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1383 * @param value The bytes for pemCertificate to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setPemCertificateBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateResponseOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateResponseOrBuilder.java index 2beba3be98e4..99ecea06368f 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateResponseOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/GenerateClientCertificateResponseOrBuilder.java @@ -31,10 +31,15 @@ public interface GenerateClientCertificateResponseOrBuilder * Output only. The pem-encoded, signed X.509 certificate. * * - * string pem_certificate = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string pem_certificate = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * + * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1383 * @return The pemCertificate. */ + @java.lang.Deprecated java.lang.String getPemCertificate(); /** * @@ -43,10 +48,15 @@ public interface GenerateClientCertificateResponseOrBuilder * Output only. The pem-encoded, signed X.509 certificate. * * - * string pem_certificate = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string pem_certificate = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * * + * @deprecated google.cloud.alloydb.v1beta.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1beta/service.proto;l=1383 * @return The bytes for pemCertificate. */ + @java.lang.Deprecated com.google.protobuf.ByteString getPemCertificateBytes(); /** diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Instance.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Instance.java index c4280af30001..d8d005ac3dfe 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Instance.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/Instance.java @@ -49,6 +49,7 @@ private Instance() { gceZone_ = ""; nodes_ = java.util.Collections.emptyList(); ipAddress_ = ""; + publicIpAddress_ = ""; etag_ = ""; } @@ -5847,833 +5848,6480 @@ public com.google.protobuf.Parser getParserForType() { } } - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; + public interface PscInterfaceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Output only. The name of the instance resource with the format:
-   *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
-   * where the cluster and instance ID segments should satisfy the regex
-   * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
-   * lowercase letters, numbers, and dashes, starting with a letter, and ending
-   * with a letter or number. For more details see https://google.aip.dev/122.
-   * The prefix of the instance resource name is the name of the parent
-   * resource:
-   *  * projects/{project}/locations/{region}/clusters/{cluster_id}
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } + /** + * + * + *
+     * A list of endpoints in the consumer VPC the interface might initiate
+     * outbound connections to. This list has to be provided when the PSC
+     * interface is created.
+     * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @return A list containing the consumerEndpointIps. + */ + java.util.List getConsumerEndpointIpsList(); + /** + * + * + *
+     * A list of endpoints in the consumer VPC the interface might initiate
+     * outbound connections to. This list has to be provided when the PSC
+     * interface is created.
+     * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @return The count of consumerEndpointIps. + */ + int getConsumerEndpointIpsCount(); + /** + * + * + *
+     * A list of endpoints in the consumer VPC the interface might initiate
+     * outbound connections to. This list has to be provided when the PSC
+     * interface is created.
+     * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @param index The index of the element to return. + * @return The consumerEndpointIps at the given index. + */ + java.lang.String getConsumerEndpointIps(int index); + /** + * + * + *
+     * A list of endpoints in the consumer VPC the interface might initiate
+     * outbound connections to. This list has to be provided when the PSC
+     * interface is created.
+     * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @param index The index of the value to return. + * @return The bytes of the consumerEndpointIps at the given index. + */ + com.google.protobuf.ByteString getConsumerEndpointIpsBytes(int index); + + /** + * + * + *
+     * The NetworkAttachment resource created in the consumer VPC to which the
+     * PSC interface will be linked, in the form of:
+     * `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}`.
+     * NetworkAttachment has to be provided when the PSC interface is created.
+     * 
+ * + * string network_attachment = 2; + * + * @return The networkAttachment. + */ + java.lang.String getNetworkAttachment(); + /** + * + * + *
+     * The NetworkAttachment resource created in the consumer VPC to which the
+     * PSC interface will be linked, in the form of:
+     * `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}`.
+     * NetworkAttachment has to be provided when the PSC interface is created.
+     * 
+ * + * string network_attachment = 2; + * + * @return The bytes for networkAttachment. + */ + com.google.protobuf.ByteString getNetworkAttachmentBytes(); } /** * * *
-   * Output only. The name of the instance resource with the format:
-   *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
-   * where the cluster and instance ID segments should satisfy the regex
-   * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
-   * lowercase letters, numbers, and dashes, starting with a letter, and ending
-   * with a letter or number. For more details see https://google.aip.dev/122.
-   * The prefix of the instance resource name is the name of the parent
-   * resource:
-   *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+   * Configuration for setting up a PSC interface. This information needs to be
+   * provided by the customer.
+   * PSC interfaces will be created and added to VMs via SLM (adding a network
+   * interface will require recreating the VM). For HA instances this will be
+   * done via LDTM.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. + * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig} */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class PscInterfaceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig) + PscInterfaceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PscInterfaceConfig.newBuilder() to construct. + private PscInterfaceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private PscInterfaceConfig() { + consumerEndpointIps_ = com.google.protobuf.LazyStringArrayList.emptyList(); + networkAttachment_ = ""; + } - @SuppressWarnings("serial") - private volatile java.lang.Object displayName_ = ""; - /** - * - * - *
-   * User-settable and human-readable display name for the Instance.
-   * 
- * - * string display_name = 2; - * - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - 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(); - displayName_ = s; - return s; + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PscInterfaceConfig(); } - } - /** - * - * - *
-   * User-settable and human-readable display name for the Instance.
-   * 
- * - * string display_name = 2; - * - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.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; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_PscInterfaceConfig_descriptor; } - } - public static final int UID_FIELD_NUMBER = 3; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_PscInterfaceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.class, + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.Builder.class); + } - @SuppressWarnings("serial") - private volatile java.lang.Object uid_ = ""; - /** - * - * - *
-   * Output only. The system-generated UID of the resource. The UID is assigned
-   * when the resource is created, and it is retained until it is deleted.
-   * 
- * - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = uid_; - 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(); - uid_ = s; - return s; + public static final int CONSUMER_ENDPOINT_IPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList consumerEndpointIps_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * A list of endpoints in the consumer VPC the interface might initiate
+     * outbound connections to. This list has to be provided when the PSC
+     * interface is created.
+     * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @return A list containing the consumerEndpointIps. + */ + public com.google.protobuf.ProtocolStringList getConsumerEndpointIpsList() { + return consumerEndpointIps_; } - } - /** - * - * - *
-   * Output only. The system-generated UID of the resource. The UID is assigned
-   * when the resource is created, and it is retained until it is deleted.
-   * 
- * - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * + * + *
+     * A list of endpoints in the consumer VPC the interface might initiate
+     * outbound connections to. This list has to be provided when the PSC
+     * interface is created.
+     * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @return The count of consumerEndpointIps. + */ + public int getConsumerEndpointIpsCount() { + return consumerEndpointIps_.size(); + } + /** + * + * + *
+     * A list of endpoints in the consumer VPC the interface might initiate
+     * outbound connections to. This list has to be provided when the PSC
+     * interface is created.
+     * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @param index The index of the element to return. + * @return The consumerEndpointIps at the given index. + */ + public java.lang.String getConsumerEndpointIps(int index) { + return consumerEndpointIps_.get(index); + } + /** + * + * + *
+     * A list of endpoints in the consumer VPC the interface might initiate
+     * outbound connections to. This list has to be provided when the PSC
+     * interface is created.
+     * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @param index The index of the value to return. + * @return The bytes of the consumerEndpointIps at the given index. + */ + public com.google.protobuf.ByteString getConsumerEndpointIpsBytes(int index) { + return consumerEndpointIps_.getByteString(index); } - } - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. Create time stamp
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Output only. Create time stamp
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. Create time stamp
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } + public static final int NETWORK_ATTACHMENT_FIELD_NUMBER = 2; - public static final int UPDATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. Update time stamp
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * Output only. Update time stamp
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. Update time stamp
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } + @SuppressWarnings("serial") + private volatile java.lang.Object networkAttachment_ = ""; + /** + * + * + *
+     * The NetworkAttachment resource created in the consumer VPC to which the
+     * PSC interface will be linked, in the form of:
+     * `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}`.
+     * NetworkAttachment has to be provided when the PSC interface is created.
+     * 
+ * + * string network_attachment = 2; + * + * @return The networkAttachment. + */ + @java.lang.Override + public java.lang.String getNetworkAttachment() { + java.lang.Object ref = networkAttachment_; + 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(); + networkAttachment_ = s; + return s; + } + } + /** + * + * + *
+     * The NetworkAttachment resource created in the consumer VPC to which the
+     * PSC interface will be linked, in the form of:
+     * `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}`.
+     * NetworkAttachment has to be provided when the PSC interface is created.
+     * 
+ * + * string network_attachment = 2; + * + * @return The bytes for networkAttachment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkAttachmentBytes() { + java.lang.Object ref = networkAttachment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkAttachment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static final int DELETE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp deleteTime_; - /** - * - * - *
-   * Output only. Delete time stamp
-   * 
- * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the deleteTime field is set. - */ - @java.lang.Override - public boolean hasDeleteTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-   * Output only. Delete time stamp
-   * 
- * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getDeleteTime() { - return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; - } - /** - * - * - *
-   * Output only. Delete time stamp
-   * 
- * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { - return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; - } + private byte memoizedIsInitialized = -1; - public static final int LABELS_FIELD_NUMBER = 7; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.alloydb.v1beta.ResourcesProto - .internal_static_google_cloud_alloydb_v1beta_Instance_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } + memoizedIsInitialized = 1; + return true; + } - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < consumerEndpointIps_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 1, consumerEndpointIps_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkAttachment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, networkAttachment_); + } + getUnknownFields().writeTo(output); + } - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < consumerEndpointIps_.size(); i++) { + dataSize += computeStringSizeNoTag(consumerEndpointIps_.getRaw(i)); + } + size += dataSize; + size += 1 * getConsumerEndpointIpsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkAttachment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, networkAttachment_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * Labels as key value pairs
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig other = + (com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig) obj; + + if (!getConsumerEndpointIpsList().equals(other.getConsumerEndpointIpsList())) return false; + if (!getNetworkAttachment().equals(other.getNetworkAttachment())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * Labels as key value pairs
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Labels as key value pairs
-   * 
- * - * map<string, string> labels = 7; - */ - @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.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConsumerEndpointIpsCount() > 0) { + hash = (37 * hash) + CONSUMER_ENDPOINT_IPS_FIELD_NUMBER; + hash = (53 * hash) + getConsumerEndpointIpsList().hashCode(); + } + hash = (37 * hash) + NETWORK_ATTACHMENT_FIELD_NUMBER; + hash = (53 * hash) + getNetworkAttachment().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Labels as key value pairs
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - return map.get(key); - } - public static final int STATE_FIELD_NUMBER = 8; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current serving state of the instance.
-   * 
- * - * - * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current serving state of the instance.
-   * 
- * - * - * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance.State getState() { - com.google.cloud.alloydb.v1beta.Instance.State result = - com.google.cloud.alloydb.v1beta.Instance.State.forNumber(state_); - return result == null ? com.google.cloud.alloydb.v1beta.Instance.State.UNRECOGNIZED : result; - } + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int INSTANCE_TYPE_FIELD_NUMBER = 9; - private int instanceType_ = 0; - /** - * - * - *
-   * Required. The type of the instance. Specified at creation time.
-   * 
- * - * - * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for instanceType. - */ - @java.lang.Override - public int getInstanceTypeValue() { - return instanceType_; - } - /** - * - * - *
-   * Required. The type of the instance. Specified at creation time.
-   * 
- * - * - * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The instanceType. - */ - @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance.InstanceType getInstanceType() { - com.google.cloud.alloydb.v1beta.Instance.InstanceType result = - com.google.cloud.alloydb.v1beta.Instance.InstanceType.forNumber(instanceType_); - return result == null - ? com.google.cloud.alloydb.v1beta.Instance.InstanceType.UNRECOGNIZED - : result; - } + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int MACHINE_CONFIG_FIELD_NUMBER = 10; - private com.google.cloud.alloydb.v1beta.Instance.MachineConfig machineConfig_; - /** - * - * - *
-   * Configurations for the machines that host the underlying
-   * database engine.
-   * 
- * - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; - * - * @return Whether the machineConfig field is set. - */ - @java.lang.Override - public boolean hasMachineConfig() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-   * Configurations for the machines that host the underlying
-   * database engine.
-   * 
- * - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; - * - * @return The machineConfig. - */ - @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance.MachineConfig getMachineConfig() { - return machineConfig_ == null - ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance() - : machineConfig_; - } - /** - * - * - *
-   * Configurations for the machines that host the underlying
-   * database engine.
-   * 
- * - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; - */ - @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder - getMachineConfigOrBuilder() { - return machineConfig_ == null - ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance() - : machineConfig_; - } + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int AVAILABILITY_TYPE_FIELD_NUMBER = 11; - private int availabilityType_ = 0; - /** - * - * - *
-   * Availability type of an Instance.
-   * If empty, defaults to REGIONAL for primary instances.
-   * For read pools, availability_type is always UNSPECIFIED. Instances in the
-   * read pools are evenly distributed across available zones within the region
-   * (i.e. read pools with more than one node will have a node in at
-   * least two zones).
-   * 
- * - * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; - * - * @return The enum numeric value on the wire for availabilityType. - */ - @java.lang.Override - public int getAvailabilityTypeValue() { - return availabilityType_; - } - /** - * - * - *
-   * Availability type of an Instance.
-   * If empty, defaults to REGIONAL for primary instances.
-   * For read pools, availability_type is always UNSPECIFIED. Instances in the
-   * read pools are evenly distributed across available zones within the region
-   * (i.e. read pools with more than one node will have a node in at
-   * least two zones).
-   * 
- * - * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; - * - * @return The availabilityType. - */ - @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance.AvailabilityType getAvailabilityType() { - com.google.cloud.alloydb.v1beta.Instance.AvailabilityType result = - com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.forNumber(availabilityType_); - return result == null - ? com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.UNRECOGNIZED - : result; - } - - public static final int GCE_ZONE_FIELD_NUMBER = 12; + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @SuppressWarnings("serial") - private volatile java.lang.Object gceZone_ = ""; - /** - * - * - *
-   * The Compute Engine zone that the instance should serve from, per
-   * https://cloud.google.com/compute/docs/regions-zones
-   * This can ONLY be specified for ZONAL instances.
-   * If present for a REGIONAL instance, an error will be thrown.
-   * If this is absent for a ZONAL instance, instance is created in a random
-   * zone with available capacity.
-   * 
- * - * string gce_zone = 12; - * - * @return The gceZone. - */ - @java.lang.Override - public java.lang.String getGceZone() { - java.lang.Object ref = gceZone_; - 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(); - gceZone_ = s; - return s; + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - } - /** - * - * - *
-   * The Compute Engine zone that the instance should serve from, per
-   * https://cloud.google.com/compute/docs/regions-zones
-   * This can ONLY be specified for ZONAL instances.
-   * If present for a REGIONAL instance, an error will be thrown.
-   * If this is absent for a ZONAL instance, instance is created in a random
-   * zone with available capacity.
-   * 
- * - * string gce_zone = 12; - * - * @return The bytes for gceZone. - */ - @java.lang.Override - public com.google.protobuf.ByteString getGceZoneBytes() { - java.lang.Object ref = gceZone_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gceZone_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig 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 final int DATABASE_FLAGS_FIELD_NUMBER = 13; + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - private static final class DatabaseFlagsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.alloydb.v1beta.ResourcesProto - .internal_static_google_cloud_alloydb_v1beta_Instance_DatabaseFlagsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @SuppressWarnings("serial") - private com.google.protobuf.MapField databaseFlags_; + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - private com.google.protobuf.MapField - internalGetDatabaseFlags() { - if (databaseFlags_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DatabaseFlagsDefaultEntryHolder.defaultEntry); + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - return databaseFlags_; - } - public int getDatabaseFlagsCount() { - return internalGetDatabaseFlags().getMap().size(); - } - /** - * - * - *
-   * Database flags. Set at instance level.
-   *  * They are copied from primary instance on read instance creation.
-   *  * Read instances can set new or override existing flags that are relevant
-   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
-   *    set on read instance may or may not be present on primary.
-   *
-   *
-   * This is a list of "key": "value" pairs.
-   * "key": The name of the flag. These flags are passed at instance setup time,
-   * so include both server options and system variables for Postgres. Flags are
-   * specified with underscores, not hyphens.
-   * "value": The value of the flag. Booleans are set to **on** for true
-   * and **off** for false. This field must be omitted if the flag
-   * doesn't take a value.
-   * 
- * - * map<string, string> database_flags = 13; - */ - @java.lang.Override - public boolean containsDatabaseFlags(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - return internalGetDatabaseFlags().getMap().containsKey(key); - } - /** Use {@link #getDatabaseFlagsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDatabaseFlags() { - return getDatabaseFlagsMap(); - } - /** - * - * - *
-   * Database flags. Set at instance level.
-   *  * They are copied from primary instance on read instance creation.
-   *  * Read instances can set new or override existing flags that are relevant
-   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
-   *    set on read instance may or may not be present on primary.
-   *
-   *
-   * This is a list of "key": "value" pairs.
-   * "key": The name of the flag. These flags are passed at instance setup time,
-   * so include both server options and system variables for Postgres. Flags are
-   * specified with underscores, not hyphens.
-   * "value": The value of the flag. Booleans are set to **on** for true
-   * and **off** for false. This field must be omitted if the flag
-   * doesn't take a value.
-   * 
- * - * map<string, string> database_flags = 13; - */ - @java.lang.Override - public java.util.Map getDatabaseFlagsMap() { - return internalGetDatabaseFlags().getMap(); - } - /** - * - * - *
-   * Database flags. Set at instance level.
-   *  * They are copied from primary instance on read instance creation.
-   *  * Read instances can set new or override existing flags that are relevant
-   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
-   *    set on read instance may or may not be present on primary.
-   *
-   *
-   * This is a list of "key": "value" pairs.
-   * "key": The name of the flag. These flags are passed at instance setup time,
-   * so include both server options and system variables for Postgres. Flags are
-   * specified with underscores, not hyphens.
-   * "value": The value of the flag. Booleans are set to **on** for true
-   * and **off** for false. This field must be omitted if the flag
-   * doesn't take a value.
-   * 
- * - * map<string, string> database_flags = 13; - */ - @java.lang.Override - public /* nullable */ java.lang.String getDatabaseFlagsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - java.util.Map map = internalGetDatabaseFlags().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Database flags. Set at instance level.
-   *  * They are copied from primary instance on read instance creation.
-   *  * Read instances can set new or override existing flags that are relevant
-   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
-   *    set on read instance may or may not be present on primary.
-   *
-   *
-   * This is a list of "key": "value" pairs.
-   * "key": The name of the flag. These flags are passed at instance setup time,
-   * so include both server options and system variables for Postgres. Flags are
-   * specified with underscores, not hyphens.
-   * "value": The value of the flag. Booleans are set to **on** for true
-   * and **off** for false. This field must be omitted if the flag
-   * doesn't take a value.
-   * 
- * - * map<string, string> database_flags = 13; - */ - @java.lang.Override - public java.lang.String getDatabaseFlagsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + + public static Builder newBuilder( + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - java.util.Map map = internalGetDatabaseFlags().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - return map.get(key); - } - public static final int WRITABLE_NODE_FIELD_NUMBER = 19; - private com.google.cloud.alloydb.v1beta.Instance.Node writableNode_; - /** - * - * - *
-   * Output only. This is set for the read-write VM of the PRIMARY instance
-   * only.
+    @java.lang.Override
+    protected Builder newBuilderForType(
+        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+      Builder builder = new Builder(parent);
+      return builder;
+    }
+    /**
+     *
+     *
+     * 
+     * Configuration for setting up a PSC interface. This information needs to be
+     * provided by the customer.
+     * PSC interfaces will be created and added to VMs via SLM (adding a network
+     * interface will require recreating the VM). For HA instances this will be
+     * done via LDTM.
+     * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig) + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_PscInterfaceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_PscInterfaceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.class, + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consumerEndpointIps_ = com.google.protobuf.LazyStringArrayList.emptyList(); + networkAttachment_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_PscInterfaceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig + getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig build() { + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig buildPartial() { + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig result = + new com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + consumerEndpointIps_.makeImmutable(); + result.consumerEndpointIps_ = consumerEndpointIps_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.networkAttachment_ = networkAttachment_; + } + } + + @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.alloydb.v1beta.Instance.PscInterfaceConfig) { + return mergeFrom((com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig other) { + if (other + == com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.getDefaultInstance()) + return this; + if (!other.consumerEndpointIps_.isEmpty()) { + if (consumerEndpointIps_.isEmpty()) { + consumerEndpointIps_ = other.consumerEndpointIps_; + bitField0_ |= 0x00000001; + } else { + ensureConsumerEndpointIpsIsMutable(); + consumerEndpointIps_.addAll(other.consumerEndpointIps_); + } + onChanged(); + } + if (!other.getNetworkAttachment().isEmpty()) { + networkAttachment_ = other.networkAttachment_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureConsumerEndpointIpsIsMutable(); + consumerEndpointIps_.add(s); + break; + } // case 10 + case 18: + { + networkAttachment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 com.google.protobuf.LazyStringArrayList consumerEndpointIps_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureConsumerEndpointIpsIsMutable() { + if (!consumerEndpointIps_.isModifiable()) { + consumerEndpointIps_ = new com.google.protobuf.LazyStringArrayList(consumerEndpointIps_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * A list of endpoints in the consumer VPC the interface might initiate
+       * outbound connections to. This list has to be provided when the PSC
+       * interface is created.
+       * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @return A list containing the consumerEndpointIps. + */ + public com.google.protobuf.ProtocolStringList getConsumerEndpointIpsList() { + consumerEndpointIps_.makeImmutable(); + return consumerEndpointIps_; + } + /** + * + * + *
+       * A list of endpoints in the consumer VPC the interface might initiate
+       * outbound connections to. This list has to be provided when the PSC
+       * interface is created.
+       * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @return The count of consumerEndpointIps. + */ + public int getConsumerEndpointIpsCount() { + return consumerEndpointIps_.size(); + } + /** + * + * + *
+       * A list of endpoints in the consumer VPC the interface might initiate
+       * outbound connections to. This list has to be provided when the PSC
+       * interface is created.
+       * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @param index The index of the element to return. + * @return The consumerEndpointIps at the given index. + */ + public java.lang.String getConsumerEndpointIps(int index) { + return consumerEndpointIps_.get(index); + } + /** + * + * + *
+       * A list of endpoints in the consumer VPC the interface might initiate
+       * outbound connections to. This list has to be provided when the PSC
+       * interface is created.
+       * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @param index The index of the value to return. + * @return The bytes of the consumerEndpointIps at the given index. + */ + public com.google.protobuf.ByteString getConsumerEndpointIpsBytes(int index) { + return consumerEndpointIps_.getByteString(index); + } + /** + * + * + *
+       * A list of endpoints in the consumer VPC the interface might initiate
+       * outbound connections to. This list has to be provided when the PSC
+       * interface is created.
+       * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @param index The index to set the value at. + * @param value The consumerEndpointIps to set. + * @return This builder for chaining. + */ + public Builder setConsumerEndpointIps(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerEndpointIpsIsMutable(); + consumerEndpointIps_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * A list of endpoints in the consumer VPC the interface might initiate
+       * outbound connections to. This list has to be provided when the PSC
+       * interface is created.
+       * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @param value The consumerEndpointIps to add. + * @return This builder for chaining. + */ + public Builder addConsumerEndpointIps(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerEndpointIpsIsMutable(); + consumerEndpointIps_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * A list of endpoints in the consumer VPC the interface might initiate
+       * outbound connections to. This list has to be provided when the PSC
+       * interface is created.
+       * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @param values The consumerEndpointIps to add. + * @return This builder for chaining. + */ + public Builder addAllConsumerEndpointIps(java.lang.Iterable values) { + ensureConsumerEndpointIpsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, consumerEndpointIps_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * A list of endpoints in the consumer VPC the interface might initiate
+       * outbound connections to. This list has to be provided when the PSC
+       * interface is created.
+       * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @return This builder for chaining. + */ + public Builder clearConsumerEndpointIps() { + consumerEndpointIps_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * A list of endpoints in the consumer VPC the interface might initiate
+       * outbound connections to. This list has to be provided when the PSC
+       * interface is created.
+       * 
+ * + * repeated string consumer_endpoint_ips = 1; + * + * @param value The bytes of the consumerEndpointIps to add. + * @return This builder for chaining. + */ + public Builder addConsumerEndpointIpsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureConsumerEndpointIpsIsMutable(); + consumerEndpointIps_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object networkAttachment_ = ""; + /** + * + * + *
+       * The NetworkAttachment resource created in the consumer VPC to which the
+       * PSC interface will be linked, in the form of:
+       * `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}`.
+       * NetworkAttachment has to be provided when the PSC interface is created.
+       * 
+ * + * string network_attachment = 2; + * + * @return The networkAttachment. + */ + public java.lang.String getNetworkAttachment() { + java.lang.Object ref = networkAttachment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkAttachment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The NetworkAttachment resource created in the consumer VPC to which the
+       * PSC interface will be linked, in the form of:
+       * `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}`.
+       * NetworkAttachment has to be provided when the PSC interface is created.
+       * 
+ * + * string network_attachment = 2; + * + * @return The bytes for networkAttachment. + */ + public com.google.protobuf.ByteString getNetworkAttachmentBytes() { + java.lang.Object ref = networkAttachment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkAttachment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The NetworkAttachment resource created in the consumer VPC to which the
+       * PSC interface will be linked, in the form of:
+       * `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}`.
+       * NetworkAttachment has to be provided when the PSC interface is created.
+       * 
+ * + * string network_attachment = 2; + * + * @param value The networkAttachment to set. + * @return This builder for chaining. + */ + public Builder setNetworkAttachment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + networkAttachment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The NetworkAttachment resource created in the consumer VPC to which the
+       * PSC interface will be linked, in the form of:
+       * `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}`.
+       * NetworkAttachment has to be provided when the PSC interface is created.
+       * 
+ * + * string network_attachment = 2; + * + * @return This builder for chaining. + */ + public Builder clearNetworkAttachment() { + networkAttachment_ = getDefaultInstance().getNetworkAttachment(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The NetworkAttachment resource created in the consumer VPC to which the
+       * PSC interface will be linked, in the form of:
+       * `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}`.
+       * NetworkAttachment has to be provided when the PSC interface is created.
+       * 
+ * + * string network_attachment = 2; + * + * @param value The bytes for networkAttachment to set. + * @return This builder for chaining. + */ + public Builder setNetworkAttachmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + networkAttachment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig) + private static final com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig(); + } + + public static com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PscInterfaceConfig 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.alloydb.v1beta.Instance.PscInterfaceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PscInstanceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1beta.Instance.PscInstanceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The service attachment created when Private
+     * Service Connect (PSC) is enabled for the instance.
+     * The name of the resource will be in the format of
+     * `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
+     * 
+ * + * string service_attachment_link = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAttachmentLink. + */ + java.lang.String getServiceAttachmentLink(); + /** + * + * + *
+     * Output only. The service attachment created when Private
+     * Service Connect (PSC) is enabled for the instance.
+     * The name of the resource will be in the format of
+     * `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
+     * 
+ * + * string service_attachment_link = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAttachmentLink. + */ + com.google.protobuf.ByteString getServiceAttachmentLinkBytes(); + + /** + * + * + *
+     * Optional. List of consumer projects that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedConsumerProjects. + */ + java.util.List getAllowedConsumerProjectsList(); + /** + * + * + *
+     * Optional. List of consumer projects that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedConsumerProjects. + */ + int getAllowedConsumerProjectsCount(); + /** + * + * + *
+     * Optional. List of consumer projects that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedConsumerProjects at the given index. + */ + java.lang.String getAllowedConsumerProjects(int index); + /** + * + * + *
+     * Optional. List of consumer projects that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedConsumerProjects at the given index. + */ + com.google.protobuf.ByteString getAllowedConsumerProjectsBytes(int index); + + /** + * + * + *
+     * Optional. List of consumer networks that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedConsumerNetworks. + */ + java.util.List getAllowedConsumerNetworksList(); + /** + * + * + *
+     * Optional. List of consumer networks that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedConsumerNetworks. + */ + int getAllowedConsumerNetworksCount(); + /** + * + * + *
+     * Optional. List of consumer networks that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedConsumerNetworks at the given index. + */ + java.lang.String getAllowedConsumerNetworks(int index); + /** + * + * + *
+     * Optional. List of consumer networks that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedConsumerNetworks at the given index. + */ + com.google.protobuf.ByteString getAllowedConsumerNetworksBytes(int index); + + /** + * + * + *
+     * Optional. Configurations for setting up PSC interfaces attached to the
+     * instance which are used for outbound connectivity. Only primary instances
+     * can have PSC interface attached. All the VMs created for the primary
+     * instance will share the same configurations. Currently we only support 0
+     * or 1 PSC interface.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getPscInterfaceConfigsList(); + /** + * + * + *
+     * Optional. Configurations for setting up PSC interfaces attached to the
+     * instance which are used for outbound connectivity. Only primary instances
+     * can have PSC interface attached. All the VMs created for the primary
+     * instance will share the same configurations. Currently we only support 0
+     * or 1 PSC interface.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig getPscInterfaceConfigs(int index); + /** + * + * + *
+     * Optional. Configurations for setting up PSC interfaces attached to the
+     * instance which are used for outbound connectivity. Only primary instances
+     * can have PSC interface attached. All the VMs created for the primary
+     * instance will share the same configurations. Currently we only support 0
+     * or 1 PSC interface.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getPscInterfaceConfigsCount(); + /** + * + * + *
+     * Optional. Configurations for setting up PSC interfaces attached to the
+     * instance which are used for outbound connectivity. Only primary instances
+     * can have PSC interface attached. All the VMs created for the primary
+     * instance will share the same configurations. Currently we only support 0
+     * or 1 PSC interface.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getPscInterfaceConfigsOrBuilderList(); + /** + * + * + *
+     * Optional. Configurations for setting up PSC interfaces attached to the
+     * instance which are used for outbound connectivity. Only primary instances
+     * can have PSC interface attached. All the VMs created for the primary
+     * instance will share the same configurations. Currently we only support 0
+     * or 1 PSC interface.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfigOrBuilder + getPscInterfaceConfigsOrBuilder(int index); + + /** + * + * + *
+     * Optional. List of service attachments that this instance has created
+     * endpoints to connect with. Currently, only a single outgoing service
+     * attachment is supported per instance.
+     * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the outgoingServiceAttachmentLinks. + */ + java.util.List getOutgoingServiceAttachmentLinksList(); + /** + * + * + *
+     * Optional. List of service attachments that this instance has created
+     * endpoints to connect with. Currently, only a single outgoing service
+     * attachment is supported per instance.
+     * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of outgoingServiceAttachmentLinks. + */ + int getOutgoingServiceAttachmentLinksCount(); + /** + * + * + *
+     * Optional. List of service attachments that this instance has created
+     * endpoints to connect with. Currently, only a single outgoing service
+     * attachment is supported per instance.
+     * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The outgoingServiceAttachmentLinks at the given index. + */ + java.lang.String getOutgoingServiceAttachmentLinks(int index); + /** + * + * + *
+     * Optional. List of service attachments that this instance has created
+     * endpoints to connect with. Currently, only a single outgoing service
+     * attachment is supported per instance.
+     * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the outgoingServiceAttachmentLinks at the given index. + */ + com.google.protobuf.ByteString getOutgoingServiceAttachmentLinksBytes(int index); + + /** + * + * + *
+     * Optional. Whether PSC connectivity is enabled for this instance.
+     * This is populated by referencing the value from the parent cluster.
+     * 
+ * + * bool psc_enabled = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pscEnabled. + */ + boolean getPscEnabled(); + } + /** + * + * + *
+   * PscInstanceConfig contains PSC related configuration at an
+   * instance level.
+   * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.PscInstanceConfig} + */ + public static final class PscInstanceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.Instance.PscInstanceConfig) + PscInstanceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PscInstanceConfig.newBuilder() to construct. + private PscInstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PscInstanceConfig() { + serviceAttachmentLink_ = ""; + allowedConsumerProjects_ = com.google.protobuf.LazyStringArrayList.emptyList(); + allowedConsumerNetworks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + pscInterfaceConfigs_ = java.util.Collections.emptyList(); + outgoingServiceAttachmentLinks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PscInstanceConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_PscInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_PscInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.class, + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.Builder.class); + } + + public static final int SERVICE_ATTACHMENT_LINK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAttachmentLink_ = ""; + /** + * + * + *
+     * Output only. The service attachment created when Private
+     * Service Connect (PSC) is enabled for the instance.
+     * The name of the resource will be in the format of
+     * `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
+     * 
+ * + * string service_attachment_link = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAttachmentLink. + */ + @java.lang.Override + public java.lang.String getServiceAttachmentLink() { + java.lang.Object ref = serviceAttachmentLink_; + 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(); + serviceAttachmentLink_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. The service attachment created when Private
+     * Service Connect (PSC) is enabled for the instance.
+     * The name of the resource will be in the format of
+     * `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
+     * 
+ * + * string service_attachment_link = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAttachmentLink. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAttachmentLinkBytes() { + java.lang.Object ref = serviceAttachmentLink_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAttachmentLink_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOWED_CONSUMER_PROJECTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList allowedConsumerProjects_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Optional. List of consumer projects that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedConsumerProjects. + */ + public com.google.protobuf.ProtocolStringList getAllowedConsumerProjectsList() { + return allowedConsumerProjects_; + } + /** + * + * + *
+     * Optional. List of consumer projects that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedConsumerProjects. + */ + public int getAllowedConsumerProjectsCount() { + return allowedConsumerProjects_.size(); + } + /** + * + * + *
+     * Optional. List of consumer projects that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedConsumerProjects at the given index. + */ + public java.lang.String getAllowedConsumerProjects(int index) { + return allowedConsumerProjects_.get(index); + } + /** + * + * + *
+     * Optional. List of consumer projects that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedConsumerProjects at the given index. + */ + public com.google.protobuf.ByteString getAllowedConsumerProjectsBytes(int index) { + return allowedConsumerProjects_.getByteString(index); + } + + public static final int ALLOWED_CONSUMER_NETWORKS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList allowedConsumerNetworks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Optional. List of consumer networks that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedConsumerNetworks. + */ + public com.google.protobuf.ProtocolStringList getAllowedConsumerNetworksList() { + return allowedConsumerNetworks_; + } + /** + * + * + *
+     * Optional. List of consumer networks that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedConsumerNetworks. + */ + public int getAllowedConsumerNetworksCount() { + return allowedConsumerNetworks_.size(); + } + /** + * + * + *
+     * Optional. List of consumer networks that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedConsumerNetworks at the given index. + */ + public java.lang.String getAllowedConsumerNetworks(int index) { + return allowedConsumerNetworks_.get(index); + } + /** + * + * + *
+     * Optional. List of consumer networks that are allowed to create
+     * PSC endpoints to service-attachments to this instance.
+     * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedConsumerNetworks at the given index. + */ + public com.google.protobuf.ByteString getAllowedConsumerNetworksBytes(int index) { + return allowedConsumerNetworks_.getByteString(index); + } + + public static final int PSC_INTERFACE_CONFIGS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + pscInterfaceConfigs_; + /** + * + * + *
+     * Optional. Configurations for setting up PSC interfaces attached to the
+     * instance which are used for outbound connectivity. Only primary instances
+     * can have PSC interface attached. All the VMs created for the primary
+     * instance will share the same configurations. Currently we only support 0
+     * or 1 PSC interface.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getPscInterfaceConfigsList() { + return pscInterfaceConfigs_; + } + /** + * + * + *
+     * Optional. Configurations for setting up PSC interfaces attached to the
+     * instance which are used for outbound connectivity. Only primary instances
+     * can have PSC interface attached. All the VMs created for the primary
+     * instance will share the same configurations. Currently we only support 0
+     * or 1 PSC interface.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfigOrBuilder> + getPscInterfaceConfigsOrBuilderList() { + return pscInterfaceConfigs_; + } + /** + * + * + *
+     * Optional. Configurations for setting up PSC interfaces attached to the
+     * instance which are used for outbound connectivity. Only primary instances
+     * can have PSC interface attached. All the VMs created for the primary
+     * instance will share the same configurations. Currently we only support 0
+     * or 1 PSC interface.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getPscInterfaceConfigsCount() { + return pscInterfaceConfigs_.size(); + } + /** + * + * + *
+     * Optional. Configurations for setting up PSC interfaces attached to the
+     * instance which are used for outbound connectivity. Only primary instances
+     * can have PSC interface attached. All the VMs created for the primary
+     * instance will share the same configurations. Currently we only support 0
+     * or 1 PSC interface.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig getPscInterfaceConfigs( + int index) { + return pscInterfaceConfigs_.get(index); + } + /** + * + * + *
+     * Optional. Configurations for setting up PSC interfaces attached to the
+     * instance which are used for outbound connectivity. Only primary instances
+     * can have PSC interface attached. All the VMs created for the primary
+     * instance will share the same configurations. Currently we only support 0
+     * or 1 PSC interface.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfigOrBuilder + getPscInterfaceConfigsOrBuilder(int index) { + return pscInterfaceConfigs_.get(index); + } + + public static final int OUTGOING_SERVICE_ATTACHMENT_LINKS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList outgoingServiceAttachmentLinks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Optional. List of service attachments that this instance has created
+     * endpoints to connect with. Currently, only a single outgoing service
+     * attachment is supported per instance.
+     * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the outgoingServiceAttachmentLinks. + */ + public com.google.protobuf.ProtocolStringList getOutgoingServiceAttachmentLinksList() { + return outgoingServiceAttachmentLinks_; + } + /** + * + * + *
+     * Optional. List of service attachments that this instance has created
+     * endpoints to connect with. Currently, only a single outgoing service
+     * attachment is supported per instance.
+     * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of outgoingServiceAttachmentLinks. + */ + public int getOutgoingServiceAttachmentLinksCount() { + return outgoingServiceAttachmentLinks_.size(); + } + /** + * + * + *
+     * Optional. List of service attachments that this instance has created
+     * endpoints to connect with. Currently, only a single outgoing service
+     * attachment is supported per instance.
+     * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The outgoingServiceAttachmentLinks at the given index. + */ + public java.lang.String getOutgoingServiceAttachmentLinks(int index) { + return outgoingServiceAttachmentLinks_.get(index); + } + /** + * + * + *
+     * Optional. List of service attachments that this instance has created
+     * endpoints to connect with. Currently, only a single outgoing service
+     * attachment is supported per instance.
+     * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the outgoingServiceAttachmentLinks at the given index. + */ + public com.google.protobuf.ByteString getOutgoingServiceAttachmentLinksBytes(int index) { + return outgoingServiceAttachmentLinks_.getByteString(index); + } + + public static final int PSC_ENABLED_FIELD_NUMBER = 6; + private boolean pscEnabled_ = false; + /** + * + * + *
+     * Optional. Whether PSC connectivity is enabled for this instance.
+     * This is populated by referencing the value from the parent cluster.
+     * 
+ * + * bool psc_enabled = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pscEnabled. + */ + @java.lang.Override + public boolean getPscEnabled() { + return pscEnabled_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAttachmentLink_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceAttachmentLink_); + } + for (int i = 0; i < allowedConsumerProjects_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, allowedConsumerProjects_.getRaw(i)); + } + for (int i = 0; i < allowedConsumerNetworks_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, allowedConsumerNetworks_.getRaw(i)); + } + for (int i = 0; i < pscInterfaceConfigs_.size(); i++) { + output.writeMessage(4, pscInterfaceConfigs_.get(i)); + } + for (int i = 0; i < outgoingServiceAttachmentLinks_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, outgoingServiceAttachmentLinks_.getRaw(i)); + } + if (pscEnabled_ != false) { + output.writeBool(6, pscEnabled_); + } + 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(serviceAttachmentLink_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceAttachmentLink_); + } + { + int dataSize = 0; + for (int i = 0; i < allowedConsumerProjects_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedConsumerProjects_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedConsumerProjectsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < allowedConsumerNetworks_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedConsumerNetworks_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedConsumerNetworksList().size(); + } + for (int i = 0; i < pscInterfaceConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, pscInterfaceConfigs_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < outgoingServiceAttachmentLinks_.size(); i++) { + dataSize += computeStringSizeNoTag(outgoingServiceAttachmentLinks_.getRaw(i)); + } + size += dataSize; + size += 1 * getOutgoingServiceAttachmentLinksList().size(); + } + if (pscEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, pscEnabled_); + } + 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.alloydb.v1beta.Instance.PscInstanceConfig)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig other = + (com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig) obj; + + if (!getServiceAttachmentLink().equals(other.getServiceAttachmentLink())) return false; + if (!getAllowedConsumerProjectsList().equals(other.getAllowedConsumerProjectsList())) + return false; + if (!getAllowedConsumerNetworksList().equals(other.getAllowedConsumerNetworksList())) + return false; + if (!getPscInterfaceConfigsList().equals(other.getPscInterfaceConfigsList())) return false; + if (!getOutgoingServiceAttachmentLinksList() + .equals(other.getOutgoingServiceAttachmentLinksList())) return false; + if (getPscEnabled() != other.getPscEnabled()) 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) + SERVICE_ATTACHMENT_LINK_FIELD_NUMBER; + hash = (53 * hash) + getServiceAttachmentLink().hashCode(); + if (getAllowedConsumerProjectsCount() > 0) { + hash = (37 * hash) + ALLOWED_CONSUMER_PROJECTS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedConsumerProjectsList().hashCode(); + } + if (getAllowedConsumerNetworksCount() > 0) { + hash = (37 * hash) + ALLOWED_CONSUMER_NETWORKS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedConsumerNetworksList().hashCode(); + } + if (getPscInterfaceConfigsCount() > 0) { + hash = (37 * hash) + PSC_INTERFACE_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getPscInterfaceConfigsList().hashCode(); + } + if (getOutgoingServiceAttachmentLinksCount() > 0) { + hash = (37 * hash) + OUTGOING_SERVICE_ATTACHMENT_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getOutgoingServiceAttachmentLinksList().hashCode(); + } + hash = (37 * hash) + PSC_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPscEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig 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.alloydb.v1beta.Instance.PscInstanceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig 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.alloydb.v1beta.Instance.PscInstanceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig 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.alloydb.v1beta.Instance.PscInstanceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig 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.alloydb.v1beta.Instance.PscInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig 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.alloydb.v1beta.Instance.PscInstanceConfig 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; + } + /** + * + * + *
+     * PscInstanceConfig contains PSC related configuration at an
+     * instance level.
+     * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.PscInstanceConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Instance.PscInstanceConfig) + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_PscInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_PscInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.class, + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serviceAttachmentLink_ = ""; + allowedConsumerProjects_ = com.google.protobuf.LazyStringArrayList.emptyList(); + allowedConsumerNetworks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (pscInterfaceConfigsBuilder_ == null) { + pscInterfaceConfigs_ = java.util.Collections.emptyList(); + } else { + pscInterfaceConfigs_ = null; + pscInterfaceConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + outgoingServiceAttachmentLinks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + pscEnabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_PscInstanceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig + getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig build() { + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig buildPartial() { + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig result = + new com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig result) { + if (pscInterfaceConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + pscInterfaceConfigs_ = java.util.Collections.unmodifiableList(pscInterfaceConfigs_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.pscInterfaceConfigs_ = pscInterfaceConfigs_; + } else { + result.pscInterfaceConfigs_ = pscInterfaceConfigsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceAttachmentLink_ = serviceAttachmentLink_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + allowedConsumerProjects_.makeImmutable(); + result.allowedConsumerProjects_ = allowedConsumerProjects_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + allowedConsumerNetworks_.makeImmutable(); + result.allowedConsumerNetworks_ = allowedConsumerNetworks_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + outgoingServiceAttachmentLinks_.makeImmutable(); + result.outgoingServiceAttachmentLinks_ = outgoingServiceAttachmentLinks_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pscEnabled_ = pscEnabled_; + } + } + + @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.alloydb.v1beta.Instance.PscInstanceConfig) { + return mergeFrom((com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig other) { + if (other + == com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.getDefaultInstance()) + return this; + if (!other.getServiceAttachmentLink().isEmpty()) { + serviceAttachmentLink_ = other.serviceAttachmentLink_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.allowedConsumerProjects_.isEmpty()) { + if (allowedConsumerProjects_.isEmpty()) { + allowedConsumerProjects_ = other.allowedConsumerProjects_; + bitField0_ |= 0x00000002; + } else { + ensureAllowedConsumerProjectsIsMutable(); + allowedConsumerProjects_.addAll(other.allowedConsumerProjects_); + } + onChanged(); + } + if (!other.allowedConsumerNetworks_.isEmpty()) { + if (allowedConsumerNetworks_.isEmpty()) { + allowedConsumerNetworks_ = other.allowedConsumerNetworks_; + bitField0_ |= 0x00000004; + } else { + ensureAllowedConsumerNetworksIsMutable(); + allowedConsumerNetworks_.addAll(other.allowedConsumerNetworks_); + } + onChanged(); + } + if (pscInterfaceConfigsBuilder_ == null) { + if (!other.pscInterfaceConfigs_.isEmpty()) { + if (pscInterfaceConfigs_.isEmpty()) { + pscInterfaceConfigs_ = other.pscInterfaceConfigs_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePscInterfaceConfigsIsMutable(); + pscInterfaceConfigs_.addAll(other.pscInterfaceConfigs_); + } + onChanged(); + } + } else { + if (!other.pscInterfaceConfigs_.isEmpty()) { + if (pscInterfaceConfigsBuilder_.isEmpty()) { + pscInterfaceConfigsBuilder_.dispose(); + pscInterfaceConfigsBuilder_ = null; + pscInterfaceConfigs_ = other.pscInterfaceConfigs_; + bitField0_ = (bitField0_ & ~0x00000008); + pscInterfaceConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPscInterfaceConfigsFieldBuilder() + : null; + } else { + pscInterfaceConfigsBuilder_.addAllMessages(other.pscInterfaceConfigs_); + } + } + } + if (!other.outgoingServiceAttachmentLinks_.isEmpty()) { + if (outgoingServiceAttachmentLinks_.isEmpty()) { + outgoingServiceAttachmentLinks_ = other.outgoingServiceAttachmentLinks_; + bitField0_ |= 0x00000010; + } else { + ensureOutgoingServiceAttachmentLinksIsMutable(); + outgoingServiceAttachmentLinks_.addAll(other.outgoingServiceAttachmentLinks_); + } + onChanged(); + } + if (other.getPscEnabled() != false) { + setPscEnabled(other.getPscEnabled()); + } + 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 10: + { + serviceAttachmentLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowedConsumerProjectsIsMutable(); + allowedConsumerProjects_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowedConsumerNetworksIsMutable(); + allowedConsumerNetworks_.add(s); + break; + } // case 26 + case 34: + { + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig m = + input.readMessage( + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.parser(), + extensionRegistry); + if (pscInterfaceConfigsBuilder_ == null) { + ensurePscInterfaceConfigsIsMutable(); + pscInterfaceConfigs_.add(m); + } else { + pscInterfaceConfigsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureOutgoingServiceAttachmentLinksIsMutable(); + outgoingServiceAttachmentLinks_.add(s); + break; + } // case 42 + case 48: + { + pscEnabled_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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 java.lang.Object serviceAttachmentLink_ = ""; + /** + * + * + *
+       * Output only. The service attachment created when Private
+       * Service Connect (PSC) is enabled for the instance.
+       * The name of the resource will be in the format of
+       * `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
+       * 
+ * + * string service_attachment_link = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceAttachmentLink. + */ + public java.lang.String getServiceAttachmentLink() { + java.lang.Object ref = serviceAttachmentLink_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAttachmentLink_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. The service attachment created when Private
+       * Service Connect (PSC) is enabled for the instance.
+       * The name of the resource will be in the format of
+       * `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
+       * 
+ * + * string service_attachment_link = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for serviceAttachmentLink. + */ + public com.google.protobuf.ByteString getServiceAttachmentLinkBytes() { + java.lang.Object ref = serviceAttachmentLink_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAttachmentLink_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. The service attachment created when Private
+       * Service Connect (PSC) is enabled for the instance.
+       * The name of the resource will be in the format of
+       * `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
+       * 
+ * + * string service_attachment_link = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The serviceAttachmentLink to set. + * @return This builder for chaining. + */ + public Builder setServiceAttachmentLink(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAttachmentLink_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The service attachment created when Private
+       * Service Connect (PSC) is enabled for the instance.
+       * The name of the resource will be in the format of
+       * `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
+       * 
+ * + * string service_attachment_link = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearServiceAttachmentLink() { + serviceAttachmentLink_ = getDefaultInstance().getServiceAttachmentLink(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The service attachment created when Private
+       * Service Connect (PSC) is enabled for the instance.
+       * The name of the resource will be in the format of
+       * `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
+       * 
+ * + * string service_attachment_link = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for serviceAttachmentLink to set. + * @return This builder for chaining. + */ + public Builder setServiceAttachmentLinkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAttachmentLink_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList allowedConsumerProjects_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAllowedConsumerProjectsIsMutable() { + if (!allowedConsumerProjects_.isModifiable()) { + allowedConsumerProjects_ = + new com.google.protobuf.LazyStringArrayList(allowedConsumerProjects_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Optional. List of consumer projects that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedConsumerProjects. + */ + public com.google.protobuf.ProtocolStringList getAllowedConsumerProjectsList() { + allowedConsumerProjects_.makeImmutable(); + return allowedConsumerProjects_; + } + /** + * + * + *
+       * Optional. List of consumer projects that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedConsumerProjects. + */ + public int getAllowedConsumerProjectsCount() { + return allowedConsumerProjects_.size(); + } + /** + * + * + *
+       * Optional. List of consumer projects that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedConsumerProjects at the given index. + */ + public java.lang.String getAllowedConsumerProjects(int index) { + return allowedConsumerProjects_.get(index); + } + /** + * + * + *
+       * Optional. List of consumer projects that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedConsumerProjects at the given index. + */ + public com.google.protobuf.ByteString getAllowedConsumerProjectsBytes(int index) { + return allowedConsumerProjects_.getByteString(index); + } + /** + * + * + *
+       * Optional. List of consumer projects that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The allowedConsumerProjects to set. + * @return This builder for chaining. + */ + public Builder setAllowedConsumerProjects(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedConsumerProjectsIsMutable(); + allowedConsumerProjects_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of consumer projects that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The allowedConsumerProjects to add. + * @return This builder for chaining. + */ + public Builder addAllowedConsumerProjects(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedConsumerProjectsIsMutable(); + allowedConsumerProjects_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of consumer projects that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The allowedConsumerProjects to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedConsumerProjects(java.lang.Iterable values) { + ensureAllowedConsumerProjectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedConsumerProjects_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of consumer projects that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowedConsumerProjects() { + allowedConsumerProjects_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of consumer projects that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the allowedConsumerProjects to add. + * @return This builder for chaining. + */ + public Builder addAllowedConsumerProjectsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedConsumerProjectsIsMutable(); + allowedConsumerProjects_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList allowedConsumerNetworks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAllowedConsumerNetworksIsMutable() { + if (!allowedConsumerNetworks_.isModifiable()) { + allowedConsumerNetworks_ = + new com.google.protobuf.LazyStringArrayList(allowedConsumerNetworks_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+       * Optional. List of consumer networks that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedConsumerNetworks. + */ + public com.google.protobuf.ProtocolStringList getAllowedConsumerNetworksList() { + allowedConsumerNetworks_.makeImmutable(); + return allowedConsumerNetworks_; + } + /** + * + * + *
+       * Optional. List of consumer networks that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedConsumerNetworks. + */ + public int getAllowedConsumerNetworksCount() { + return allowedConsumerNetworks_.size(); + } + /** + * + * + *
+       * Optional. List of consumer networks that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedConsumerNetworks at the given index. + */ + public java.lang.String getAllowedConsumerNetworks(int index) { + return allowedConsumerNetworks_.get(index); + } + /** + * + * + *
+       * Optional. List of consumer networks that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedConsumerNetworks at the given index. + */ + public com.google.protobuf.ByteString getAllowedConsumerNetworksBytes(int index) { + return allowedConsumerNetworks_.getByteString(index); + } + /** + * + * + *
+       * Optional. List of consumer networks that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The allowedConsumerNetworks to set. + * @return This builder for chaining. + */ + public Builder setAllowedConsumerNetworks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedConsumerNetworksIsMutable(); + allowedConsumerNetworks_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of consumer networks that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The allowedConsumerNetworks to add. + * @return This builder for chaining. + */ + public Builder addAllowedConsumerNetworks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedConsumerNetworksIsMutable(); + allowedConsumerNetworks_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of consumer networks that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The allowedConsumerNetworks to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedConsumerNetworks(java.lang.Iterable values) { + ensureAllowedConsumerNetworksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedConsumerNetworks_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of consumer networks that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowedConsumerNetworks() { + allowedConsumerNetworks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of consumer networks that are allowed to create
+       * PSC endpoints to service-attachments to this instance.
+       * 
+ * + * + * repeated string allowed_consumer_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the allowedConsumerNetworks to add. + * @return This builder for chaining. + */ + public Builder addAllowedConsumerNetworksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedConsumerNetworksIsMutable(); + allowedConsumerNetworks_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List + pscInterfaceConfigs_ = java.util.Collections.emptyList(); + + private void ensurePscInterfaceConfigsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + pscInterfaceConfigs_ = + new java.util.ArrayList( + pscInterfaceConfigs_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig, + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfigOrBuilder> + pscInterfaceConfigsBuilder_; + + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getPscInterfaceConfigsList() { + if (pscInterfaceConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pscInterfaceConfigs_); + } else { + return pscInterfaceConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getPscInterfaceConfigsCount() { + if (pscInterfaceConfigsBuilder_ == null) { + return pscInterfaceConfigs_.size(); + } else { + return pscInterfaceConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig getPscInterfaceConfigs( + int index) { + if (pscInterfaceConfigsBuilder_ == null) { + return pscInterfaceConfigs_.get(index); + } else { + return pscInterfaceConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPscInterfaceConfigs( + int index, com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig value) { + if (pscInterfaceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscInterfaceConfigsIsMutable(); + pscInterfaceConfigs_.set(index, value); + onChanged(); + } else { + pscInterfaceConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPscInterfaceConfigs( + int index, + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.Builder builderForValue) { + if (pscInterfaceConfigsBuilder_ == null) { + ensurePscInterfaceConfigsIsMutable(); + pscInterfaceConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + pscInterfaceConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPscInterfaceConfigs( + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig value) { + if (pscInterfaceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscInterfaceConfigsIsMutable(); + pscInterfaceConfigs_.add(value); + onChanged(); + } else { + pscInterfaceConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPscInterfaceConfigs( + int index, com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig value) { + if (pscInterfaceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscInterfaceConfigsIsMutable(); + pscInterfaceConfigs_.add(index, value); + onChanged(); + } else { + pscInterfaceConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPscInterfaceConfigs( + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.Builder builderForValue) { + if (pscInterfaceConfigsBuilder_ == null) { + ensurePscInterfaceConfigsIsMutable(); + pscInterfaceConfigs_.add(builderForValue.build()); + onChanged(); + } else { + pscInterfaceConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPscInterfaceConfigs( + int index, + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.Builder builderForValue) { + if (pscInterfaceConfigsBuilder_ == null) { + ensurePscInterfaceConfigsIsMutable(); + pscInterfaceConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + pscInterfaceConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllPscInterfaceConfigs( + java.lang.Iterable + values) { + if (pscInterfaceConfigsBuilder_ == null) { + ensurePscInterfaceConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pscInterfaceConfigs_); + onChanged(); + } else { + pscInterfaceConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPscInterfaceConfigs() { + if (pscInterfaceConfigsBuilder_ == null) { + pscInterfaceConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + pscInterfaceConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removePscInterfaceConfigs(int index) { + if (pscInterfaceConfigsBuilder_ == null) { + ensurePscInterfaceConfigsIsMutable(); + pscInterfaceConfigs_.remove(index); + onChanged(); + } else { + pscInterfaceConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.Builder + getPscInterfaceConfigsBuilder(int index) { + return getPscInterfaceConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfigOrBuilder + getPscInterfaceConfigsOrBuilder(int index) { + if (pscInterfaceConfigsBuilder_ == null) { + return pscInterfaceConfigs_.get(index); + } else { + return pscInterfaceConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfigOrBuilder> + getPscInterfaceConfigsOrBuilderList() { + if (pscInterfaceConfigsBuilder_ != null) { + return pscInterfaceConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pscInterfaceConfigs_); + } + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.Builder + addPscInterfaceConfigsBuilder() { + return getPscInterfaceConfigsFieldBuilder() + .addBuilder( + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.Builder + addPscInterfaceConfigsBuilder(int index) { + return getPscInterfaceConfigsFieldBuilder() + .addBuilder( + index, + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Configurations for setting up PSC interfaces attached to the
+       * instance which are used for outbound connectivity. Only primary instances
+       * can have PSC interface attached. All the VMs created for the primary
+       * instance will share the same configurations. Currently we only support 0
+       * or 1 PSC interface.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getPscInterfaceConfigsBuilderList() { + return getPscInterfaceConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig, + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfigOrBuilder> + getPscInterfaceConfigsFieldBuilder() { + if (pscInterfaceConfigsBuilder_ == null) { + pscInterfaceConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig, + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.PscInterfaceConfigOrBuilder>( + pscInterfaceConfigs_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + pscInterfaceConfigs_ = null; + } + return pscInterfaceConfigsBuilder_; + } + + private com.google.protobuf.LazyStringArrayList outgoingServiceAttachmentLinks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureOutgoingServiceAttachmentLinksIsMutable() { + if (!outgoingServiceAttachmentLinks_.isModifiable()) { + outgoingServiceAttachmentLinks_ = + new com.google.protobuf.LazyStringArrayList(outgoingServiceAttachmentLinks_); + } + bitField0_ |= 0x00000010; + } + /** + * + * + *
+       * Optional. List of service attachments that this instance has created
+       * endpoints to connect with. Currently, only a single outgoing service
+       * attachment is supported per instance.
+       * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the outgoingServiceAttachmentLinks. + */ + public com.google.protobuf.ProtocolStringList getOutgoingServiceAttachmentLinksList() { + outgoingServiceAttachmentLinks_.makeImmutable(); + return outgoingServiceAttachmentLinks_; + } + /** + * + * + *
+       * Optional. List of service attachments that this instance has created
+       * endpoints to connect with. Currently, only a single outgoing service
+       * attachment is supported per instance.
+       * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of outgoingServiceAttachmentLinks. + */ + public int getOutgoingServiceAttachmentLinksCount() { + return outgoingServiceAttachmentLinks_.size(); + } + /** + * + * + *
+       * Optional. List of service attachments that this instance has created
+       * endpoints to connect with. Currently, only a single outgoing service
+       * attachment is supported per instance.
+       * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The outgoingServiceAttachmentLinks at the given index. + */ + public java.lang.String getOutgoingServiceAttachmentLinks(int index) { + return outgoingServiceAttachmentLinks_.get(index); + } + /** + * + * + *
+       * Optional. List of service attachments that this instance has created
+       * endpoints to connect with. Currently, only a single outgoing service
+       * attachment is supported per instance.
+       * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the outgoingServiceAttachmentLinks at the given index. + */ + public com.google.protobuf.ByteString getOutgoingServiceAttachmentLinksBytes(int index) { + return outgoingServiceAttachmentLinks_.getByteString(index); + } + /** + * + * + *
+       * Optional. List of service attachments that this instance has created
+       * endpoints to connect with. Currently, only a single outgoing service
+       * attachment is supported per instance.
+       * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The outgoingServiceAttachmentLinks to set. + * @return This builder for chaining. + */ + public Builder setOutgoingServiceAttachmentLinks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutgoingServiceAttachmentLinksIsMutable(); + outgoingServiceAttachmentLinks_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of service attachments that this instance has created
+       * endpoints to connect with. Currently, only a single outgoing service
+       * attachment is supported per instance.
+       * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The outgoingServiceAttachmentLinks to add. + * @return This builder for chaining. + */ + public Builder addOutgoingServiceAttachmentLinks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutgoingServiceAttachmentLinksIsMutable(); + outgoingServiceAttachmentLinks_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of service attachments that this instance has created
+       * endpoints to connect with. Currently, only a single outgoing service
+       * attachment is supported per instance.
+       * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The outgoingServiceAttachmentLinks to add. + * @return This builder for chaining. + */ + public Builder addAllOutgoingServiceAttachmentLinks( + java.lang.Iterable values) { + ensureOutgoingServiceAttachmentLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, outgoingServiceAttachmentLinks_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of service attachments that this instance has created
+       * endpoints to connect with. Currently, only a single outgoing service
+       * attachment is supported per instance.
+       * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearOutgoingServiceAttachmentLinks() { + outgoingServiceAttachmentLinks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of service attachments that this instance has created
+       * endpoints to connect with. Currently, only a single outgoing service
+       * attachment is supported per instance.
+       * 
+ * + * + * repeated string outgoing_service_attachment_links = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the outgoingServiceAttachmentLinks to add. + * @return This builder for chaining. + */ + public Builder addOutgoingServiceAttachmentLinksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureOutgoingServiceAttachmentLinksIsMutable(); + outgoingServiceAttachmentLinks_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean pscEnabled_; + /** + * + * + *
+       * Optional. Whether PSC connectivity is enabled for this instance.
+       * This is populated by referencing the value from the parent cluster.
+       * 
+ * + * bool psc_enabled = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pscEnabled. + */ + @java.lang.Override + public boolean getPscEnabled() { + return pscEnabled_; + } + /** + * + * + *
+       * Optional. Whether PSC connectivity is enabled for this instance.
+       * This is populated by referencing the value from the parent cluster.
+       * 
+ * + * bool psc_enabled = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pscEnabled to set. + * @return This builder for chaining. + */ + public Builder setPscEnabled(boolean value) { + + pscEnabled_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Whether PSC connectivity is enabled for this instance.
+       * This is populated by referencing the value from the parent cluster.
+       * 
+ * + * bool psc_enabled = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPscEnabled() { + bitField0_ = (bitField0_ & ~0x00000020); + pscEnabled_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.alloydb.v1beta.Instance.PscInstanceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1beta.Instance.PscInstanceConfig) + private static final com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig(); + } + + public static com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PscInstanceConfig 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.alloydb.v1beta.Instance.PscInstanceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InstanceNetworkConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAuthorizedExternalNetworksList(); + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + getAuthorizedExternalNetworks(int index); + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAuthorizedExternalNetworksCount(); + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder> + getAuthorizedExternalNetworksOrBuilderList(); + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetworkOrBuilder + getAuthorizedExternalNetworksOrBuilder(int index); + + /** + * + * + *
+     * Optional. Enabling public ip for the instance.
+     * 
+ * + * bool enable_public_ip = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePublicIp. + */ + boolean getEnablePublicIp(); + } + /** + * + * + *
+   * Metadata related to instance level network configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig} + */ + public static final class InstanceNetworkConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig) + InstanceNetworkConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstanceNetworkConfig.newBuilder() to construct. + private InstanceNetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstanceNetworkConfig() { + authorizedExternalNetworks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstanceNetworkConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.class, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.Builder.class); + } + + public interface AuthorizedNetworkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * CIDR range for one authorzied network of the instance.
+       * 
+ * + * string cidr_range = 1 [(.google.api.field_info) = { ... } + * + * @return The cidrRange. + */ + java.lang.String getCidrRange(); + /** + * + * + *
+       * CIDR range for one authorzied network of the instance.
+       * 
+ * + * string cidr_range = 1 [(.google.api.field_info) = { ... } + * + * @return The bytes for cidrRange. + */ + com.google.protobuf.ByteString getCidrRangeBytes(); + } + /** + * + * + *
+     * AuthorizedNetwork contains metadata for an authorized network.
+     * 
+ * + * Protobuf type {@code + * google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork} + */ + public static final class AuthorizedNetwork extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork) + AuthorizedNetworkOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthorizedNetwork.newBuilder() to construct. + private AuthorizedNetwork(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AuthorizedNetwork() { + cidrRange_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuthorizedNetwork(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_AuthorizedNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .class, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder.class); + } + + public static final int CIDR_RANGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cidrRange_ = ""; + /** + * + * + *
+       * CIDR range for one authorzied network of the instance.
+       * 
+ * + * string cidr_range = 1 [(.google.api.field_info) = { ... } + * + * @return The cidrRange. + */ + @java.lang.Override + public java.lang.String getCidrRange() { + java.lang.Object ref = cidrRange_; + 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(); + cidrRange_ = s; + return s; + } + } + /** + * + * + *
+       * CIDR range for one authorzied network of the instance.
+       * 
+ * + * string cidr_range = 1 [(.google.api.field_info) = { ... } + * + * @return The bytes for cidrRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCidrRangeBytes() { + java.lang.Object ref = cidrRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cidrRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cidrRange_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cidrRange_); + } + 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(cidrRange_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cidrRange_); + } + 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.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork other = + (com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork) obj; + + if (!getCidrRange().equals(other.getCidrRange())) 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) + CIDR_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getCidrRange().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + 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.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + 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.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + 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.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + 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.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + 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.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + 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; + } + /** + * + * + *
+       * AuthorizedNetwork contains metadata for an authorized network.
+       * 
+ * + * Protobuf type {@code + * google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork) + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_AuthorizedNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .class, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder.class); + } + + // Construct using + // com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cidrRange_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + build() { + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + buildPartial() { + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork result = + new com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cidrRange_ = cidrRange_; + } + } + + @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.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork) { + return mergeFrom( + (com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + other) { + if (other + == com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .getDefaultInstance()) return this; + if (!other.getCidrRange().isEmpty()) { + cidrRange_ = other.cidrRange_; + bitField0_ |= 0x00000001; + onChanged(); + } + 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 10: + { + cidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + 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 java.lang.Object cidrRange_ = ""; + /** + * + * + *
+         * CIDR range for one authorzied network of the instance.
+         * 
+ * + * string cidr_range = 1 [(.google.api.field_info) = { ... } + * + * @return The cidrRange. + */ + public java.lang.String getCidrRange() { + java.lang.Object ref = cidrRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cidrRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * CIDR range for one authorzied network of the instance.
+         * 
+ * + * string cidr_range = 1 [(.google.api.field_info) = { ... } + * + * @return The bytes for cidrRange. + */ + public com.google.protobuf.ByteString getCidrRangeBytes() { + java.lang.Object ref = cidrRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cidrRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * CIDR range for one authorzied network of the instance.
+         * 
+ * + * string cidr_range = 1 [(.google.api.field_info) = { ... } + * + * @param value The cidrRange to set. + * @return This builder for chaining. + */ + public Builder setCidrRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cidrRange_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * CIDR range for one authorzied network of the instance.
+         * 
+ * + * string cidr_range = 1 [(.google.api.field_info) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearCidrRange() { + cidrRange_ = getDefaultInstance().getCidrRange(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * CIDR range for one authorzied network of the instance.
+         * 
+ * + * string cidr_range = 1 [(.google.api.field_info) = { ... } + * + * @param value The bytes for cidrRange to set. + * @return This builder for chaining. + */ + public Builder setCidrRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cidrRange_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork) + private static final com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + .AuthorizedNetwork + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork(); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthorizedNetwork 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.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int AUTHORIZED_EXTERNAL_NETWORKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork> + authorizedExternalNetworks_; + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork> + getAuthorizedExternalNetworksList() { + return authorizedExternalNetworks_; + } + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder> + getAuthorizedExternalNetworksOrBuilderList() { + return authorizedExternalNetworks_; + } + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getAuthorizedExternalNetworksCount() { + return authorizedExternalNetworks_.size(); + } + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + getAuthorizedExternalNetworks(int index) { + return authorizedExternalNetworks_.get(index); + } + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetworkOrBuilder + getAuthorizedExternalNetworksOrBuilder(int index) { + return authorizedExternalNetworks_.get(index); + } + + public static final int ENABLE_PUBLIC_IP_FIELD_NUMBER = 2; + private boolean enablePublicIp_ = false; + /** + * + * + *
+     * Optional. Enabling public ip for the instance.
+     * 
+ * + * bool enable_public_ip = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePublicIp. + */ + @java.lang.Override + public boolean getEnablePublicIp() { + return enablePublicIp_; + } + + 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 { + for (int i = 0; i < authorizedExternalNetworks_.size(); i++) { + output.writeMessage(1, authorizedExternalNetworks_.get(i)); + } + if (enablePublicIp_ != false) { + output.writeBool(2, enablePublicIp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < authorizedExternalNetworks_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, authorizedExternalNetworks_.get(i)); + } + if (enablePublicIp_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enablePublicIp_); + } + 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.alloydb.v1beta.Instance.InstanceNetworkConfig)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig other = + (com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig) obj; + + if (!getAuthorizedExternalNetworksList().equals(other.getAuthorizedExternalNetworksList())) + return false; + if (getEnablePublicIp() != other.getEnablePublicIp()) 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(); + if (getAuthorizedExternalNetworksCount() > 0) { + hash = (37 * hash) + AUTHORIZED_EXTERNAL_NETWORKS_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizedExternalNetworksList().hashCode(); + } + hash = (37 * hash) + ENABLE_PUBLIC_IP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePublicIp()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig 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.alloydb.v1beta.Instance.InstanceNetworkConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig 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.alloydb.v1beta.Instance.InstanceNetworkConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig 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.alloydb.v1beta.Instance.InstanceNetworkConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig 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.alloydb.v1beta.Instance.InstanceNetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig 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.alloydb.v1beta.Instance.InstanceNetworkConfig 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; + } + /** + * + * + *
+     * Metadata related to instance level network configuration.
+     * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig) + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.class, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (authorizedExternalNetworksBuilder_ == null) { + authorizedExternalNetworks_ = java.util.Collections.emptyList(); + } else { + authorizedExternalNetworks_ = null; + authorizedExternalNetworksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + enablePublicIp_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig build() { + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig buildPartial() { + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig result = + new com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig result) { + if (authorizedExternalNetworksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + authorizedExternalNetworks_ = + java.util.Collections.unmodifiableList(authorizedExternalNetworks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.authorizedExternalNetworks_ = authorizedExternalNetworks_; + } else { + result.authorizedExternalNetworks_ = authorizedExternalNetworksBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enablePublicIp_ = enablePublicIp_; + } + } + + @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.alloydb.v1beta.Instance.InstanceNetworkConfig) { + return mergeFrom((com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig other) { + if (other + == com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.getDefaultInstance()) + return this; + if (authorizedExternalNetworksBuilder_ == null) { + if (!other.authorizedExternalNetworks_.isEmpty()) { + if (authorizedExternalNetworks_.isEmpty()) { + authorizedExternalNetworks_ = other.authorizedExternalNetworks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAuthorizedExternalNetworksIsMutable(); + authorizedExternalNetworks_.addAll(other.authorizedExternalNetworks_); + } + onChanged(); + } + } else { + if (!other.authorizedExternalNetworks_.isEmpty()) { + if (authorizedExternalNetworksBuilder_.isEmpty()) { + authorizedExternalNetworksBuilder_.dispose(); + authorizedExternalNetworksBuilder_ = null; + authorizedExternalNetworks_ = other.authorizedExternalNetworks_; + bitField0_ = (bitField0_ & ~0x00000001); + authorizedExternalNetworksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAuthorizedExternalNetworksFieldBuilder() + : null; + } else { + authorizedExternalNetworksBuilder_.addAllMessages(other.authorizedExternalNetworks_); + } + } + } + if (other.getEnablePublicIp() != false) { + setEnablePublicIp(other.getEnablePublicIp()); + } + 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 10: + { + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + m = + input.readMessage( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + .AuthorizedNetwork.parser(), + extensionRegistry); + if (authorizedExternalNetworksBuilder_ == null) { + ensureAuthorizedExternalNetworksIsMutable(); + authorizedExternalNetworks_.add(m); + } else { + authorizedExternalNetworksBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + enablePublicIp_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 java.util.List< + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork> + authorizedExternalNetworks_ = java.util.Collections.emptyList(); + + private void ensureAuthorizedExternalNetworksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + authorizedExternalNetworks_ = + new java.util.ArrayList< + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork>( + authorizedExternalNetworks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder> + authorizedExternalNetworksBuilder_; + + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork> + getAuthorizedExternalNetworksList() { + if (authorizedExternalNetworksBuilder_ == null) { + return java.util.Collections.unmodifiableList(authorizedExternalNetworks_); + } else { + return authorizedExternalNetworksBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAuthorizedExternalNetworksCount() { + if (authorizedExternalNetworksBuilder_ == null) { + return authorizedExternalNetworks_.size(); + } else { + return authorizedExternalNetworksBuilder_.getCount(); + } + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + getAuthorizedExternalNetworks(int index) { + if (authorizedExternalNetworksBuilder_ == null) { + return authorizedExternalNetworks_.get(index); + } else { + return authorizedExternalNetworksBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAuthorizedExternalNetworks( + int index, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork value) { + if (authorizedExternalNetworksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizedExternalNetworksIsMutable(); + authorizedExternalNetworks_.set(index, value); + onChanged(); + } else { + authorizedExternalNetworksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAuthorizedExternalNetworks( + int index, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork.Builder + builderForValue) { + if (authorizedExternalNetworksBuilder_ == null) { + ensureAuthorizedExternalNetworksIsMutable(); + authorizedExternalNetworks_.set(index, builderForValue.build()); + onChanged(); + } else { + authorizedExternalNetworksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuthorizedExternalNetworks( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork value) { + if (authorizedExternalNetworksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizedExternalNetworksIsMutable(); + authorizedExternalNetworks_.add(value); + onChanged(); + } else { + authorizedExternalNetworksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuthorizedExternalNetworks( + int index, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork value) { + if (authorizedExternalNetworksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizedExternalNetworksIsMutable(); + authorizedExternalNetworks_.add(index, value); + onChanged(); + } else { + authorizedExternalNetworksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuthorizedExternalNetworks( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork.Builder + builderForValue) { + if (authorizedExternalNetworksBuilder_ == null) { + ensureAuthorizedExternalNetworksIsMutable(); + authorizedExternalNetworks_.add(builderForValue.build()); + onChanged(); + } else { + authorizedExternalNetworksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuthorizedExternalNetworks( + int index, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork.Builder + builderForValue) { + if (authorizedExternalNetworksBuilder_ == null) { + ensureAuthorizedExternalNetworksIsMutable(); + authorizedExternalNetworks_.add(index, builderForValue.build()); + onChanged(); + } else { + authorizedExternalNetworksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAuthorizedExternalNetworks( + java.lang.Iterable< + ? extends + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + .AuthorizedNetwork> + values) { + if (authorizedExternalNetworksBuilder_ == null) { + ensureAuthorizedExternalNetworksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, authorizedExternalNetworks_); + onChanged(); + } else { + authorizedExternalNetworksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAuthorizedExternalNetworks() { + if (authorizedExternalNetworksBuilder_ == null) { + authorizedExternalNetworks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + authorizedExternalNetworksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAuthorizedExternalNetworks(int index) { + if (authorizedExternalNetworksBuilder_ == null) { + ensureAuthorizedExternalNetworksIsMutable(); + authorizedExternalNetworks_.remove(index); + onChanged(); + } else { + authorizedExternalNetworksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder + getAuthorizedExternalNetworksBuilder(int index) { + return getAuthorizedExternalNetworksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder + getAuthorizedExternalNetworksOrBuilder(int index) { + if (authorizedExternalNetworksBuilder_ == null) { + return authorizedExternalNetworks_.get(index); + } else { + return authorizedExternalNetworksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder> + getAuthorizedExternalNetworksOrBuilderList() { + if (authorizedExternalNetworksBuilder_ != null) { + return authorizedExternalNetworksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(authorizedExternalNetworks_); + } + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder + addAuthorizedExternalNetworksBuilder() { + return getAuthorizedExternalNetworksFieldBuilder() + .addBuilder( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .getDefaultInstance()); + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder + addAuthorizedExternalNetworksBuilder(int index) { + return getAuthorizedExternalNetworksFieldBuilder() + .addBuilder( + index, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .getDefaultInstance()); + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder> + getAuthorizedExternalNetworksBuilderList() { + return getAuthorizedExternalNetworksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder> + getAuthorizedExternalNetworksFieldBuilder() { + if (authorizedExternalNetworksBuilder_ == null) { + authorizedExternalNetworksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder>( + authorizedExternalNetworks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + authorizedExternalNetworks_ = null; + } + return authorizedExternalNetworksBuilder_; + } + + private boolean enablePublicIp_; + /** + * + * + *
+       * Optional. Enabling public ip for the instance.
+       * 
+ * + * bool enable_public_ip = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePublicIp. + */ + @java.lang.Override + public boolean getEnablePublicIp() { + return enablePublicIp_; + } + /** + * + * + *
+       * Optional. Enabling public ip for the instance.
+       * 
+ * + * bool enable_public_ip = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enablePublicIp to set. + * @return This builder for chaining. + */ + public Builder setEnablePublicIp(boolean value) { + + enablePublicIp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Enabling public ip for the instance.
+       * 
+ * + * bool enable_public_ip = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnablePublicIp() { + bitField0_ = (bitField0_ & ~0x00000002); + enablePublicIp_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig) + private static final com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig(); + } + + public static com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceNetworkConfig 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.alloydb.v1beta.Instance.InstanceNetworkConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The name of the instance resource with the format:
+   *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
+   * where the cluster and instance ID segments should satisfy the regex
+   * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
+   * lowercase letters, numbers, and dashes, starting with a letter, and ending
+   * with a letter or number. For more details see https://google.aip.dev/122.
+   * The prefix of the instance resource name is the name of the parent
+   * resource:
+   *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the instance resource with the format:
+   *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
+   * where the cluster and instance ID segments should satisfy the regex
+   * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
+   * lowercase letters, numbers, and dashes, starting with a letter, and ending
+   * with a letter or number. For more details see https://google.aip.dev/122.
+   * The prefix of the instance resource name is the name of the parent
+   * resource:
+   *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * User-settable and human-readable display name for the Instance.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * User-settable and human-readable display name for the Instance.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.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; + } + } + + public static final int UID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + * + * + *
+   * Output only. The system-generated UID of the resource. The UID is assigned
+   * when the resource is created, and it is retained until it is deleted.
+   * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + 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(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The system-generated UID of the resource. The UID is assigned
+   * when the resource is created, and it is retained until it is deleted.
+   * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DELETE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp deleteTime_; + /** + * + * + *
+   * Output only. Delete time stamp
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteTime field is set. + */ + @java.lang.Override + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Delete time stamp
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeleteTime() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + /** + * + * + *
+   * Output only. Delete time stamp
+   * 
+ * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; + } + + public static final int LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + 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_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 7; + */ + @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(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 7; + */ + @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; + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 7; + */ + @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 static final int STATE_FIELD_NUMBER = 8; + private int state_ = 0; + /** + * + * + *
+   * Output only. The current serving state of the instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current serving state of the instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.State getState() { + com.google.cloud.alloydb.v1beta.Instance.State result = + com.google.cloud.alloydb.v1beta.Instance.State.forNumber(state_); + return result == null ? com.google.cloud.alloydb.v1beta.Instance.State.UNRECOGNIZED : result; + } + + public static final int INSTANCE_TYPE_FIELD_NUMBER = 9; + private int instanceType_ = 0; + /** + * + * + *
+   * Required. The type of the instance. Specified at creation time.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for instanceType. + */ + @java.lang.Override + public int getInstanceTypeValue() { + return instanceType_; + } + /** + * + * + *
+   * Required. The type of the instance. Specified at creation time.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceType. + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.InstanceType getInstanceType() { + com.google.cloud.alloydb.v1beta.Instance.InstanceType result = + com.google.cloud.alloydb.v1beta.Instance.InstanceType.forNumber(instanceType_); + return result == null + ? com.google.cloud.alloydb.v1beta.Instance.InstanceType.UNRECOGNIZED + : result; + } + + public static final int MACHINE_CONFIG_FIELD_NUMBER = 10; + private com.google.cloud.alloydb.v1beta.Instance.MachineConfig machineConfig_; + /** + * + * + *
+   * Configurations for the machines that host the underlying
+   * database engine.
+   * 
+ * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + * + * @return Whether the machineConfig field is set. + */ + @java.lang.Override + public boolean hasMachineConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Configurations for the machines that host the underlying
+   * database engine.
+   * 
+ * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + * + * @return The machineConfig. + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.MachineConfig getMachineConfig() { + return machineConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance() + : machineConfig_; + } + /** + * + * + *
+   * Configurations for the machines that host the underlying
+   * database engine.
+   * 
+ * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder + getMachineConfigOrBuilder() { + return machineConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance() + : machineConfig_; + } + + public static final int AVAILABILITY_TYPE_FIELD_NUMBER = 11; + private int availabilityType_ = 0; + /** + * + * + *
+   * Availability type of an Instance.
+   * If empty, defaults to REGIONAL for primary instances.
+   * For read pools, availability_type is always UNSPECIFIED. Instances in the
+   * read pools are evenly distributed across available zones within the region
+   * (i.e. read pools with more than one node will have a node in at
+   * least two zones).
+   * 
+ * + * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; + * + * @return The enum numeric value on the wire for availabilityType. + */ + @java.lang.Override + public int getAvailabilityTypeValue() { + return availabilityType_; + } + /** + * + * + *
+   * Availability type of an Instance.
+   * If empty, defaults to REGIONAL for primary instances.
+   * For read pools, availability_type is always UNSPECIFIED. Instances in the
+   * read pools are evenly distributed across available zones within the region
+   * (i.e. read pools with more than one node will have a node in at
+   * least two zones).
+   * 
+ * + * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; + * + * @return The availabilityType. + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.AvailabilityType getAvailabilityType() { + com.google.cloud.alloydb.v1beta.Instance.AvailabilityType result = + com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.forNumber(availabilityType_); + return result == null + ? com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.UNRECOGNIZED + : result; + } + + public static final int GCE_ZONE_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object gceZone_ = ""; + /** + * + * + *
+   * The Compute Engine zone that the instance should serve from, per
+   * https://cloud.google.com/compute/docs/regions-zones
+   * This can ONLY be specified for ZONAL instances.
+   * If present for a REGIONAL instance, an error will be thrown.
+   * If this is absent for a ZONAL instance, instance is created in a random
+   * zone with available capacity.
+   * 
+ * + * string gce_zone = 12; + * + * @return The gceZone. + */ + @java.lang.Override + public java.lang.String getGceZone() { + java.lang.Object ref = gceZone_; + 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(); + gceZone_ = s; + return s; + } + } + /** + * + * + *
+   * The Compute Engine zone that the instance should serve from, per
+   * https://cloud.google.com/compute/docs/regions-zones
+   * This can ONLY be specified for ZONAL instances.
+   * If present for a REGIONAL instance, an error will be thrown.
+   * If this is absent for a ZONAL instance, instance is created in a random
+   * zone with available capacity.
+   * 
+ * + * string gce_zone = 12; + * + * @return The bytes for gceZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGceZoneBytes() { + java.lang.Object ref = gceZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gceZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_FLAGS_FIELD_NUMBER = 13; + + private static final class DatabaseFlagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_DatabaseFlagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField databaseFlags_; + + private com.google.protobuf.MapField + internalGetDatabaseFlags() { + if (databaseFlags_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DatabaseFlagsDefaultEntryHolder.defaultEntry); + } + return databaseFlags_; + } + + public int getDatabaseFlagsCount() { + return internalGetDatabaseFlags().getMap().size(); + } + /** + * + * + *
+   * Database flags. Set at instance level.
+   *  * They are copied from primary instance on read instance creation.
+   *  * Read instances can set new or override existing flags that are relevant
+   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
+   *    set on read instance may or may not be present on primary.
+   *
+   *
+   * This is a list of "key": "value" pairs.
+   * "key": The name of the flag. These flags are passed at instance setup time,
+   * so include both server options and system variables for Postgres. Flags are
+   * specified with underscores, not hyphens.
+   * "value": The value of the flag. Booleans are set to **on** for true
+   * and **off** for false. This field must be omitted if the flag
+   * doesn't take a value.
+   * 
+ * + * map<string, string> database_flags = 13; + */ + @java.lang.Override + public boolean containsDatabaseFlags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetDatabaseFlags().getMap().containsKey(key); + } + /** Use {@link #getDatabaseFlagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDatabaseFlags() { + return getDatabaseFlagsMap(); + } + /** + * + * + *
+   * Database flags. Set at instance level.
+   *  * They are copied from primary instance on read instance creation.
+   *  * Read instances can set new or override existing flags that are relevant
+   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
+   *    set on read instance may or may not be present on primary.
+   *
+   *
+   * This is a list of "key": "value" pairs.
+   * "key": The name of the flag. These flags are passed at instance setup time,
+   * so include both server options and system variables for Postgres. Flags are
+   * specified with underscores, not hyphens.
+   * "value": The value of the flag. Booleans are set to **on** for true
+   * and **off** for false. This field must be omitted if the flag
+   * doesn't take a value.
+   * 
+ * + * map<string, string> database_flags = 13; + */ + @java.lang.Override + public java.util.Map getDatabaseFlagsMap() { + return internalGetDatabaseFlags().getMap(); + } + /** + * + * + *
+   * Database flags. Set at instance level.
+   *  * They are copied from primary instance on read instance creation.
+   *  * Read instances can set new or override existing flags that are relevant
+   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
+   *    set on read instance may or may not be present on primary.
+   *
+   *
+   * This is a list of "key": "value" pairs.
+   * "key": The name of the flag. These flags are passed at instance setup time,
+   * so include both server options and system variables for Postgres. Flags are
+   * specified with underscores, not hyphens.
+   * "value": The value of the flag. Booleans are set to **on** for true
+   * and **off** for false. This field must be omitted if the flag
+   * doesn't take a value.
+   * 
+ * + * map<string, string> database_flags = 13; + */ + @java.lang.Override + public /* nullable */ java.lang.String getDatabaseFlagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDatabaseFlags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Database flags. Set at instance level.
+   *  * They are copied from primary instance on read instance creation.
+   *  * Read instances can set new or override existing flags that are relevant
+   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
+   *    set on read instance may or may not be present on primary.
+   *
+   *
+   * This is a list of "key": "value" pairs.
+   * "key": The name of the flag. These flags are passed at instance setup time,
+   * so include both server options and system variables for Postgres. Flags are
+   * specified with underscores, not hyphens.
+   * "value": The value of the flag. Booleans are set to **on** for true
+   * and **off** for false. This field must be omitted if the flag
+   * doesn't take a value.
+   * 
+ * + * map<string, string> database_flags = 13; + */ + @java.lang.Override + public java.lang.String getDatabaseFlagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDatabaseFlags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int WRITABLE_NODE_FIELD_NUMBER = 19; + private com.google.cloud.alloydb.v1beta.Instance.Node writableNode_; + /** + * + * + *
+   * Output only. This is set for the read-write VM of the PRIMARY instance
+   * only.
    * 
* * @@ -6875,7 +12523,8 @@ public boolean hasQueryInsightsConfig() { * * *
-   * Read pool specific config.
+   * Read pool instance configuration.
+   * This is required if the value of instanceType is READ_POOL.
    * 
* * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; @@ -6890,7 +12539,8 @@ public boolean hasReadPoolConfig() { * * *
-   * Read pool specific config.
+   * Read pool instance configuration.
+   * This is required if the value of instanceType is READ_POOL.
    * 
* * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; @@ -6907,7 +12557,8 @@ public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig getReadPoolConfig * * *
-   * Read pool specific config.
+   * Read pool instance configuration.
+   * This is required if the value of instanceType is READ_POOL.
    * 
* * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; @@ -6973,6 +12624,61 @@ public com.google.protobuf.ByteString getIpAddressBytes() { } } + public static final int PUBLIC_IP_ADDRESS_FIELD_NUMBER = 27; + + @SuppressWarnings("serial") + private volatile java.lang.Object publicIpAddress_ = ""; + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicIpAddress. + */ + @java.lang.Override + public java.lang.String getPublicIpAddress() { + java.lang.Object ref = publicIpAddress_; + 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(); + publicIpAddress_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublicIpAddressBytes() { + java.lang.Object ref = publicIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int RECONCILING_FIELD_NUMBER = 16; private boolean reconciling_ = false; /** @@ -7259,19 +12965,154 @@ public boolean hasClientConnectionConfig() { * * *
-   * Optional. Client connection specific configurations
+   * Optional. Client connection specific configurations
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigOrBuilder + getClientConnectionConfigOrBuilder() { + return clientConnectionConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.getDefaultInstance() + : clientConnectionConfig_; + } + + public static final int SATISFIES_PZS_FIELD_NUMBER = 24; + private boolean satisfiesPzs_ = false; + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + + public static final int PSC_INSTANCE_CONFIG_FIELD_NUMBER = 28; + private com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig pscInstanceConfig_; + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pscInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasPscInstanceConfig() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pscInstanceConfig. + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig getPscInstanceConfig() { + return pscInstanceConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.getDefaultInstance() + : pscInstanceConfig_; + } + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfigOrBuilder + getPscInstanceConfigOrBuilder() { + return pscInstanceConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.getDefaultInstance() + : pscInstanceConfig_; + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 29; + private com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig networkConfig_; + /** + * + * + *
+   * Optional. Instance level network configuration.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+   * Optional. Instance level network configuration.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig getNetworkConfig() { + return networkConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.getDefaultInstance() + : networkConfig_; + } + /** + * + * + *
+   * Optional. Instance level network configuration.
    * 
* * - * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigOrBuilder - getClientConnectionConfigOrBuilder() { - return clientConnectionConfig_ == null - ? com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.getDefaultInstance() - : clientConnectionConfig_; + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfigOrBuilder + getNetworkConfigOrBuilder() { + return networkConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.getDefaultInstance() + : networkConfig_; } private byte memoizedIsInitialized = -1; @@ -7358,6 +13199,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000100) != 0)) { output.writeMessage(23, getClientConnectionConfig()); } + if (satisfiesPzs_ != false) { + output.writeBool(24, satisfiesPzs_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIpAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 27, publicIpAddress_); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(28, getPscInstanceConfig()); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(29, getNetworkConfig()); + } getUnknownFields().writeTo(output); } @@ -7463,6 +13316,18 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getClientConnectionConfig()); } + if (satisfiesPzs_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(24, satisfiesPzs_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIpAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, publicIpAddress_); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getPscInstanceConfig()); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, getNetworkConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -7517,6 +13382,7 @@ public boolean equals(final java.lang.Object obj) { if (!getReadPoolConfig().equals(other.getReadPoolConfig())) return false; } if (!getIpAddress().equals(other.getIpAddress())) return false; + if (!getPublicIpAddress().equals(other.getPublicIpAddress())) return false; if (getReconciling() != other.getReconciling()) return false; if (!getEtag().equals(other.getEtag())) return false; if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; @@ -7528,6 +13394,15 @@ public boolean equals(final java.lang.Object obj) { if (hasClientConnectionConfig()) { if (!getClientConnectionConfig().equals(other.getClientConnectionConfig())) return false; } + if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; + if (hasPscInstanceConfig() != other.hasPscInstanceConfig()) return false; + if (hasPscInstanceConfig()) { + if (!getPscInstanceConfig().equals(other.getPscInstanceConfig())) return false; + } + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig().equals(other.getNetworkConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7595,6 +13470,8 @@ public int hashCode() { } hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PUBLIC_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getPublicIpAddress().hashCode(); hash = (37 * hash) + RECONCILING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReconciling()); hash = (37 * hash) + ETAG_FIELD_NUMBER; @@ -7611,6 +13488,16 @@ public int hashCode() { hash = (37 * hash) + CLIENT_CONNECTION_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getClientConnectionConfig().hashCode(); } + hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); + if (hasPscInstanceConfig()) { + hash = (37 * hash) + PSC_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPscInstanceConfig().hashCode(); + } + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -7663,1023 +13550,1610 @@ public static com.google.cloud.alloydb.v1beta.Instance parseFrom( PARSER, input, extensionRegistry); } - public static com.google.cloud.alloydb.v1beta.Instance parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + public static com.google.cloud.alloydb.v1beta.Instance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Instance 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.alloydb.v1beta.Instance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.Instance 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.alloydb.v1beta.Instance 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; + } + /** + * + * + *
+   * An Instance is a computing unit that an end customer can connect to.
+   * It's the main unit of computing resources in AlloyDB.
+   * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.Instance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Instance) + com.google.cloud.alloydb.v1beta.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetLabels(); + case 13: + return internalGetDatabaseFlags(); + case 18: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetMutableLabels(); + case 13: + return internalGetMutableDatabaseFlags(); + case 18: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.Instance.class, + com.google.cloud.alloydb.v1beta.Instance.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1beta.Instance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getDeleteTimeFieldBuilder(); + getMachineConfigFieldBuilder(); + getWritableNodeFieldBuilder(); + getNodesFieldBuilder(); + getQueryInsightsConfigFieldBuilder(); + getReadPoolConfigFieldBuilder(); + getUpdatePolicyFieldBuilder(); + getClientConnectionConfigFieldBuilder(); + getPscInstanceConfigFieldBuilder(); + getNetworkConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + uid_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + state_ = 0; + instanceType_ = 0; + machineConfig_ = null; + if (machineConfigBuilder_ != null) { + machineConfigBuilder_.dispose(); + machineConfigBuilder_ = null; + } + availabilityType_ = 0; + gceZone_ = ""; + internalGetMutableDatabaseFlags().clear(); + writableNode_ = null; + if (writableNodeBuilder_ != null) { + writableNodeBuilder_.dispose(); + writableNodeBuilder_ = null; + } + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + } else { + nodes_ = null; + nodesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); + queryInsightsConfig_ = null; + if (queryInsightsConfigBuilder_ != null) { + queryInsightsConfigBuilder_.dispose(); + queryInsightsConfigBuilder_ = null; + } + readPoolConfig_ = null; + if (readPoolConfigBuilder_ != null) { + readPoolConfigBuilder_.dispose(); + readPoolConfigBuilder_ = null; + } + ipAddress_ = ""; + publicIpAddress_ = ""; + reconciling_ = false; + etag_ = ""; + internalGetMutableAnnotations().clear(); + updatePolicy_ = null; + if (updatePolicyBuilder_ != null) { + updatePolicyBuilder_.dispose(); + updatePolicyBuilder_ = null; + } + clientConnectionConfig_ = null; + if (clientConnectionConfigBuilder_ != null) { + clientConnectionConfigBuilder_.dispose(); + clientConnectionConfigBuilder_ = null; + } + satisfiesPzs_ = false; + pscInstanceConfig_ = null; + if (pscInstanceConfigBuilder_ != null) { + pscInstanceConfigBuilder_.dispose(); + pscInstanceConfigBuilder_ = null; + } + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.alloydb.v1beta.ResourcesProto + .internal_static_google_cloud_alloydb_v1beta_Instance_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1beta.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance build() { + com.google.cloud.alloydb.v1beta.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance buildPartial() { + com.google.cloud.alloydb.v1beta.Instance result = + new com.google.cloud.alloydb.v1beta.Instance(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.alloydb.v1beta.Instance result) { + if (nodesBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0)) { + nodes_ = java.util.Collections.unmodifiableList(nodes_); + bitField0_ = (bitField0_ & ~0x00004000); + } + result.nodes_ = nodes_; + } else { + result.nodes_ = nodesBuilder_.build(); + } + } - public static com.google.cloud.alloydb.v1beta.Instance parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + private void buildPartial0(com.google.cloud.alloydb.v1beta.Instance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.uid_ = uid_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.instanceType_ = instanceType_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.machineConfig_ = + machineConfigBuilder_ == null ? machineConfig_ : machineConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.availabilityType_ = availabilityType_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.gceZone_ = gceZone_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.databaseFlags_ = internalGetDatabaseFlags(); + result.databaseFlags_.makeImmutable(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.writableNode_ = + writableNodeBuilder_ == null ? writableNode_ : writableNodeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.queryInsightsConfig_ = + queryInsightsConfigBuilder_ == null + ? queryInsightsConfig_ + : queryInsightsConfigBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.readPoolConfig_ = + readPoolConfigBuilder_ == null ? readPoolConfig_ : readPoolConfigBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.ipAddress_ = ipAddress_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.publicIpAddress_ = publicIpAddress_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.reconciling_ = reconciling_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.updatePolicy_ = + updatePolicyBuilder_ == null ? updatePolicy_ : updatePolicyBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.clientConnectionConfig_ = + clientConnectionConfigBuilder_ == null + ? clientConnectionConfig_ + : clientConnectionConfigBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.satisfiesPzs_ = satisfiesPzs_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.pscInstanceConfig_ = + pscInstanceConfigBuilder_ == null + ? pscInstanceConfig_ + : pscInstanceConfigBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.networkConfig_ = + networkConfigBuilder_ == null ? networkConfig_ : networkConfigBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + result.bitField0_ |= to_bitField0_; + } - public static com.google.cloud.alloydb.v1beta.Instance parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static com.google.cloud.alloydb.v1beta.Instance 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 setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - public static Builder newBuilder(com.google.cloud.alloydb.v1beta.Instance prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @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 toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * An Instance is a computing unit that an end customer can connect to.
-   * It's the main unit of computing resources in AlloyDB.
-   * 
- * - * Protobuf type {@code google.cloud.alloydb.v1beta.Instance} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Instance) - com.google.cloud.alloydb.v1beta.InstanceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.alloydb.v1beta.ResourcesProto - .internal_static_google_cloud_alloydb_v1beta_Instance_descriptor; + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.alloydb.v1beta.Instance) { + return mergeFrom((com.google.cloud.alloydb.v1beta.Instance) other); + } else { + super.mergeFrom(other); + return this; + } } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 7: - return internalGetLabels(); - case 13: - return internalGetDatabaseFlags(); - case 18: - return internalGetAnnotations(); - default: - throw new RuntimeException("Invalid map field number: " + number); + public Builder mergeFrom(com.google.cloud.alloydb.v1beta.Instance other) { + if (other == com.google.cloud.alloydb.v1beta.Instance.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDeleteTime()) { + mergeDeleteTime(other.getDeleteTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.instanceType_ != 0) { + setInstanceTypeValue(other.getInstanceTypeValue()); + } + if (other.hasMachineConfig()) { + mergeMachineConfig(other.getMachineConfig()); + } + if (other.availabilityType_ != 0) { + setAvailabilityTypeValue(other.getAvailabilityTypeValue()); + } + if (!other.getGceZone().isEmpty()) { + gceZone_ = other.gceZone_; + bitField0_ |= 0x00000800; + onChanged(); } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 7: - return internalGetMutableLabels(); - case 13: - return internalGetMutableDatabaseFlags(); - case 18: - return internalGetMutableAnnotations(); - default: - throw new RuntimeException("Invalid map field number: " + number); + internalGetMutableDatabaseFlags().mergeFrom(other.internalGetDatabaseFlags()); + bitField0_ |= 0x00001000; + if (other.hasWritableNode()) { + mergeWritableNode(other.getWritableNode()); + } + if (nodesBuilder_ == null) { + if (!other.nodes_.isEmpty()) { + if (nodes_.isEmpty()) { + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00004000); + } else { + ensureNodesIsMutable(); + nodes_.addAll(other.nodes_); + } + onChanged(); + } + } else { + if (!other.nodes_.isEmpty()) { + if (nodesBuilder_.isEmpty()) { + nodesBuilder_.dispose(); + nodesBuilder_ = null; + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00004000); + nodesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNodesFieldBuilder() + : null; + } else { + nodesBuilder_.addAllMessages(other.nodes_); + } + } + } + if (other.hasQueryInsightsConfig()) { + mergeQueryInsightsConfig(other.getQueryInsightsConfig()); + } + if (other.hasReadPoolConfig()) { + mergeReadPoolConfig(other.getReadPoolConfig()); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00020000; + onChanged(); + } + if (!other.getPublicIpAddress().isEmpty()) { + publicIpAddress_ = other.publicIpAddress_; + bitField0_ |= 0x00040000; + onChanged(); + } + if (other.getReconciling() != false) { + setReconciling(other.getReconciling()); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00100000; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00200000; + if (other.hasUpdatePolicy()) { + mergeUpdatePolicy(other.getUpdatePolicy()); + } + if (other.hasClientConnectionConfig()) { + mergeClientConnectionConfig(other.getClientConnectionConfig()); + } + if (other.getSatisfiesPzs() != false) { + setSatisfiesPzs(other.getSatisfiesPzs()); + } + if (other.hasPscInstanceConfig()) { + mergePscInstanceConfig(other.getPscInstanceConfig()); + } + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.alloydb.v1beta.ResourcesProto - .internal_static_google_cloud_alloydb_v1beta_Instance_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.alloydb.v1beta.Instance.class, - com.google.cloud.alloydb.v1beta.Instance.Builder.class); + public final boolean isInitialized() { + return true; } - // Construct using com.google.cloud.alloydb.v1beta.Instance.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + @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 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: + { + instanceType_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: + { + input.readMessage(getMachineConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 88: + { + availabilityType_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: + { + gceZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: + { + com.google.protobuf.MapEntry databaseFlags__ = + input.readMessage( + DatabaseFlagsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableDatabaseFlags() + .getMutableMap() + .put(databaseFlags__.getKey(), databaseFlags__.getValue()); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: + { + input.readMessage(getReadPoolConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 114 + case 122: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 122 + case 128: + { + reconciling_ = input.readBool(); + bitField0_ |= 0x00080000; + break; + } // case 128 + case 138: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00100000; + break; + } // case 138 + case 146: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00200000; + break; + } // case 146 + case 154: + { + input.readMessage(getWritableNodeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 154 + case 162: + { + com.google.cloud.alloydb.v1beta.Instance.Node m = + input.readMessage( + com.google.cloud.alloydb.v1beta.Instance.Node.parser(), extensionRegistry); + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(m); + } else { + nodesBuilder_.addMessage(m); + } + break; + } // case 162 + case 170: + { + input.readMessage( + getQueryInsightsConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 170 + case 178: + { + input.readMessage(getUpdatePolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 178 + case 186: + { + input.readMessage( + getClientConnectionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 186 + case 192: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x01000000; + break; + } // case 192 + case 218: + { + publicIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case 218 + case 226: + { + input.readMessage( + getPscInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x02000000; + break; + } // case 226 + case 234: + { + input.readMessage(getNetworkConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 234 + 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 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + private int bitField0_; - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCreateTimeFieldBuilder(); - getUpdateTimeFieldBuilder(); - getDeleteTimeFieldBuilder(); - getMachineConfigFieldBuilder(); - getWritableNodeFieldBuilder(); - getNodesFieldBuilder(); - getQueryInsightsConfigFieldBuilder(); - getReadPoolConfigFieldBuilder(); - getUpdatePolicyFieldBuilder(); - getClientConnectionConfigFieldBuilder(); + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The name of the instance resource with the format:
+     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
+     * where the cluster and instance ID segments should satisfy the regex
+     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
+     * lowercase letters, numbers, and dashes, starting with a letter, and ending
+     * with a letter or number. For more details see https://google.aip.dev/122.
+     * The prefix of the instance resource name is the name of the parent
+     * resource:
+     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; } } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - displayName_ = ""; - uid_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - deleteTime_ = null; - if (deleteTimeBuilder_ != null) { - deleteTimeBuilder_.dispose(); - deleteTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - state_ = 0; - instanceType_ = 0; - machineConfig_ = null; - if (machineConfigBuilder_ != null) { - machineConfigBuilder_.dispose(); - machineConfigBuilder_ = null; - } - availabilityType_ = 0; - gceZone_ = ""; - internalGetMutableDatabaseFlags().clear(); - writableNode_ = null; - if (writableNodeBuilder_ != null) { - writableNodeBuilder_.dispose(); - writableNodeBuilder_ = null; - } - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); + /** + * + * + *
+     * Output only. The name of the instance resource with the format:
+     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
+     * where the cluster and instance ID segments should satisfy the regex
+     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
+     * lowercase letters, numbers, and dashes, starting with a letter, and ending
+     * with a letter or number. For more details see https://google.aip.dev/122.
+     * The prefix of the instance resource name is the name of the parent
+     * resource:
+     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 { - nodes_ = null; - nodesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00004000); - queryInsightsConfig_ = null; - if (queryInsightsConfigBuilder_ != null) { - queryInsightsConfigBuilder_.dispose(); - queryInsightsConfigBuilder_ = null; - } - readPoolConfig_ = null; - if (readPoolConfigBuilder_ != null) { - readPoolConfigBuilder_.dispose(); - readPoolConfigBuilder_ = null; + return (com.google.protobuf.ByteString) ref; } - ipAddress_ = ""; - reconciling_ = false; - etag_ = ""; - internalGetMutableAnnotations().clear(); - updatePolicy_ = null; - if (updatePolicyBuilder_ != null) { - updatePolicyBuilder_.dispose(); - updatePolicyBuilder_ = null; + } + /** + * + * + *
+     * Output only. The name of the instance resource with the format:
+     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
+     * where the cluster and instance ID segments should satisfy the regex
+     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
+     * lowercase letters, numbers, and dashes, starting with a letter, and ending
+     * with a letter or number. For more details see https://google.aip.dev/122.
+     * The prefix of the instance resource name is the name of the parent
+     * resource:
+     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - clientConnectionConfig_ = null; - if (clientConnectionConfigBuilder_ != null) { - clientConnectionConfigBuilder_.dispose(); - clientConnectionConfigBuilder_ = null; + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the instance resource with the format:
+     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
+     * where the cluster and instance ID segments should satisfy the regex
+     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
+     * lowercase letters, numbers, and dashes, starting with a letter, and ending
+     * with a letter or number. For more details see https://google.aip.dev/122.
+     * The prefix of the instance resource name is the name of the parent
+     * resource:
+     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the instance resource with the format:
+     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
+     * where the cluster and instance ID segments should satisfy the regex
+     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
+     * lowercase letters, numbers, and dashes, starting with a letter, and ending
+     * with a letter or number. For more details see https://google.aip.dev/122.
+     * The prefix of the instance resource name is the name of the parent
+     * resource:
+     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.alloydb.v1beta.ResourcesProto - .internal_static_google_cloud_alloydb_v1beta_Instance_descriptor; - } - - @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance getDefaultInstanceForType() { - return com.google.cloud.alloydb.v1beta.Instance.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance build() { - com.google.cloud.alloydb.v1beta.Instance result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance buildPartial() { - com.google.cloud.alloydb.v1beta.Instance result = - new com.google.cloud.alloydb.v1beta.Instance(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * User-settable and human-readable display 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; } - onBuilt(); - return result; } - - private void buildPartialRepeatedFields(com.google.cloud.alloydb.v1beta.Instance result) { - if (nodesBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0)) { - nodes_ = java.util.Collections.unmodifiableList(nodes_); - bitField0_ = (bitField0_ & ~0x00004000); - } - result.nodes_ = nodes_; + /** + * + * + *
+     * User-settable and human-readable display 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 { - result.nodes_ = nodesBuilder_.build(); + return (com.google.protobuf.ByteString) ref; } } - - private void buildPartial0(com.google.cloud.alloydb.v1beta.Instance result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.displayName_ = displayName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.uid_ = uid_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.instanceType_ = instanceType_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.machineConfig_ = - machineConfigBuilder_ == null ? machineConfig_ : machineConfigBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.availabilityType_ = availabilityType_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.gceZone_ = gceZone_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.databaseFlags_ = internalGetDatabaseFlags(); - result.databaseFlags_.makeImmutable(); - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.writableNode_ = - writableNodeBuilder_ == null ? writableNode_ : writableNodeBuilder_.build(); - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00008000) != 0)) { - result.queryInsightsConfig_ = - queryInsightsConfigBuilder_ == null - ? queryInsightsConfig_ - : queryInsightsConfigBuilder_.build(); - to_bitField0_ |= 0x00000020; - } - if (((from_bitField0_ & 0x00010000) != 0)) { - result.readPoolConfig_ = - readPoolConfigBuilder_ == null ? readPoolConfig_ : readPoolConfigBuilder_.build(); - to_bitField0_ |= 0x00000040; - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.ipAddress_ = ipAddress_; - } - if (((from_bitField0_ & 0x00040000) != 0)) { - result.reconciling_ = reconciling_; - } - if (((from_bitField0_ & 0x00080000) != 0)) { - result.etag_ = etag_; - } - if (((from_bitField0_ & 0x00100000) != 0)) { - result.annotations_ = internalGetAnnotations(); - result.annotations_.makeImmutable(); - } - if (((from_bitField0_ & 0x00200000) != 0)) { - result.updatePolicy_ = - updatePolicyBuilder_ == null ? updatePolicy_ : updatePolicyBuilder_.build(); - to_bitField0_ |= 0x00000080; - } - if (((from_bitField0_ & 0x00400000) != 0)) { - result.clientConnectionConfig_ = - clientConnectionConfigBuilder_ == null - ? clientConnectionConfig_ - : clientConnectionConfigBuilder_.build(); - to_bitField0_ |= 0x00000100; + /** + * + * + *
+     * User-settable and human-readable display 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(); } - result.bitField0_ |= to_bitField0_; - } - - @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); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + /** + * + * + *
+     * User-settable and human-readable display 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; } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
+     * User-settable and human-readable display 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; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.alloydb.v1beta.Instance) { - return mergeFrom((com.google.cloud.alloydb.v1beta.Instance) other); + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. The system-generated UID of the resource. The UID is assigned
+     * when the resource is created, and it is retained until it is deleted.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; } else { - super.mergeFrom(other); - return this; + return (java.lang.String) ref; } } - - public Builder mergeFrom(com.google.cloud.alloydb.v1beta.Instance other) { - if (other == com.google.cloud.alloydb.v1beta.Instance.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getUid().isEmpty()) { - uid_ = other.uid_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasDeleteTime()) { - mergeDeleteTime(other.getDeleteTime()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000040; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.instanceType_ != 0) { - setInstanceTypeValue(other.getInstanceTypeValue()); - } - if (other.hasMachineConfig()) { - mergeMachineConfig(other.getMachineConfig()); - } - if (other.availabilityType_ != 0) { - setAvailabilityTypeValue(other.getAvailabilityTypeValue()); - } - if (!other.getGceZone().isEmpty()) { - gceZone_ = other.gceZone_; - bitField0_ |= 0x00000800; - onChanged(); - } - internalGetMutableDatabaseFlags().mergeFrom(other.internalGetDatabaseFlags()); - bitField0_ |= 0x00001000; - if (other.hasWritableNode()) { - mergeWritableNode(other.getWritableNode()); - } - if (nodesBuilder_ == null) { - if (!other.nodes_.isEmpty()) { - if (nodes_.isEmpty()) { - nodes_ = other.nodes_; - bitField0_ = (bitField0_ & ~0x00004000); - } else { - ensureNodesIsMutable(); - nodes_.addAll(other.nodes_); - } - onChanged(); - } + /** + * + * + *
+     * Output only. The system-generated UID of the resource. The UID is assigned
+     * when the resource is created, and it is retained until it is deleted.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; } else { - if (!other.nodes_.isEmpty()) { - if (nodesBuilder_.isEmpty()) { - nodesBuilder_.dispose(); - nodesBuilder_ = null; - nodes_ = other.nodes_; - bitField0_ = (bitField0_ & ~0x00004000); - nodesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNodesFieldBuilder() - : null; - } else { - nodesBuilder_.addAllMessages(other.nodes_); - } - } - } - if (other.hasQueryInsightsConfig()) { - mergeQueryInsightsConfig(other.getQueryInsightsConfig()); - } - if (other.hasReadPoolConfig()) { - mergeReadPoolConfig(other.getReadPoolConfig()); - } - if (!other.getIpAddress().isEmpty()) { - ipAddress_ = other.ipAddress_; - bitField0_ |= 0x00020000; - onChanged(); + return (com.google.protobuf.ByteString) ref; } - if (other.getReconciling() != false) { - setReconciling(other.getReconciling()); + } + /** + * + * + *
+     * Output only. The system-generated UID of the resource. The UID is assigned
+     * when the resource is created, and it is retained until it is deleted.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - bitField0_ |= 0x00080000; - onChanged(); + uid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The system-generated UID of the resource. The UID is assigned
+     * when the resource is created, and it is retained until it is deleted.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The system-generated UID of the resource. The UID is assigned
+     * when the resource is created, and it is retained until it is deleted.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); - bitField0_ |= 0x00100000; - if (other.hasUpdatePolicy()) { - mergeUpdatePolicy(other.getUpdatePolicy()); + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000004; + 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. Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.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(); } - if (other.hasClientConnectionConfig()) { - mergeClientConnectionConfig(other.getClientConnectionConfig()); + } + /** + * + * + *
+     * Output only. Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); } - this.mergeUnknownFields(other.getUnknownFields()); + bitField0_ |= 0x00000008; 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(); + /** + * + * + *
+     * Output only. Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.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()); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - displayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - uid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 64: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000080; - break; - } // case 64 - case 72: - { - instanceType_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 72 - case 82: - { - input.readMessage(getMachineConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 82 - case 88: - { - availabilityType_ = input.readEnum(); - bitField0_ |= 0x00000400; - break; - } // case 88 - case 98: - { - gceZone_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - break; - } // case 98 - case 106: - { - com.google.protobuf.MapEntry databaseFlags__ = - input.readMessage( - DatabaseFlagsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableDatabaseFlags() - .getMutableMap() - .put(databaseFlags__.getKey(), databaseFlags__.getValue()); - bitField0_ |= 0x00001000; - break; - } // case 106 - case 114: - { - input.readMessage(getReadPoolConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; - break; - } // case 114 - case 122: - { - ipAddress_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; - break; - } // case 122 - case 128: - { - reconciling_ = input.readBool(); - bitField0_ |= 0x00040000; - break; - } // case 128 - case 138: - { - etag_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; - break; - } // case 138 - case 146: - { - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableAnnotations() - .getMutableMap() - .put(annotations__.getKey(), annotations__.getValue()); - bitField0_ |= 0x00100000; - break; - } // case 146 - case 154: - { - input.readMessage(getWritableNodeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; - break; - } // case 154 - case 162: - { - com.google.cloud.alloydb.v1beta.Instance.Node m = - input.readMessage( - com.google.cloud.alloydb.v1beta.Instance.Node.parser(), extensionRegistry); - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(m); - } else { - nodesBuilder_.addMessage(m); - } - break; - } // case 162 - case 170: - { - input.readMessage( - getQueryInsightsConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; - break; - } // case 170 - case 178: - { - input.readMessage(getUpdatePolicyFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00200000; - break; - } // case 178 - case 186: - { - input.readMessage( - getClientConnectionConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00400000; - break; - } // case 186 - 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 { + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; onChanged(); - } // finally + } return this; } - - private int bitField0_; - - private java.lang.Object name_ = ""; /** * * *
-     * Output only. The name of the instance resource with the format:
-     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
-     * where the cluster and instance ID segments should satisfy the regex
-     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
-     * lowercase letters, numbers, and dashes, starting with a letter, and ending
-     * with a letter or number. For more details see https://google.aip.dev/122.
-     * The prefix of the instance resource name is the name of the parent
-     * resource:
-     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+     * Output only. Create time stamp
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - 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; + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; } + onChanged(); + return this; } /** * * *
-     * Output only. The name of the instance resource with the format:
-     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
-     * where the cluster and instance ID segments should satisfy the regex
-     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
-     * lowercase letters, numbers, and dashes, starting with a letter, and ending
-     * with a letter or number. For more details see https://google.aip.dev/122.
-     * The prefix of the instance resource name is the name of the parent
-     * resource:
-     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+     * Output only. Create time stamp
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** * - * @return The bytes for name. + * + *
+     * Output only. Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - 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; + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); } else { - return (com.google.protobuf.ByteString) ref; + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; } } /** * * *
-     * Output only. The name of the instance resource with the format:
-     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
-     * where the cluster and instance ID segments should satisfy the regex
-     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
-     * lowercase letters, numbers, and dashes, starting with a letter, and ending
-     * with a letter or number. For more details see https://google.aip.dev/122.
-     * The prefix of the instance resource name is the name of the parent
-     * resource:
-     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+     * Output only. Create time stamp
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The name to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + 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; } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + return createTimeBuilder_; } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; /** * * *
-     * Output only. The name of the instance resource with the format:
-     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
-     * where the cluster and instance ID segments should satisfy the regex
-     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
-     * lowercase letters, numbers, and dashes, starting with a letter, and ending
-     * with a letter or number. For more details see https://google.aip.dev/122.
-     * The prefix of the instance resource name is the name of the parent
-     * resource:
-     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+     * Output only. Update time stamp
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return This builder for chaining. + * @return Whether the updateTime field is set. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); } /** * * *
-     * Output only. The name of the instance resource with the format:
-     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
-     * where the cluster and instance ID segments should satisfy the regex
-     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
-     * lowercase letters, numbers, and dashes, starting with a letter, and ending
-     * with a letter or number. For more details see https://google.aip.dev/122.
-     * The prefix of the instance resource name is the name of the parent
-     * resource:
-     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
+     * Output only. Update time stamp
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @param value The bytes for name to set. - * @return This builder for chaining. + * @return The updateTime. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Output only. Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; onChanged(); return this; } - - private java.lang.Object displayName_ = ""; /** * * *
-     * User-settable and human-readable display name for the Instance.
+     * Output only. Update time stamp
      * 
* - * string display_name = 2; + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** * - * @return The displayName. + * + *
+     * Output only. Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - 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; + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } } else { - return (java.lang.String) ref; + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); } + return this; } /** * * *
-     * User-settable and human-readable display name for the Instance.
+     * Output only. Update time stamp
      * 
* - * string display_name = 2; - * - * @return The bytes for displayName. + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - 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; + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; } + onChanged(); + return this; } /** * * *
-     * User-settable and human-readable display name for the Instance.
+     * Output only. Update time stamp
      * 
* - * string display_name = 2; - * - * @param value The displayName to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - displayName_ = value; - bitField0_ |= 0x00000002; + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; onChanged(); - return this; + return getUpdateTimeFieldBuilder().getBuilder(); } /** * * *
-     * User-settable and human-readable display name for the Instance.
+     * Output only. Update time stamp
      * 
* - * string display_name = 2; - * - * @return This builder for chaining. + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } } /** * * *
-     * User-settable and human-readable display name for the Instance.
+     * Output only. Update time stamp
      * 
* - * string display_name = 2; - * - * @param value The bytes for displayName to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; } - checkByteStringIsUtf8(value); - displayName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + return updateTimeBuilder_; } - private java.lang.Object uid_ = ""; + private com.google.protobuf.Timestamp deleteTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deleteTimeBuilder_; /** * * *
-     * Output only. The system-generated UID of the resource. The UID is assigned
-     * when the resource is created, and it is retained until it is deleted.
+     * Output only. Delete time stamp
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The uid. + * @return Whether the deleteTime field is set. */ - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000020) != 0); } /** * * *
-     * Output only. The system-generated UID of the resource. The UID is assigned
-     * when the resource is created, and it is retained until it is deleted.
+     * Output only. Delete time stamp
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The bytes for uid. + * @return The deleteTime. */ - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; + public com.google.protobuf.Timestamp getDeleteTime() { + if (deleteTimeBuilder_ == null) { + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; } else { - return (com.google.protobuf.ByteString) ref; + return deleteTimeBuilder_.getMessage(); } } /** * * *
-     * Output only. The system-generated UID of the resource. The UID is assigned
-     * when the resource is created, and it is retained until it is deleted.
+     * Output only. Delete time stamp
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The uid to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setUid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteTime_ = value; + } else { + deleteTimeBuilder_.setMessage(value); } - uid_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -8687,17 +15161,20 @@ public Builder setUid(java.lang.String value) { * * *
-     * Output only. The system-generated UID of the resource. The UID is assigned
-     * when the resource is created, and it is retained until it is deleted.
+     * Output only. Delete time stamp
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearUid() { - uid_ = getDefaultInstance().getUid(); - bitField0_ = (bitField0_ & ~0x00000004); + public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deleteTimeBuilder_ == null) { + deleteTime_ = builderForValue.build(); + } else { + deleteTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -8705,294 +15182,356 @@ public Builder clearUid() { * * *
-     * Output only. The system-generated UID of the resource. The UID is assigned
-     * when the resource is created, and it is retained until it is deleted.
+     * Output only. Delete time stamp
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for uid to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setUidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && deleteTime_ != null + && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeleteTimeBuilder().mergeFrom(value); + } else { + deleteTime_ = value; + } + } else { + deleteTimeBuilder_.mergeFrom(value); + } + if (deleteTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); } - checkByteStringIsUtf8(value); - uid_ = value; - bitField0_ |= 0x00000004; - 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. Create time stamp
+     * Output only. Delete time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeleteTime() { + bitField0_ = (bitField0_ & ~0x00000020); + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Delete time stamp
      * 
* * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return Whether the createTime field is set. */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000008) != 0); + public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getDeleteTimeFieldBuilder().getBuilder(); } /** * * *
-     * Output only. Create time stamp
+     * Output only. Delete time stamp
      * 
* * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Timestamp delete_time = 6 [(.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_; + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + if (deleteTimeBuilder_ != null) { + return deleteTimeBuilder_.getMessageOrBuilder(); } else { - return createTimeBuilder_.getMessage(); + return deleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deleteTime_; } } /** * * *
-     * Output only. Create time stamp
+     * Output only. Delete time stamp
      * 
* * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDeleteTimeFieldBuilder() { + if (deleteTimeBuilder_ == null) { + deleteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeleteTime(), getParentForChildren(), isClean()); + deleteTime_ = null; } - bitField0_ |= 0x00000008; + return deleteTimeBuilder_; + } + + 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_ |= 0x00000040; onChanged(); - return this; + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); } /** * * *
-     * Output only. Create time stamp
+     * Labels as key value pairs
      * 
* - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * map<string, string> labels = 7; */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00000008; - onChanged(); - return this; + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); } /** * * *
-     * Output only. Create time stamp
+     * Labels as key value pairs
      * 
* - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * map<string, string> labels = 7; */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - if (createTime_ != null) { - bitField0_ |= 0x00000008; - onChanged(); + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 7; + */ + @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"); } - return this; + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Output only. Create time stamp
+     * Labels as key value pairs
      * 
* - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * map<string, string> labels = 7; */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000008); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - onChanged(); + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); return this; } /** * * *
-     * Output only. Create time stamp
+     * Labels as key value pairs
      * 
* - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * map<string, string> labels = 7; */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + 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_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); } /** * * *
-     * Output only. Create time stamp
+     * Labels as key value pairs
      * 
* - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * map<string, string> labels = 7; */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + 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_ |= 0x00000040; + return this; } /** * * *
-     * Output only. Create time stamp
+     * Labels as key value pairs
      * 
* - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * map<string, string> labels = 7; */ - 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_; + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current serving state of the instance.
+     * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; /** * * *
-     * Output only. Update time stamp
+     * Output only. The current serving state of the instance.
      * 
* * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return Whether the updateTime field is set. + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000010) != 0); + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; } /** * * *
-     * Output only. Update time stamp
+     * Output only. The current serving state of the instance.
      * 
* * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return The updateTime. + * @return The state. */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.State getState() { + com.google.cloud.alloydb.v1beta.Instance.State result = + com.google.cloud.alloydb.v1beta.Instance.State.forNumber(state_); + return result == null ? com.google.cloud.alloydb.v1beta.Instance.State.UNRECOGNIZED : result; } /** * * *
-     * Output only. Update time stamp
+     * Output only. The current serving state of the instance.
      * 
* * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param value The state to set. + * @return This builder for chaining. */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); + public Builder setState(com.google.cloud.alloydb.v1beta.Instance.State value) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000080; + state_ = value.getNumber(); onChanged(); return this; } @@ -9000,70 +15539,57 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Update time stamp
+     * Output only. The current serving state of the instance.
      * 
* * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return This builder for chaining. */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000080); + state_ = 0; onChanged(); return this; } + + private int instanceType_ = 0; /** * * *
-     * Output only. Update time stamp
+     * Required. The type of the instance. Specified at creation time.
      * 
* * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; * + * + * @return The enum numeric value on the wire for instanceType. */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - if (updateTime_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; + @java.lang.Override + public int getInstanceTypeValue() { + return instanceType_; } /** * * *
-     * Output only. Update time stamp
+     * Required. The type of the instance. Specified at creation time.
      * 
* * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; * + * + * @param value The enum numeric value on the wire for instanceType to set. + * @return This builder for chaining. */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000010); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } + public Builder setInstanceTypeValue(int value) { + instanceType_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -9071,131 +15597,128 @@ public Builder clearUpdateTime() { * * *
-     * Output only. Update time stamp
+     * Required. The type of the instance. Specified at creation time.
      * 
* * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; * + * + * @return The instanceType. */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Instance.InstanceType getInstanceType() { + com.google.cloud.alloydb.v1beta.Instance.InstanceType result = + com.google.cloud.alloydb.v1beta.Instance.InstanceType.forNumber(instanceType_); + return result == null + ? com.google.cloud.alloydb.v1beta.Instance.InstanceType.UNRECOGNIZED + : result; } /** * * *
-     * Output only. Update time stamp
+     * Required. The type of the instance. Specified at creation time.
      * 
* * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; * + * + * @param value The instanceType to set. + * @return This builder for chaining. */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; + public Builder setInstanceType(com.google.cloud.alloydb.v1beta.Instance.InstanceType value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000100; + instanceType_ = value.getNumber(); + onChanged(); + return this; } /** * * *
-     * Output only. Update time stamp
+     * Required. The type of the instance. Specified at creation time.
      * 
* * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; * + * + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; + public Builder clearInstanceType() { + bitField0_ = (bitField0_ & ~0x00000100); + instanceType_ = 0; + onChanged(); + return this; } - private com.google.protobuf.Timestamp deleteTime_; + private com.google.cloud.alloydb.v1beta.Instance.MachineConfig machineConfig_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - deleteTimeBuilder_; + com.google.cloud.alloydb.v1beta.Instance.MachineConfig, + com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder> + machineConfigBuilder_; /** * * *
-     * Output only. Delete time stamp
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; * - * @return Whether the deleteTime field is set. + * @return Whether the machineConfig field is set. */ - public boolean hasDeleteTime() { - return ((bitField0_ & 0x00000020) != 0); + public boolean hasMachineConfig() { + return ((bitField0_ & 0x00000200) != 0); } /** * * *
-     * Output only. Delete time stamp
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; * - * @return The deleteTime. + * @return The machineConfig. */ - public com.google.protobuf.Timestamp getDeleteTime() { - if (deleteTimeBuilder_ == null) { - return deleteTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : deleteTime_; + public com.google.cloud.alloydb.v1beta.Instance.MachineConfig getMachineConfig() { + if (machineConfigBuilder_ == null) { + return machineConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance() + : machineConfig_; } else { - return deleteTimeBuilder_.getMessage(); + return machineConfigBuilder_.getMessage(); } } /** * * *
-     * Output only. Delete time stamp
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; */ - public Builder setDeleteTime(com.google.protobuf.Timestamp value) { - if (deleteTimeBuilder_ == null) { + public Builder setMachineConfig(com.google.cloud.alloydb.v1beta.Instance.MachineConfig value) { + if (machineConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - deleteTime_ = value; + machineConfig_ = value; } else { - deleteTimeBuilder_.setMessage(value); + machineConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -9203,20 +15726,20 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Delete time stamp
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; */ - public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (deleteTimeBuilder_ == null) { - deleteTime_ = builderForValue.build(); + public Builder setMachineConfig( + com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder builderForValue) { + if (machineConfigBuilder_ == null) { + machineConfig_ = builderForValue.build(); } else { - deleteTimeBuilder_.setMessage(builderForValue.build()); + machineConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -9224,27 +15747,28 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Output only. Delete time stamp
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; */ - public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { - if (deleteTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && deleteTime_ != null - && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getDeleteTimeBuilder().mergeFrom(value); + public Builder mergeMachineConfig( + com.google.cloud.alloydb.v1beta.Instance.MachineConfig value) { + if (machineConfigBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && machineConfig_ != null + && machineConfig_ + != com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance()) { + getMachineConfigBuilder().mergeFrom(value); } else { - deleteTime_ = value; + machineConfig_ = value; } } else { - deleteTimeBuilder_.mergeFrom(value); + machineConfigBuilder_.mergeFrom(value); } - if (deleteTime_ != null) { - bitField0_ |= 0x00000020; + if (machineConfig_ != null) { + bitField0_ |= 0x00000200; onChanged(); } return this; @@ -9253,19 +15777,18 @@ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Delete time stamp
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; */ - public Builder clearDeleteTime() { - bitField0_ = (bitField0_ & ~0x00000020); - deleteTime_ = null; - if (deleteTimeBuilder_ != null) { - deleteTimeBuilder_.dispose(); - deleteTimeBuilder_ = null; + public Builder clearMachineConfig() { + bitField0_ = (bitField0_ & ~0x00000200); + machineConfig_ = null; + if (machineConfigBuilder_ != null) { + machineConfigBuilder_.dispose(); + machineConfigBuilder_ = null; } onChanged(); return this; @@ -9274,264 +15797,261 @@ public Builder clearDeleteTime() { * * *
-     * Output only. Delete time stamp
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; */ - public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { - bitField0_ |= 0x00000020; + public com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder + getMachineConfigBuilder() { + bitField0_ |= 0x00000200; onChanged(); - return getDeleteTimeFieldBuilder().getBuilder(); + return getMachineConfigFieldBuilder().getBuilder(); } /** * * *
-     * Output only. Delete time stamp
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; */ - public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { - if (deleteTimeBuilder_ != null) { - return deleteTimeBuilder_.getMessageOrBuilder(); + public com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder + getMachineConfigOrBuilder() { + if (machineConfigBuilder_ != null) { + return machineConfigBuilder_.getMessageOrBuilder(); } else { - return deleteTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : deleteTime_; + return machineConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance() + : machineConfig_; } } /** * * *
-     * Output only. Delete time stamp
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getDeleteTimeFieldBuilder() { - if (deleteTimeBuilder_ == null) { - deleteTimeBuilder_ = + com.google.cloud.alloydb.v1beta.Instance.MachineConfig, + com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder> + getMachineConfigFieldBuilder() { + if (machineConfigBuilder_ == null) { + machineConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getDeleteTime(), getParentForChildren(), isClean()); - deleteTime_ = null; - } - return deleteTimeBuilder_; - } - - 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(); + com.google.cloud.alloydb.v1beta.Instance.MachineConfig, + com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder>( + getMachineConfig(), getParentForChildren(), isClean()); + machineConfig_ = null; } - bitField0_ |= 0x00000040; - onChanged(); - return labels_; + return machineConfigBuilder_; } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } + private int availabilityType_ = 0; /** * * *
-     * Labels as key value pairs
+     * Availability type of an Instance.
+     * If empty, defaults to REGIONAL for primary instances.
+     * For read pools, availability_type is always UNSPECIFIED. Instances in the
+     * read pools are evenly distributed across available zones within the region
+     * (i.e. read pools with more than one node will have a node in at
+     * least two zones).
      * 
* - * map<string, string> labels = 7; - */ - @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(); - } - /** - * - * - *
-     * Labels as key value pairs
-     * 
+ * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; * - * map<string, string> labels = 7; + * @return The enum numeric value on the wire for availabilityType. */ @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); + public int getAvailabilityTypeValue() { + return availabilityType_; } /** * * *
-     * Labels as key value pairs
+     * Availability type of an Instance.
+     * If empty, defaults to REGIONAL for primary instances.
+     * For read pools, availability_type is always UNSPECIFIED. Instances in the
+     * read pools are evenly distributed across available zones within the region
+     * (i.e. read pools with more than one node will have a node in at
+     * least two zones).
      * 
* - * map<string, string> labels = 7; + * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; + * + * @param value The enum numeric value on the wire for availabilityType to set. + * @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 setAvailabilityTypeValue(int value) { + availabilityType_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; } /** * * *
-     * Labels as key value pairs
+     * Availability type of an Instance.
+     * If empty, defaults to REGIONAL for primary instances.
+     * For read pools, availability_type is always UNSPECIFIED. Instances in the
+     * read pools are evenly distributed across available zones within the region
+     * (i.e. read pools with more than one node will have a node in at
+     * least two zones).
      * 
* - * map<string, string> labels = 7; + * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; + * + * @return The availabilityType. */ @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_ & ~0x00000040); - internalGetMutableLabels().getMutableMap().clear(); - return this; + public com.google.cloud.alloydb.v1beta.Instance.AvailabilityType getAvailabilityType() { + com.google.cloud.alloydb.v1beta.Instance.AvailabilityType result = + com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.forNumber(availabilityType_); + return result == null + ? com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.UNRECOGNIZED + : result; } /** * * *
-     * Labels as key value pairs
+     * Availability type of an Instance.
+     * If empty, defaults to REGIONAL for primary instances.
+     * For read pools, availability_type is always UNSPECIFIED. Instances in the
+     * read pools are evenly distributed across available zones within the region
+     * (i.e. read pools with more than one node will have a node in at
+     * least two zones).
      * 
* - * map<string, string> labels = 7; + * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; + * + * @param value The availabilityType to set. + * @return This builder for chaining. */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder setAvailabilityType( + com.google.cloud.alloydb.v1beta.Instance.AvailabilityType value) { + if (value == null) { + throw new NullPointerException(); } - internalGetMutableLabels().getMutableMap().remove(key); + bitField0_ |= 0x00000400; + availabilityType_ = value.getNumber(); + onChanged(); return this; } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000040; - return internalGetMutableLabels().getMutableMap(); - } /** * * *
-     * Labels as key value pairs
+     * Availability type of an Instance.
+     * If empty, defaults to REGIONAL for primary instances.
+     * For read pools, availability_type is always UNSPECIFIED. Instances in the
+     * read pools are evenly distributed across available zones within the region
+     * (i.e. read pools with more than one node will have a node in at
+     * least two zones).
      * 
* - * map<string, string> labels = 7; + * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; + * + * @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_ |= 0x00000040; + public Builder clearAvailabilityType() { + bitField0_ = (bitField0_ & ~0x00000400); + availabilityType_ = 0; + onChanged(); return this; } + + private java.lang.Object gceZone_ = ""; /** * * *
-     * Labels as key value pairs
+     * The Compute Engine zone that the instance should serve from, per
+     * https://cloud.google.com/compute/docs/regions-zones
+     * This can ONLY be specified for ZONAL instances.
+     * If present for a REGIONAL instance, an error will be thrown.
+     * If this is absent for a ZONAL instance, instance is created in a random
+     * zone with available capacity.
      * 
* - * map<string, string> labels = 7; + * string gce_zone = 12; + * + * @return The gceZone. */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000040; - return this; + public java.lang.String getGceZone() { + java.lang.Object ref = gceZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gceZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - - private int state_ = 0; /** * * *
-     * Output only. The current serving state of the instance.
+     * The Compute Engine zone that the instance should serve from, per
+     * https://cloud.google.com/compute/docs/regions-zones
+     * This can ONLY be specified for ZONAL instances.
+     * If present for a REGIONAL instance, an error will be thrown.
+     * If this is absent for a ZONAL instance, instance is created in a random
+     * zone with available capacity.
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string gce_zone = 12; * - * @return The enum numeric value on the wire for state. + * @return The bytes for gceZone. */ - @java.lang.Override - public int getStateValue() { - return state_; + public com.google.protobuf.ByteString getGceZoneBytes() { + java.lang.Object ref = gceZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gceZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** * * *
-     * Output only. The current serving state of the instance.
+     * The Compute Engine zone that the instance should serve from, per
+     * https://cloud.google.com/compute/docs/regions-zones
+     * This can ONLY be specified for ZONAL instances.
+     * If present for a REGIONAL instance, an error will be thrown.
+     * If this is absent for a ZONAL instance, instance is created in a random
+     * zone with available capacity.
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string gce_zone = 12; * - * @param value The enum numeric value on the wire for state to set. + * @param value The gceZone to set. * @return This builder for chaining. */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000080; + public Builder setGceZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gceZone_ = value; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -9539,228 +16059,377 @@ public Builder setStateValue(int value) { * * *
-     * Output only. The current serving state of the instance.
+     * The Compute Engine zone that the instance should serve from, per
+     * https://cloud.google.com/compute/docs/regions-zones
+     * This can ONLY be specified for ZONAL instances.
+     * If present for a REGIONAL instance, an error will be thrown.
+     * If this is absent for a ZONAL instance, instance is created in a random
+     * zone with available capacity.
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string gce_zone = 12; * - * @return The state. + * @return This builder for chaining. */ - @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance.State getState() { - com.google.cloud.alloydb.v1beta.Instance.State result = - com.google.cloud.alloydb.v1beta.Instance.State.forNumber(state_); - return result == null ? com.google.cloud.alloydb.v1beta.Instance.State.UNRECOGNIZED : result; + public Builder clearGceZone() { + gceZone_ = getDefaultInstance().getGceZone(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; } /** * * *
-     * Output only. The current serving state of the instance.
+     * The Compute Engine zone that the instance should serve from, per
+     * https://cloud.google.com/compute/docs/regions-zones
+     * This can ONLY be specified for ZONAL instances.
+     * If present for a REGIONAL instance, an error will be thrown.
+     * If this is absent for a ZONAL instance, instance is created in a random
+     * zone with available capacity.
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string gce_zone = 12; * - * @param value The state to set. + * @param value The bytes for gceZone to set. * @return This builder for chaining. */ - public Builder setState(com.google.cloud.alloydb.v1beta.Instance.State value) { + public Builder setGceZoneBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000080; - state_ = value.getNumber(); + checkByteStringIsUtf8(value); + gceZone_ = value; + bitField0_ |= 0x00000800; onChanged(); return this; } + + private com.google.protobuf.MapField databaseFlags_; + + private com.google.protobuf.MapField + internalGetDatabaseFlags() { + if (databaseFlags_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DatabaseFlagsDefaultEntryHolder.defaultEntry); + } + return databaseFlags_; + } + + private com.google.protobuf.MapField + internalGetMutableDatabaseFlags() { + if (databaseFlags_ == null) { + databaseFlags_ = + com.google.protobuf.MapField.newMapField(DatabaseFlagsDefaultEntryHolder.defaultEntry); + } + if (!databaseFlags_.isMutable()) { + databaseFlags_ = databaseFlags_.copy(); + } + bitField0_ |= 0x00001000; + onChanged(); + return databaseFlags_; + } + + public int getDatabaseFlagsCount() { + return internalGetDatabaseFlags().getMap().size(); + } /** * * *
-     * Output only. The current serving state of the instance.
+     * Database flags. Set at instance level.
+     *  * They are copied from primary instance on read instance creation.
+     *  * Read instances can set new or override existing flags that are relevant
+     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
+     *    set on read instance may or may not be present on primary.
+     *
+     *
+     * This is a list of "key": "value" pairs.
+     * "key": The name of the flag. These flags are passed at instance setup time,
+     * so include both server options and system variables for Postgres. Flags are
+     * specified with underscores, not hyphens.
+     * "value": The value of the flag. Booleans are set to **on** for true
+     * and **off** for false. This field must be omitted if the flag
+     * doesn't take a value.
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * map<string, string> database_flags = 13; + */ + @java.lang.Override + public boolean containsDatabaseFlags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetDatabaseFlags().getMap().containsKey(key); + } + /** Use {@link #getDatabaseFlagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDatabaseFlags() { + return getDatabaseFlagsMap(); + } + /** * - * @return This builder for chaining. + * + *
+     * Database flags. Set at instance level.
+     *  * They are copied from primary instance on read instance creation.
+     *  * Read instances can set new or override existing flags that are relevant
+     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
+     *    set on read instance may or may not be present on primary.
+     *
+     *
+     * This is a list of "key": "value" pairs.
+     * "key": The name of the flag. These flags are passed at instance setup time,
+     * so include both server options and system variables for Postgres. Flags are
+     * specified with underscores, not hyphens.
+     * "value": The value of the flag. Booleans are set to **on** for true
+     * and **off** for false. This field must be omitted if the flag
+     * doesn't take a value.
+     * 
+ * + * map<string, string> database_flags = 13; */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000080); - state_ = 0; - onChanged(); - return this; + @java.lang.Override + public java.util.Map getDatabaseFlagsMap() { + return internalGetDatabaseFlags().getMap(); } - - private int instanceType_ = 0; /** * * *
-     * Required. The type of the instance. Specified at creation time.
-     * 
+ * Database flags. Set at instance level. + * * They are copied from primary instance on read instance creation. + * * Read instances can set new or override existing flags that are relevant + * for reads, e.g. for enabling columnar cache on a read instance. Flags + * set on read instance may or may not be present on primary. * - * - * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; - * * - * @return The enum numeric value on the wire for instanceType. + * This is a list of "key": "value" pairs. + * "key": The name of the flag. These flags are passed at instance setup time, + * so include both server options and system variables for Postgres. Flags are + * specified with underscores, not hyphens. + * "value": The value of the flag. Booleans are set to **on** for true + * and **off** for false. This field must be omitted if the flag + * doesn't take a value. + *
+ * + * map<string, string> database_flags = 13; */ @java.lang.Override - public int getInstanceTypeValue() { - return instanceType_; + public /* nullable */ java.lang.String getDatabaseFlagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDatabaseFlags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Required. The type of the instance. Specified at creation time.
-     * 
+ * Database flags. Set at instance level. + * * They are copied from primary instance on read instance creation. + * * Read instances can set new or override existing flags that are relevant + * for reads, e.g. for enabling columnar cache on a read instance. Flags + * set on read instance may or may not be present on primary. * - * - * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; - * * - * @param value The enum numeric value on the wire for instanceType to set. - * @return This builder for chaining. + * This is a list of "key": "value" pairs. + * "key": The name of the flag. These flags are passed at instance setup time, + * so include both server options and system variables for Postgres. Flags are + * specified with underscores, not hyphens. + * "value": The value of the flag. Booleans are set to **on** for true + * and **off** for false. This field must be omitted if the flag + * doesn't take a value. + * + * + * map<string, string> database_flags = 13; */ - public Builder setInstanceTypeValue(int value) { - instanceType_ = value; - bitField0_ |= 0x00000100; - onChanged(); + @java.lang.Override + public java.lang.String getDatabaseFlagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDatabaseFlags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearDatabaseFlags() { + bitField0_ = (bitField0_ & ~0x00001000); + internalGetMutableDatabaseFlags().getMutableMap().clear(); return this; } /** * * *
-     * Required. The type of the instance. Specified at creation time.
-     * 
+ * Database flags. Set at instance level. + * * They are copied from primary instance on read instance creation. + * * Read instances can set new or override existing flags that are relevant + * for reads, e.g. for enabling columnar cache on a read instance. Flags + * set on read instance may or may not be present on primary. * - * - * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; - * * - * @return The instanceType. + * This is a list of "key": "value" pairs. + * "key": The name of the flag. These flags are passed at instance setup time, + * so include both server options and system variables for Postgres. Flags are + * specified with underscores, not hyphens. + * "value": The value of the flag. Booleans are set to **on** for true + * and **off** for false. This field must be omitted if the flag + * doesn't take a value. + * + * + * map<string, string> database_flags = 13; */ - @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance.InstanceType getInstanceType() { - com.google.cloud.alloydb.v1beta.Instance.InstanceType result = - com.google.cloud.alloydb.v1beta.Instance.InstanceType.forNumber(instanceType_); - return result == null - ? com.google.cloud.alloydb.v1beta.Instance.InstanceType.UNRECOGNIZED - : result; + public Builder removeDatabaseFlags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableDatabaseFlags().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableDatabaseFlags() { + bitField0_ |= 0x00001000; + return internalGetMutableDatabaseFlags().getMutableMap(); } /** * * *
-     * Required. The type of the instance. Specified at creation time.
-     * 
+ * Database flags. Set at instance level. + * * They are copied from primary instance on read instance creation. + * * Read instances can set new or override existing flags that are relevant + * for reads, e.g. for enabling columnar cache on a read instance. Flags + * set on read instance may or may not be present on primary. * - * - * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; - * * - * @param value The instanceType to set. - * @return This builder for chaining. + * This is a list of "key": "value" pairs. + * "key": The name of the flag. These flags are passed at instance setup time, + * so include both server options and system variables for Postgres. Flags are + * specified with underscores, not hyphens. + * "value": The value of the flag. Booleans are set to **on** for true + * and **off** for false. This field must be omitted if the flag + * doesn't take a value. + * + * + * map<string, string> database_flags = 13; */ - public Builder setInstanceType(com.google.cloud.alloydb.v1beta.Instance.InstanceType value) { + public Builder putDatabaseFlags(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"); } - bitField0_ |= 0x00000100; - instanceType_ = value.getNumber(); - onChanged(); + internalGetMutableDatabaseFlags().getMutableMap().put(key, value); + bitField0_ |= 0x00001000; return this; } /** * * *
-     * Required. The type of the instance. Specified at creation time.
-     * 
+ * Database flags. Set at instance level. + * * They are copied from primary instance on read instance creation. + * * Read instances can set new or override existing flags that are relevant + * for reads, e.g. for enabling columnar cache on a read instance. Flags + * set on read instance may or may not be present on primary. * - * - * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; - * * - * @return This builder for chaining. + * This is a list of "key": "value" pairs. + * "key": The name of the flag. These flags are passed at instance setup time, + * so include both server options and system variables for Postgres. Flags are + * specified with underscores, not hyphens. + * "value": The value of the flag. Booleans are set to **on** for true + * and **off** for false. This field must be omitted if the flag + * doesn't take a value. + * + * + * map<string, string> database_flags = 13; */ - public Builder clearInstanceType() { - bitField0_ = (bitField0_ & ~0x00000100); - instanceType_ = 0; - onChanged(); + public Builder putAllDatabaseFlags(java.util.Map values) { + internalGetMutableDatabaseFlags().getMutableMap().putAll(values); + bitField0_ |= 0x00001000; return this; } - private com.google.cloud.alloydb.v1beta.Instance.MachineConfig machineConfig_; + private com.google.cloud.alloydb.v1beta.Instance.Node writableNode_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.MachineConfig, - com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder> - machineConfigBuilder_; + com.google.cloud.alloydb.v1beta.Instance.Node, + com.google.cloud.alloydb.v1beta.Instance.Node.Builder, + com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder> + writableNodeBuilder_; /** * * *
-     * Configurations for the machines that host the underlying
-     * database engine.
+     * Output only. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return Whether the machineConfig field is set. + * @return Whether the writableNode field is set. */ - public boolean hasMachineConfig() { - return ((bitField0_ & 0x00000200) != 0); + public boolean hasWritableNode() { + return ((bitField0_ & 0x00002000) != 0); } /** * * *
-     * Configurations for the machines that host the underlying
-     * database engine.
+     * Output only. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The machineConfig. + * @return The writableNode. */ - public com.google.cloud.alloydb.v1beta.Instance.MachineConfig getMachineConfig() { - if (machineConfigBuilder_ == null) { - return machineConfig_ == null - ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance() - : machineConfig_; + public com.google.cloud.alloydb.v1beta.Instance.Node getWritableNode() { + if (writableNodeBuilder_ == null) { + return writableNode_ == null + ? com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance() + : writableNode_; } else { - return machineConfigBuilder_.getMessage(); + return writableNodeBuilder_.getMessage(); } } /** * * *
-     * Configurations for the machines that host the underlying
-     * database engine.
+     * Output only. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setMachineConfig(com.google.cloud.alloydb.v1beta.Instance.MachineConfig value) { - if (machineConfigBuilder_ == null) { + public Builder setWritableNode(com.google.cloud.alloydb.v1beta.Instance.Node value) { + if (writableNodeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - machineConfig_ = value; + writableNode_ = value; } else { - machineConfigBuilder_.setMessage(value); + writableNodeBuilder_.setMessage(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -9768,20 +16437,22 @@ public Builder setMachineConfig(com.google.cloud.alloydb.v1beta.Instance.Machine * * *
-     * Configurations for the machines that host the underlying
-     * database engine.
+     * Output only. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setMachineConfig( - com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder builderForValue) { - if (machineConfigBuilder_ == null) { - machineConfig_ = builderForValue.build(); + public Builder setWritableNode( + com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) { + if (writableNodeBuilder_ == null) { + writableNode_ = builderForValue.build(); } else { - machineConfigBuilder_.setMessage(builderForValue.build()); + writableNodeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -9789,28 +16460,29 @@ public Builder setMachineConfig( * * *
-     * Configurations for the machines that host the underlying
-     * database engine.
+     * Output only. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder mergeMachineConfig( - com.google.cloud.alloydb.v1beta.Instance.MachineConfig value) { - if (machineConfigBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) - && machineConfig_ != null - && machineConfig_ - != com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance()) { - getMachineConfigBuilder().mergeFrom(value); + public Builder mergeWritableNode(com.google.cloud.alloydb.v1beta.Instance.Node value) { + if (writableNodeBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && writableNode_ != null + && writableNode_ + != com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance()) { + getWritableNodeBuilder().mergeFrom(value); } else { - machineConfig_ = value; + writableNode_ = value; } } else { - machineConfigBuilder_.mergeFrom(value); + writableNodeBuilder_.mergeFrom(value); } - if (machineConfig_ != null) { - bitField0_ |= 0x00000200; + if (writableNode_ != null) { + bitField0_ |= 0x00002000; onChanged(); } return this; @@ -9819,18 +16491,20 @@ public Builder mergeMachineConfig( * * *
-     * Configurations for the machines that host the underlying
-     * database engine.
+     * Output only. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearMachineConfig() { - bitField0_ = (bitField0_ & ~0x00000200); - machineConfig_ = null; - if (machineConfigBuilder_ != null) { - machineConfigBuilder_.dispose(); - machineConfigBuilder_ = null; + public Builder clearWritableNode() { + bitField0_ = (bitField0_ & ~0x00002000); + writableNode_ = null; + if (writableNodeBuilder_ != null) { + writableNodeBuilder_.dispose(); + writableNodeBuilder_ = null; } onChanged(); return this; @@ -9839,639 +16513,541 @@ public Builder clearMachineConfig() { * * *
-     * Configurations for the machines that host the underlying
-     * database engine.
+     * Output only. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder - getMachineConfigBuilder() { - bitField0_ |= 0x00000200; + public com.google.cloud.alloydb.v1beta.Instance.Node.Builder getWritableNodeBuilder() { + bitField0_ |= 0x00002000; onChanged(); - return getMachineConfigFieldBuilder().getBuilder(); + return getWritableNodeFieldBuilder().getBuilder(); } /** * * *
-     * Configurations for the machines that host the underlying
-     * database engine.
+     * Output only. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder - getMachineConfigOrBuilder() { - if (machineConfigBuilder_ != null) { - return machineConfigBuilder_.getMessageOrBuilder(); + public com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder getWritableNodeOrBuilder() { + if (writableNodeBuilder_ != null) { + return writableNodeBuilder_.getMessageOrBuilder(); } else { - return machineConfig_ == null - ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance() - : machineConfig_; + return writableNode_ == null + ? com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance() + : writableNode_; } } /** * * *
-     * Configurations for the machines that host the underlying
-     * database engine.
+     * Output only. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.MachineConfig, - com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder> - getMachineConfigFieldBuilder() { - if (machineConfigBuilder_ == null) { - machineConfigBuilder_ = + com.google.cloud.alloydb.v1beta.Instance.Node, + com.google.cloud.alloydb.v1beta.Instance.Node.Builder, + com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder> + getWritableNodeFieldBuilder() { + if (writableNodeBuilder_ == null) { + writableNodeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.MachineConfig, - com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder>( - getMachineConfig(), getParentForChildren(), isClean()); - machineConfig_ = null; + com.google.cloud.alloydb.v1beta.Instance.Node, + com.google.cloud.alloydb.v1beta.Instance.Node.Builder, + com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>( + getWritableNode(), getParentForChildren(), isClean()); + writableNode_ = null; } - return machineConfigBuilder_; + return writableNodeBuilder_; } - private int availabilityType_ = 0; + private java.util.List nodes_ = + java.util.Collections.emptyList(); + + private void ensureNodesIsMutable() { + if (!((bitField0_ & 0x00004000) != 0)) { + nodes_ = new java.util.ArrayList(nodes_); + bitField0_ |= 0x00004000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.Node, + com.google.cloud.alloydb.v1beta.Instance.Node.Builder, + com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder> + nodesBuilder_; + /** * * *
-     * Availability type of an Instance.
-     * If empty, defaults to REGIONAL for primary instances.
-     * For read pools, availability_type is always UNSPECIFIED. Instances in the
-     * read pools are evenly distributed across available zones within the region
-     * (i.e. read pools with more than one node will have a node in at
-     * least two zones).
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; - * - * @return The enum numeric value on the wire for availabilityType. + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public int getAvailabilityTypeValue() { - return availabilityType_; + public java.util.List getNodesList() { + if (nodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodes_); + } else { + return nodesBuilder_.getMessageList(); + } } /** * * *
-     * Availability type of an Instance.
-     * If empty, defaults to REGIONAL for primary instances.
-     * For read pools, availability_type is always UNSPECIFIED. Instances in the
-     * read pools are evenly distributed across available zones within the region
-     * (i.e. read pools with more than one node will have a node in at
-     * least two zones).
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; - * - * @param value The enum numeric value on the wire for availabilityType to set. - * @return This builder for chaining. + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setAvailabilityTypeValue(int value) { - availabilityType_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; + public int getNodesCount() { + if (nodesBuilder_ == null) { + return nodes_.size(); + } else { + return nodesBuilder_.getCount(); + } } /** * * *
-     * Availability type of an Instance.
-     * If empty, defaults to REGIONAL for primary instances.
-     * For read pools, availability_type is always UNSPECIFIED. Instances in the
-     * read pools are evenly distributed across available zones within the region
-     * (i.e. read pools with more than one node will have a node in at
-     * least two zones).
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.alloydb.v1beta.Instance.Node getNodes(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessage(index); + } + } + /** * - * @return The availabilityType. + * + *
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public com.google.cloud.alloydb.v1beta.Instance.AvailabilityType getAvailabilityType() { - com.google.cloud.alloydb.v1beta.Instance.AvailabilityType result = - com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.forNumber(availabilityType_); - return result == null - ? com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.UNRECOGNIZED - : result; + public Builder setNodes(int index, com.google.cloud.alloydb.v1beta.Instance.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.set(index, value); + onChanged(); + } else { + nodesBuilder_.setMessage(index, value); + } + return this; } /** * * *
-     * Availability type of an Instance.
-     * If empty, defaults to REGIONAL for primary instances.
-     * For read pools, availability_type is always UNSPECIFIED. Instances in the
-     * read pools are evenly distributed across available zones within the region
-     * (i.e. read pools with more than one node will have a node in at
-     * least two zones).
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; - * - * @param value The availabilityType to set. - * @return This builder for chaining. + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setAvailabilityType( - com.google.cloud.alloydb.v1beta.Instance.AvailabilityType value) { - if (value == null) { - throw new NullPointerException(); + public Builder setNodes( + int index, com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.set(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000400; - availabilityType_ = value.getNumber(); - onChanged(); return this; } /** * * *
-     * Availability type of an Instance.
-     * If empty, defaults to REGIONAL for primary instances.
-     * For read pools, availability_type is always UNSPECIFIED. Instances in the
-     * read pools are evenly distributed across available zones within the region
-     * (i.e. read pools with more than one node will have a node in at
-     * least two zones).
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11; - * - * @return This builder for chaining. + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearAvailabilityType() { - bitField0_ = (bitField0_ & ~0x00000400); - availabilityType_ = 0; - onChanged(); + public Builder addNodes(com.google.cloud.alloydb.v1beta.Instance.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(value); + onChanged(); + } else { + nodesBuilder_.addMessage(value); + } return this; } - - private java.lang.Object gceZone_ = ""; /** * * *
-     * The Compute Engine zone that the instance should serve from, per
-     * https://cloud.google.com/compute/docs/regions-zones
-     * This can ONLY be specified for ZONAL instances.
-     * If present for a REGIONAL instance, an error will be thrown.
-     * If this is absent for a ZONAL instance, instance is created in a random
-     * zone with available capacity.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * string gce_zone = 12; - * - * @return The gceZone. + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public java.lang.String getGceZone() { - java.lang.Object ref = gceZone_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gceZone_ = s; - return s; + public Builder addNodes(int index, com.google.cloud.alloydb.v1beta.Instance.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(index, value); + onChanged(); } else { - return (java.lang.String) ref; + nodesBuilder_.addMessage(index, value); } + return this; } /** * * *
-     * The Compute Engine zone that the instance should serve from, per
-     * https://cloud.google.com/compute/docs/regions-zones
-     * This can ONLY be specified for ZONAL instances.
-     * If present for a REGIONAL instance, an error will be thrown.
-     * If this is absent for a ZONAL instance, instance is created in a random
-     * zone with available capacity.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * string gce_zone = 12; - * - * @return The bytes for gceZone. + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.protobuf.ByteString getGceZoneBytes() { - java.lang.Object ref = gceZone_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gceZone_ = b; - return b; + public Builder addNodes(com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(builderForValue.build()); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + nodesBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
-     * The Compute Engine zone that the instance should serve from, per
-     * https://cloud.google.com/compute/docs/regions-zones
-     * This can ONLY be specified for ZONAL instances.
-     * If present for a REGIONAL instance, an error will be thrown.
-     * If this is absent for a ZONAL instance, instance is created in a random
-     * zone with available capacity.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * string gce_zone = 12; - * - * @param value The gceZone to set. - * @return This builder for chaining. + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setGceZone(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder addNodes( + int index, com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(index, builderForValue.build()); } - gceZone_ = value; - bitField0_ |= 0x00000800; - onChanged(); return this; } /** * * *
-     * The Compute Engine zone that the instance should serve from, per
-     * https://cloud.google.com/compute/docs/regions-zones
-     * This can ONLY be specified for ZONAL instances.
-     * If present for a REGIONAL instance, an error will be thrown.
-     * If this is absent for a ZONAL instance, instance is created in a random
-     * zone with available capacity.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * string gce_zone = 12; - * - * @return This builder for chaining. + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearGceZone() { - gceZone_ = getDefaultInstance().getGceZone(); - bitField0_ = (bitField0_ & ~0x00000800); - onChanged(); + 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 this; } /** * * *
-     * The Compute Engine zone that the instance should serve from, per
-     * https://cloud.google.com/compute/docs/regions-zones
-     * This can ONLY be specified for ZONAL instances.
-     * If present for a REGIONAL instance, an error will be thrown.
-     * If this is absent for a ZONAL instance, instance is created in a random
-     * zone with available capacity.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * string gce_zone = 12; - * - * @param value The bytes for gceZone to set. - * @return This builder for chaining. + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setGceZoneBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearNodes() { + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + } else { + nodesBuilder_.clear(); } - checkByteStringIsUtf8(value); - gceZone_ = value; - bitField0_ |= 0x00000800; - onChanged(); return this; } - - private com.google.protobuf.MapField databaseFlags_; - - private com.google.protobuf.MapField - internalGetDatabaseFlags() { - if (databaseFlags_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DatabaseFlagsDefaultEntryHolder.defaultEntry); - } - return databaseFlags_; - } - - private com.google.protobuf.MapField - internalGetMutableDatabaseFlags() { - if (databaseFlags_ == null) { - databaseFlags_ = - com.google.protobuf.MapField.newMapField(DatabaseFlagsDefaultEntryHolder.defaultEntry); - } - if (!databaseFlags_.isMutable()) { - databaseFlags_ = databaseFlags_.copy(); - } - bitField0_ |= 0x00001000; - onChanged(); - return databaseFlags_; - } - - public int getDatabaseFlagsCount() { - return internalGetDatabaseFlags().getMap().size(); - } /** * * *
-     * Database flags. Set at instance level.
-     *  * They are copied from primary instance on read instance creation.
-     *  * Read instances can set new or override existing flags that are relevant
-     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
-     *    set on read instance may or may not be present on primary.
-     *
-     *
-     * This is a list of "key": "value" pairs.
-     * "key": The name of the flag. These flags are passed at instance setup time,
-     * so include both server options and system variables for Postgres. Flags are
-     * specified with underscores, not hyphens.
-     * "value": The value of the flag. Booleans are set to **on** for true
-     * and **off** for false. This field must be omitted if the flag
-     * doesn't take a value.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * map<string, string> database_flags = 13; + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public boolean containsDatabaseFlags(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder removeNodes(int index) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.remove(index); + onChanged(); + } else { + nodesBuilder_.remove(index); } - return internalGetDatabaseFlags().getMap().containsKey(key); - } - /** Use {@link #getDatabaseFlagsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDatabaseFlags() { - return getDatabaseFlagsMap(); + return this; } /** * * *
-     * Database flags. Set at instance level.
-     *  * They are copied from primary instance on read instance creation.
-     *  * Read instances can set new or override existing flags that are relevant
-     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
-     *    set on read instance may or may not be present on primary.
-     *
-     *
-     * This is a list of "key": "value" pairs.
-     * "key": The name of the flag. These flags are passed at instance setup time,
-     * so include both server options and system variables for Postgres. Flags are
-     * specified with underscores, not hyphens.
-     * "value": The value of the flag. Booleans are set to **on** for true
-     * and **off** for false. This field must be omitted if the flag
-     * doesn't take a value.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * map<string, string> database_flags = 13; + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public java.util.Map getDatabaseFlagsMap() { - return internalGetDatabaseFlags().getMap(); + public com.google.cloud.alloydb.v1beta.Instance.Node.Builder getNodesBuilder(int index) { + return getNodesFieldBuilder().getBuilder(index); } /** * * *
-     * Database flags. Set at instance level.
-     *  * They are copied from primary instance on read instance creation.
-     *  * Read instances can set new or override existing flags that are relevant
-     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
-     *    set on read instance may or may not be present on primary.
-     *
-     *
-     * This is a list of "key": "value" pairs.
-     * "key": The name of the flag. These flags are passed at instance setup time,
-     * so include both server options and system variables for Postgres. Flags are
-     * specified with underscores, not hyphens.
-     * "value": The value of the flag. Booleans are set to **on** for true
-     * and **off** for false. This field must be omitted if the flag
-     * doesn't take a value.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * map<string, string> database_flags = 13; + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public /* nullable */ java.lang.String getDatabaseFlagsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); + public com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder getNodesOrBuilder(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessageOrBuilder(index); } - java.util.Map map = internalGetDatabaseFlags().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Database flags. Set at instance level.
-     *  * They are copied from primary instance on read instance creation.
-     *  * Read instances can set new or override existing flags that are relevant
-     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
-     *    set on read instance may or may not be present on primary.
-     *
-     *
-     * This is a list of "key": "value" pairs.
-     * "key": The name of the flag. These flags are passed at instance setup time,
-     * so include both server options and system variables for Postgres. Flags are
-     * specified with underscores, not hyphens.
-     * "value": The value of the flag. Booleans are set to **on** for true
-     * and **off** for false. This field must be omitted if the flag
-     * doesn't take a value.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * map<string, string> database_flags = 13; + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public java.lang.String getDatabaseFlagsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetDatabaseFlags().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + public java.util.List + getNodesOrBuilderList() { + if (nodesBuilder_ != null) { + return nodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodes_); } - return map.get(key); - } - - public Builder clearDatabaseFlags() { - bitField0_ = (bitField0_ & ~0x00001000); - internalGetMutableDatabaseFlags().getMutableMap().clear(); - return this; } /** * * *
-     * Database flags. Set at instance level.
-     *  * They are copied from primary instance on read instance creation.
-     *  * Read instances can set new or override existing flags that are relevant
-     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
-     *    set on read instance may or may not be present on primary.
-     *
-     *
-     * This is a list of "key": "value" pairs.
-     * "key": The name of the flag. These flags are passed at instance setup time,
-     * so include both server options and system variables for Postgres. Flags are
-     * specified with underscores, not hyphens.
-     * "value": The value of the flag. Booleans are set to **on** for true
-     * and **off** for false. This field must be omitted if the flag
-     * doesn't take a value.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * map<string, string> database_flags = 13; + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder removeDatabaseFlags(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableDatabaseFlags().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableDatabaseFlags() { - bitField0_ |= 0x00001000; - return internalGetMutableDatabaseFlags().getMutableMap(); + public com.google.cloud.alloydb.v1beta.Instance.Node.Builder addNodesBuilder() { + return getNodesFieldBuilder() + .addBuilder(com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance()); } /** * * *
-     * Database flags. Set at instance level.
-     *  * They are copied from primary instance on read instance creation.
-     *  * Read instances can set new or override existing flags that are relevant
-     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
-     *    set on read instance may or may not be present on primary.
-     *
-     *
-     * This is a list of "key": "value" pairs.
-     * "key": The name of the flag. These flags are passed at instance setup time,
-     * so include both server options and system variables for Postgres. Flags are
-     * specified with underscores, not hyphens.
-     * "value": The value of the flag. Booleans are set to **on** for true
-     * and **off** for false. This field must be omitted if the flag
-     * doesn't take a value.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * map<string, string> database_flags = 13; + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder putDatabaseFlags(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableDatabaseFlags().getMutableMap().put(key, value); - bitField0_ |= 0x00001000; - return this; + public com.google.cloud.alloydb.v1beta.Instance.Node.Builder addNodesBuilder(int index) { + return getNodesFieldBuilder() + .addBuilder(index, com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance()); } /** * * *
-     * Database flags. Set at instance level.
-     *  * They are copied from primary instance on read instance creation.
-     *  * Read instances can set new or override existing flags that are relevant
-     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
-     *    set on read instance may or may not be present on primary.
-     *
-     *
-     * This is a list of "key": "value" pairs.
-     * "key": The name of the flag. These flags are passed at instance setup time,
-     * so include both server options and system variables for Postgres. Flags are
-     * specified with underscores, not hyphens.
-     * "value": The value of the flag. Booleans are set to **on** for true
-     * and **off** for false. This field must be omitted if the flag
-     * doesn't take a value.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* - * map<string, string> database_flags = 13; + * + * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder putAllDatabaseFlags(java.util.Map values) { - internalGetMutableDatabaseFlags().getMutableMap().putAll(values); - bitField0_ |= 0x00001000; - return this; + public java.util.List + getNodesBuilderList() { + return getNodesFieldBuilder().getBuilderList(); } - private com.google.cloud.alloydb.v1beta.Instance.Node writableNode_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.alloydb.v1beta.Instance.Node, com.google.cloud.alloydb.v1beta.Instance.Node.Builder, com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder> - writableNodeBuilder_; + getNodesFieldBuilder() { + if (nodesBuilder_ == null) { + nodesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.Node, + com.google.cloud.alloydb.v1beta.Instance.Node.Builder, + com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>( + nodes_, ((bitField0_ & 0x00004000) != 0), getParentForChildren(), isClean()); + nodes_ = null; + } + return nodesBuilder_; + } + + private com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig + queryInsightsConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig, + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder> + queryInsightsConfigBuilder_; /** * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * * - * @return Whether the writableNode field is set. + * @return Whether the queryInsightsConfig field is set. */ - public boolean hasWritableNode() { - return ((bitField0_ & 0x00002000) != 0); + public boolean hasQueryInsightsConfig() { + return ((bitField0_ & 0x00008000) != 0); } /** * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * * - * @return The writableNode. + * @return The queryInsightsConfig. */ - public com.google.cloud.alloydb.v1beta.Instance.Node getWritableNode() { - if (writableNodeBuilder_ == null) { - return writableNode_ == null - ? com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance() - : writableNode_; + public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig + getQueryInsightsConfig() { + if (queryInsightsConfigBuilder_ == null) { + return queryInsightsConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig + .getDefaultInstance() + : queryInsightsConfig_; } else { - return writableNodeBuilder_.getMessage(); + return queryInsightsConfigBuilder_.getMessage(); } } /** * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public Builder setWritableNode(com.google.cloud.alloydb.v1beta.Instance.Node value) { - if (writableNodeBuilder_ == null) { + public Builder setQueryInsightsConfig( + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig value) { + if (queryInsightsConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - writableNode_ = value; + queryInsightsConfig_ = value; } else { - writableNodeBuilder_.setMessage(value); + queryInsightsConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -10479,22 +17055,22 @@ public Builder setWritableNode(com.google.cloud.alloydb.v1beta.Instance.Node val * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public Builder setWritableNode( - com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) { - if (writableNodeBuilder_ == null) { - writableNode_ = builderForValue.build(); + public Builder setQueryInsightsConfig( + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder + builderForValue) { + if (queryInsightsConfigBuilder_ == null) { + queryInsightsConfig_ = builderForValue.build(); } else { - writableNodeBuilder_.setMessage(builderForValue.build()); + queryInsightsConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -10502,29 +17078,30 @@ public Builder setWritableNode( * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public Builder mergeWritableNode(com.google.cloud.alloydb.v1beta.Instance.Node value) { - if (writableNodeBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) - && writableNode_ != null - && writableNode_ - != com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance()) { - getWritableNodeBuilder().mergeFrom(value); + public Builder mergeQueryInsightsConfig( + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig value) { + if (queryInsightsConfigBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && queryInsightsConfig_ != null + && queryInsightsConfig_ + != com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig + .getDefaultInstance()) { + getQueryInsightsConfigBuilder().mergeFrom(value); } else { - writableNode_ = value; + queryInsightsConfig_ = value; } } else { - writableNodeBuilder_.mergeFrom(value); + queryInsightsConfigBuilder_.mergeFrom(value); } - if (writableNode_ != null) { - bitField0_ |= 0x00002000; + if (queryInsightsConfig_ != null) { + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -10533,20 +17110,19 @@ public Builder mergeWritableNode(com.google.cloud.alloydb.v1beta.Instance.Node v * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public Builder clearWritableNode() { - bitField0_ = (bitField0_ & ~0x00002000); - writableNode_ = null; - if (writableNodeBuilder_ != null) { - writableNodeBuilder_.dispose(); - writableNodeBuilder_ = null; + public Builder clearQueryInsightsConfig() { + bitField0_ = (bitField0_ & ~0x00008000); + queryInsightsConfig_ = null; + if (queryInsightsConfigBuilder_ != null) { + queryInsightsConfigBuilder_.dispose(); + queryInsightsConfigBuilder_ = null; } onChanged(); return this; @@ -10555,237 +17131,183 @@ public Builder clearWritableNode() { * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public com.google.cloud.alloydb.v1beta.Instance.Node.Builder getWritableNodeBuilder() { - bitField0_ |= 0x00002000; + public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder + getQueryInsightsConfigBuilder() { + bitField0_ |= 0x00008000; onChanged(); - return getWritableNodeFieldBuilder().getBuilder(); + return getQueryInsightsConfigFieldBuilder().getBuilder(); } /** * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder getWritableNodeOrBuilder() { - if (writableNodeBuilder_ != null) { - return writableNodeBuilder_.getMessageOrBuilder(); + public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder + getQueryInsightsConfigOrBuilder() { + if (queryInsightsConfigBuilder_ != null) { + return queryInsightsConfigBuilder_.getMessageOrBuilder(); } else { - return writableNode_ == null - ? com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance() - : writableNode_; + return queryInsightsConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig + .getDefaultInstance() + : queryInsightsConfig_; } } /** * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.Node, - com.google.cloud.alloydb.v1beta.Instance.Node.Builder, - com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder> - getWritableNodeFieldBuilder() { - if (writableNodeBuilder_ == null) { - writableNodeBuilder_ = + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig, + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder> + getQueryInsightsConfigFieldBuilder() { + if (queryInsightsConfigBuilder_ == null) { + queryInsightsConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.Node, - com.google.cloud.alloydb.v1beta.Instance.Node.Builder, - com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>( - getWritableNode(), getParentForChildren(), isClean()); - writableNode_ = null; - } - return writableNodeBuilder_; - } - - private java.util.List nodes_ = - java.util.Collections.emptyList(); - - private void ensureNodesIsMutable() { - if (!((bitField0_ & 0x00004000) != 0)) { - nodes_ = new java.util.ArrayList(nodes_); - bitField0_ |= 0x00004000; + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig, + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder>( + getQueryInsightsConfig(), getParentForChildren(), isClean()); + queryInsightsConfig_ = null; } + return queryInsightsConfigBuilder_; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.Node, - com.google.cloud.alloydb.v1beta.Instance.Node.Builder, - com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder> - nodesBuilder_; - + private com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig readPoolConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig, + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder> + readPoolConfigBuilder_; /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getNodesList() { - if (nodesBuilder_ == null) { - return java.util.Collections.unmodifiableList(nodes_); - } else { - return nodesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
-     * 
+ * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; * - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @return Whether the readPoolConfig field is set. */ - public int getNodesCount() { - if (nodesBuilder_ == null) { - return nodes_.size(); - } else { - return nodesBuilder_.getCount(); - } + public boolean hasReadPoolConfig() { + return ((bitField0_ & 0x00010000) != 0); } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.alloydb.v1beta.Instance.Node getNodes(int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); - } else { - return nodesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
-     * 
+ * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; * - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @return The readPoolConfig. */ - public Builder setNodes(int index, com.google.cloud.alloydb.v1beta.Instance.Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.set(index, value); - onChanged(); + public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig getReadPoolConfig() { + if (readPoolConfigBuilder_ == null) { + return readPoolConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance() + : readPoolConfig_; } else { - nodesBuilder_.setMessage(index, value); + return readPoolConfigBuilder_.getMessage(); } - return this; } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder setNodes( - int index, com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.set(index, builderForValue.build()); - onChanged(); + public Builder setReadPoolConfig( + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig value) { + if (readPoolConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readPoolConfig_ = value; } else { - nodesBuilder_.setMessage(index, builderForValue.build()); + readPoolConfigBuilder_.setMessage(value); } + bitField0_ |= 0x00010000; + onChanged(); return this; } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder addNodes(com.google.cloud.alloydb.v1beta.Instance.Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(value); - onChanged(); + public Builder setReadPoolConfig( + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder builderForValue) { + if (readPoolConfigBuilder_ == null) { + readPoolConfig_ = builderForValue.build(); } else { - nodesBuilder_.addMessage(value); + readPoolConfigBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00010000; + onChanged(); return this; } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder addNodes(int index, com.google.cloud.alloydb.v1beta.Instance.Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeReadPoolConfig( + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig value) { + if (readPoolConfigBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && readPoolConfig_ != null + && readPoolConfig_ + != com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance()) { + getReadPoolConfigBuilder().mergeFrom(value); + } else { + readPoolConfig_ = value; } - ensureNodesIsMutable(); - nodes_.add(index, value); - onChanged(); } else { - nodesBuilder_.addMessage(index, value); + readPoolConfigBuilder_.mergeFrom(value); + } + if (readPoolConfig_ != null) { + bitField0_ |= 0x00010000; + onChanged(); } return this; } @@ -10793,706 +17315,754 @@ public Builder addNodes(int index, com.google.cloud.alloydb.v1beta.Instance.Node * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder addNodes(com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(builderForValue.build()); + public Builder clearReadPoolConfig() { + bitField0_ = (bitField0_ & ~0x00010000); + readPoolConfig_ = null; + if (readPoolConfigBuilder_ != null) { + readPoolConfigBuilder_.dispose(); + readPoolConfigBuilder_ = null; } + onChanged(); return this; } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder addNodes( - int index, com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(index, builderForValue.build()); - } - return this; + public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder + getReadPoolConfigBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getReadPoolConfigFieldBuilder().getBuilder(); } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder addAllNodes( - java.lang.Iterable values) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); - onChanged(); + public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder + getReadPoolConfigOrBuilder() { + if (readPoolConfigBuilder_ != null) { + return readPoolConfigBuilder_.getMessageOrBuilder(); } else { - nodesBuilder_.addAllMessages(values); + return readPoolConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance() + : readPoolConfig_; } - return this; } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder clearNodes() { - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00004000); - onChanged(); - } else { - nodesBuilder_.clear(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig, + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder> + getReadPoolConfigFieldBuilder() { + if (readPoolConfigBuilder_ == null) { + readPoolConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig, + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder>( + getReadPoolConfig(), getParentForChildren(), isClean()); + readPoolConfig_ = null; } - return this; + return readPoolConfigBuilder_; } + + private java.lang.Object ipAddress_ = ""; /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Output only. The IP address for the Instance.
+     * This is the connection endpoint for an end-user application.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ipAddress. */ - public Builder removeNodes(int index) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.remove(index); - onChanged(); + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; } else { - nodesBuilder_.remove(index); + return (java.lang.String) ref; } - return this; } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Output only. The IP address for the Instance.
+     * This is the connection endpoint for an end-user application.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ipAddress. */ - public com.google.cloud.alloydb.v1beta.Instance.Node.Builder getNodesBuilder(int index) { - return getNodesFieldBuilder().getBuilder(index); + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Output only. The IP address for the Instance.
+     * This is the connection endpoint for an end-user application.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The ipAddress to set. + * @return This builder for chaining. */ - public com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder getNodesOrBuilder(int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); - } else { - return nodesBuilder_.getMessageOrBuilder(index); + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ipAddress_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Output only. The IP address for the Instance.
+     * This is the connection endpoint for an end-user application.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - public java.util.List - getNodesOrBuilderList() { - if (nodesBuilder_ != null) { - return nodesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nodes_); - } + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + return this; } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Output only. The IP address for the Instance.
+     * This is the connection endpoint for an end-user application.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. */ - public com.google.cloud.alloydb.v1beta.Instance.Node.Builder addNodesBuilder() { - return getNodesFieldBuilder() - .addBuilder(com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance()); + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; } + + private java.lang.Object publicIpAddress_ = ""; /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicIpAddress. */ - public com.google.cloud.alloydb.v1beta.Instance.Node.Builder addNodesBuilder(int index) { - return getNodesFieldBuilder() - .addBuilder(index, com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance()); + public java.lang.String getPublicIpAddress() { + java.lang.Object ref = publicIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
      * 
* - * - * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicIpAddress. */ - public java.util.List - getNodesBuilderList() { - return getNodesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.Node, - com.google.cloud.alloydb.v1beta.Instance.Node.Builder, - com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder> - getNodesFieldBuilder() { - if (nodesBuilder_ == null) { - nodesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.Node, - com.google.cloud.alloydb.v1beta.Instance.Node.Builder, - com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>( - nodes_, ((bitField0_ & 0x00004000) != 0), getParentForChildren(), isClean()); - nodes_ = null; + public com.google.protobuf.ByteString getPublicIpAddressBytes() { + java.lang.Object ref = publicIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - return nodesBuilder_; } - - private com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig - queryInsightsConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig, - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder> - queryInsightsConfigBuilder_; /** * * *
-     * Configuration for query insights.
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return Whether the queryInsightsConfig field is set. + * @param value The publicIpAddress to set. + * @return This builder for chaining. */ - public boolean hasQueryInsightsConfig() { - return ((bitField0_ & 0x00008000) != 0); + public Builder setPublicIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + publicIpAddress_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; } /** * * *
-     * Configuration for query insights.
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The queryInsightsConfig. + * @return This builder for chaining. */ - public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig - getQueryInsightsConfig() { - if (queryInsightsConfigBuilder_ == null) { - return queryInsightsConfig_ == null - ? com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig - .getDefaultInstance() - : queryInsightsConfig_; - } else { - return queryInsightsConfigBuilder_.getMessage(); - } + public Builder clearPublicIpAddress() { + publicIpAddress_ = getDefaultInstance().getPublicIpAddress(); + bitField0_ = (bitField0_ & ~0x00040000); + onChanged(); + return this; } /** * * *
-     * Configuration for query insights.
+     * Output only. The public IP addresses for the Instance. This is available
+     * ONLY when enable_public_ip is set. This is the connection endpoint for an
+     * end-user application.
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for publicIpAddress to set. + * @return This builder for chaining. */ - public Builder setQueryInsightsConfig( - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig value) { - if (queryInsightsConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - queryInsightsConfig_ = value; - } else { - queryInsightsConfigBuilder_.setMessage(value); + public Builder setPublicIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00008000; + checkByteStringIsUtf8(value); + publicIpAddress_ = value; + bitField0_ |= 0x00040000; onChanged(); return this; } + + private boolean reconciling_; /** * * *
-     * Configuration for query insights.
+     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
+     * Set to true if the current state of Instance does not match the user's
+     * intended state, and the service is actively updating the resource to
+     * reconcile them. This can happen due to user-triggered updates or
+     * system actions like failover or maintenance.
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. */ - public Builder setQueryInsightsConfig( - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder - builderForValue) { - if (queryInsightsConfigBuilder_ == null) { - queryInsightsConfig_ = builderForValue.build(); - } else { - queryInsightsConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00008000; - onChanged(); - return this; + @java.lang.Override + public boolean getReconciling() { + return reconciling_; } /** * * *
-     * Configuration for query insights.
+     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
+     * Set to true if the current state of Instance does not match the user's
+     * intended state, and the service is actively updating the resource to
+     * reconcile them. This can happen due to user-triggered updates or
+     * system actions like failover or maintenance.
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The reconciling to set. + * @return This builder for chaining. */ - public Builder mergeQueryInsightsConfig( - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig value) { - if (queryInsightsConfigBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) - && queryInsightsConfig_ != null - && queryInsightsConfig_ - != com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig - .getDefaultInstance()) { - getQueryInsightsConfigBuilder().mergeFrom(value); - } else { - queryInsightsConfig_ = value; - } - } else { - queryInsightsConfigBuilder_.mergeFrom(value); - } - if (queryInsightsConfig_ != null) { - bitField0_ |= 0x00008000; - onChanged(); - } + public Builder setReconciling(boolean value) { + + reconciling_ = value; + bitField0_ |= 0x00080000; + onChanged(); return this; } /** * * *
-     * Configuration for query insights.
+     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
+     * Set to true if the current state of Instance does not match the user's
+     * intended state, and the service is actively updating the resource to
+     * reconcile them. This can happen due to user-triggered updates or
+     * system actions like failover or maintenance.
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - public Builder clearQueryInsightsConfig() { - bitField0_ = (bitField0_ & ~0x00008000); - queryInsightsConfig_ = null; - if (queryInsightsConfigBuilder_ != null) { - queryInsightsConfigBuilder_.dispose(); - queryInsightsConfigBuilder_ = null; - } + public Builder clearReconciling() { + bitField0_ = (bitField0_ & ~0x00080000); + reconciling_ = false; onChanged(); return this; } + + private java.lang.Object etag_ = ""; /** * * *
-     * Configuration for query insights.
+     * For Resource freshness validation (https://google.aip.dev/154)
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * string etag = 17; + * + * @return The etag. */ - public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder - getQueryInsightsConfigBuilder() { - bitField0_ |= 0x00008000; - onChanged(); - return getQueryInsightsConfigFieldBuilder().getBuilder(); + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
-     * Configuration for query insights.
+     * For Resource freshness validation (https://google.aip.dev/154)
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * string etag = 17; + * + * @return The bytes for etag. */ - public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder - getQueryInsightsConfigOrBuilder() { - if (queryInsightsConfigBuilder_ != null) { - return queryInsightsConfigBuilder_.getMessageOrBuilder(); + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; } else { - return queryInsightsConfig_ == null - ? com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig - .getDefaultInstance() - : queryInsightsConfig_; + return (com.google.protobuf.ByteString) ref; } } /** * * *
-     * Configuration for query insights.
+     * For Resource freshness validation (https://google.aip.dev/154)
      * 
* - * - * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * string etag = 17; + * + * @param value The etag to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig, - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder> - getQueryInsightsConfigFieldBuilder() { - if (queryInsightsConfigBuilder_ == null) { - queryInsightsConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig, - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder>( - getQueryInsightsConfig(), getParentForChildren(), isClean()); - queryInsightsConfig_ = null; + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - return queryInsightsConfigBuilder_; + etag_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; } - - private com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig readPoolConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig, - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder> - readPoolConfigBuilder_; /** * * *
-     * Read pool specific config.
+     * For Resource freshness validation (https://google.aip.dev/154)
      * 
* - * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; + * string etag = 17; * - * @return Whether the readPoolConfig field is set. + * @return This builder for chaining. */ - public boolean hasReadPoolConfig() { - return ((bitField0_ & 0x00010000) != 0); + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00100000); + onChanged(); + return this; } /** * * *
-     * Read pool specific config.
+     * For Resource freshness validation (https://google.aip.dev/154)
      * 
* - * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; + * string etag = 17; * - * @return The readPoolConfig. + * @param value The bytes for etag to set. + * @return This builder for chaining. */ - public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig getReadPoolConfig() { - if (readPoolConfigBuilder_ == null) { - return readPoolConfig_ == null - ? com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance() - : readPoolConfig_; - } else { - return readPoolConfigBuilder_.getMessage(); + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); } + bitField0_ |= 0x00200000; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); } /** * * *
-     * Read pool specific config.
+     * Annotations to allow client tools to store small amount of arbitrary data.
+     * This is distinct from labels.
+     * https://google.aip.dev/128
      * 
* - * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; + * map<string, string> annotations = 18; */ - public Builder setReadPoolConfig( - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig value) { - if (readPoolConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readPoolConfig_ = value; - } else { - readPoolConfigBuilder_.setMessage(value); + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00010000; - onChanged(); - return this; + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); } /** * * *
-     * Read pool specific config.
+     * Annotations to allow client tools to store small amount of arbitrary data.
+     * This is distinct from labels.
+     * https://google.aip.dev/128
      * 
* - * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; + * map<string, string> annotations = 18; */ - public Builder setReadPoolConfig( - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder builderForValue) { - if (readPoolConfigBuilder_ == null) { - readPoolConfig_ = builderForValue.build(); - } else { - readPoolConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00010000; - onChanged(); - return this; + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); } /** * * *
-     * Read pool specific config.
+     * Annotations to allow client tools to store small amount of arbitrary data.
+     * This is distinct from labels.
+     * https://google.aip.dev/128
      * 
* - * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; + * map<string, string> annotations = 18; */ - public Builder mergeReadPoolConfig( - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig value) { - if (readPoolConfigBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) - && readPoolConfig_ != null - && readPoolConfig_ - != com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance()) { - getReadPoolConfigBuilder().mergeFrom(value); - } else { - readPoolConfig_ = value; - } - } else { - readPoolConfigBuilder_.mergeFrom(value); - } - if (readPoolConfig_ != null) { - bitField0_ |= 0x00010000; - onChanged(); + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } - return this; + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Read pool specific config.
+     * Annotations to allow client tools to store small amount of arbitrary data.
+     * This is distinct from labels.
+     * https://google.aip.dev/128
      * 
* - * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; + * map<string, string> annotations = 18; */ - public Builder clearReadPoolConfig() { - bitField0_ = (bitField0_ & ~0x00010000); - readPoolConfig_ = null; - if (readPoolConfigBuilder_ != null) { - readPoolConfigBuilder_.dispose(); - readPoolConfigBuilder_ = null; + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - onChanged(); + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00200000); + internalGetMutableAnnotations().getMutableMap().clear(); return this; } /** * * *
-     * Read pool specific config.
+     * Annotations to allow client tools to store small amount of arbitrary data.
+     * This is distinct from labels.
+     * https://google.aip.dev/128
      * 
* - * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; + * map<string, string> annotations = 18; */ - public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder - getReadPoolConfigBuilder() { - bitField0_ |= 0x00010000; - onChanged(); - return getReadPoolConfigFieldBuilder().getBuilder(); + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00200000; + return internalGetMutableAnnotations().getMutableMap(); } /** * * *
-     * Read pool specific config.
+     * Annotations to allow client tools to store small amount of arbitrary data.
+     * This is distinct from labels.
+     * https://google.aip.dev/128
      * 
* - * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; + * map<string, string> annotations = 18; */ - public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder - getReadPoolConfigOrBuilder() { - if (readPoolConfigBuilder_ != null) { - return readPoolConfigBuilder_.getMessageOrBuilder(); - } else { - return readPoolConfig_ == null - ? com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance() - : readPoolConfig_; + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00200000; + return this; + } + /** + * + * + *
+     * Annotations to allow client tools to store small amount of arbitrary data.
+     * This is distinct from labels.
+     * https://google.aip.dev/128
+     * 
+ * + * map<string, string> annotations = 18; + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00200000; + return this; } + + private com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy updatePolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy, + com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Builder, + com.google.cloud.alloydb.v1beta.Instance.UpdatePolicyOrBuilder> + updatePolicyBuilder_; /** * * *
-     * Read pool specific config.
+     * Update policy that will be applied during instance update.
+     * This field is not persisted when you update the instance.
+     * To use a non-default update policy, you must
+     * specify explicitly specify the value in each update request.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; + * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; + * + * @return Whether the updatePolicy field is set. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig, - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder> - getReadPoolConfigFieldBuilder() { - if (readPoolConfigBuilder_ == null) { - readPoolConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig, - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder>( - getReadPoolConfig(), getParentForChildren(), isClean()); - readPoolConfig_ = null; - } - return readPoolConfigBuilder_; + public boolean hasUpdatePolicy() { + return ((bitField0_ & 0x00400000) != 0); } - - private java.lang.Object ipAddress_ = ""; /** * * *
-     * Output only. The IP address for the Instance.
-     * This is the connection endpoint for an end-user application.
+     * Update policy that will be applied during instance update.
+     * This field is not persisted when you update the instance.
+     * To use a non-default update policy, you must
+     * specify explicitly specify the value in each update request.
      * 
* - * string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; * - * @return The ipAddress. + * @return The updatePolicy. */ - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ipAddress_ = s; - return s; + public com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy getUpdatePolicy() { + if (updatePolicyBuilder_ == null) { + return updatePolicy_ == null + ? com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.getDefaultInstance() + : updatePolicy_; } else { - return (java.lang.String) ref; + return updatePolicyBuilder_.getMessage(); } } /** * * *
-     * Output only. The IP address for the Instance.
-     * This is the connection endpoint for an end-user application.
+     * Update policy that will be applied during instance update.
+     * This field is not persisted when you update the instance.
+     * To use a non-default update policy, you must
+     * specify explicitly specify the value in each update request.
      * 
* - * string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for ipAddress. + * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; */ - public com.google.protobuf.ByteString getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ipAddress_ = b; - return b; + public Builder setUpdatePolicy(com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy value) { + if (updatePolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updatePolicy_ = value; } else { - return (com.google.protobuf.ByteString) ref; + updatePolicyBuilder_.setMessage(value); } + bitField0_ |= 0x00400000; + onChanged(); + return this; } /** * * *
-     * Output only. The IP address for the Instance.
-     * This is the connection endpoint for an end-user application.
+     * Update policy that will be applied during instance update.
+     * This field is not persisted when you update the instance.
+     * To use a non-default update policy, you must
+     * specify explicitly specify the value in each update request.
      * 
* - * string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The ipAddress to set. - * @return This builder for chaining. + * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; */ - public Builder setIpAddress(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setUpdatePolicy( + com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Builder builderForValue) { + if (updatePolicyBuilder_ == null) { + updatePolicy_ = builderForValue.build(); + } else { + updatePolicyBuilder_.setMessage(builderForValue.build()); } - ipAddress_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -11500,172 +18070,190 @@ public Builder setIpAddress(java.lang.String value) { * * *
-     * Output only. The IP address for the Instance.
-     * This is the connection endpoint for an end-user application.
+     * Update policy that will be applied during instance update.
+     * This field is not persisted when you update the instance.
+     * To use a non-default update policy, you must
+     * specify explicitly specify the value in each update request.
      * 
* - * string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. + * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; */ - public Builder clearIpAddress() { - ipAddress_ = getDefaultInstance().getIpAddress(); - bitField0_ = (bitField0_ & ~0x00020000); - onChanged(); + public Builder mergeUpdatePolicy(com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy value) { + if (updatePolicyBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) + && updatePolicy_ != null + && updatePolicy_ + != com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.getDefaultInstance()) { + getUpdatePolicyBuilder().mergeFrom(value); + } else { + updatePolicy_ = value; + } + } else { + updatePolicyBuilder_.mergeFrom(value); + } + if (updatePolicy_ != null) { + bitField0_ |= 0x00400000; + onChanged(); + } return this; } /** * * *
-     * Output only. The IP address for the Instance.
-     * This is the connection endpoint for an end-user application.
+     * Update policy that will be applied during instance update.
+     * This field is not persisted when you update the instance.
+     * To use a non-default update policy, you must
+     * specify explicitly specify the value in each update request.
      * 
* - * string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for ipAddress to set. - * @return This builder for chaining. + * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; */ - public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearUpdatePolicy() { + bitField0_ = (bitField0_ & ~0x00400000); + updatePolicy_ = null; + if (updatePolicyBuilder_ != null) { + updatePolicyBuilder_.dispose(); + updatePolicyBuilder_ = null; } - checkByteStringIsUtf8(value); - ipAddress_ = value; - bitField0_ |= 0x00020000; onChanged(); return this; } - - private boolean reconciling_; /** * * *
-     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
-     * Set to true if the current state of Instance does not match the user's
-     * intended state, and the service is actively updating the resource to
-     * reconcile them. This can happen due to user-triggered updates or
-     * system actions like failover or maintenance.
+     * Update policy that will be applied during instance update.
+     * This field is not persisted when you update the instance.
+     * To use a non-default update policy, you must
+     * specify explicitly specify the value in each update request.
      * 
* - * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The reconciling. + * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; */ - @java.lang.Override - public boolean getReconciling() { - return reconciling_; + public com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Builder getUpdatePolicyBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getUpdatePolicyFieldBuilder().getBuilder(); } /** * * *
-     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
-     * Set to true if the current state of Instance does not match the user's
-     * intended state, and the service is actively updating the resource to
-     * reconcile them. This can happen due to user-triggered updates or
-     * system actions like failover or maintenance.
+     * Update policy that will be applied during instance update.
+     * This field is not persisted when you update the instance.
+     * To use a non-default update policy, you must
+     * specify explicitly specify the value in each update request.
      * 
* - * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The reconciling to set. - * @return This builder for chaining. + * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; */ - public Builder setReconciling(boolean value) { - - reconciling_ = value; - bitField0_ |= 0x00040000; - onChanged(); - return this; + public com.google.cloud.alloydb.v1beta.Instance.UpdatePolicyOrBuilder + getUpdatePolicyOrBuilder() { + if (updatePolicyBuilder_ != null) { + return updatePolicyBuilder_.getMessageOrBuilder(); + } else { + return updatePolicy_ == null + ? com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.getDefaultInstance() + : updatePolicy_; + } } /** * * *
-     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
-     * Set to true if the current state of Instance does not match the user's
-     * intended state, and the service is actively updating the resource to
-     * reconcile them. This can happen due to user-triggered updates or
-     * system actions like failover or maintenance.
+     * Update policy that will be applied during instance update.
+     * This field is not persisted when you update the instance.
+     * To use a non-default update policy, you must
+     * specify explicitly specify the value in each update request.
      * 
* - * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. + * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; */ - public Builder clearReconciling() { - bitField0_ = (bitField0_ & ~0x00040000); - reconciling_ = false; - onChanged(); - return this; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy, + com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Builder, + com.google.cloud.alloydb.v1beta.Instance.UpdatePolicyOrBuilder> + getUpdatePolicyFieldBuilder() { + if (updatePolicyBuilder_ == null) { + updatePolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy, + com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Builder, + com.google.cloud.alloydb.v1beta.Instance.UpdatePolicyOrBuilder>( + getUpdatePolicy(), getParentForChildren(), isClean()); + updatePolicy_ = null; + } + return updatePolicyBuilder_; } - private java.lang.Object etag_ = ""; + private com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig clientConnectionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig, + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigOrBuilder> + clientConnectionConfigBuilder_; /** * * *
-     * For Resource freshness validation (https://google.aip.dev/154)
+     * Optional. Client connection specific configurations
      * 
* - * string etag = 17; + * + * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The etag. + * @return Whether the clientConnectionConfig field is set. */ - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public boolean hasClientConnectionConfig() { + return ((bitField0_ & 0x00800000) != 0); } /** * * *
-     * For Resource freshness validation (https://google.aip.dev/154)
+     * Optional. Client connection specific configurations
      * 
* - * string etag = 17; + * + * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The bytes for etag. + * @return The clientConnectionConfig. */ - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; + public com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig + getClientConnectionConfig() { + if (clientConnectionConfigBuilder_ == null) { + return clientConnectionConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.getDefaultInstance() + : clientConnectionConfig_; } else { - return (com.google.protobuf.ByteString) ref; + return clientConnectionConfigBuilder_.getMessage(); } } /** * * *
-     * For Resource freshness validation (https://google.aip.dev/154)
+     * Optional. Client connection specific configurations
      * 
* - * string etag = 17; - * - * @param value The etag to set. - * @return This builder for chaining. + * + * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setEtag(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setClientConnectionConfig( + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig value) { + if (clientConnectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clientConnectionConfig_ = value; + } else { + clientConnectionConfigBuilder_.setMessage(value); } - etag_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -11673,16 +18261,21 @@ public Builder setEtag(java.lang.String value) { * * *
-     * For Resource freshness validation (https://google.aip.dev/154)
+     * Optional. Client connection specific configurations
      * 
* - * string etag = 17; - * - * @return This builder for chaining. + * + * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearEtag() { - etag_ = getDefaultInstance().getEtag(); - bitField0_ = (bitField0_ & ~0x00080000); + public Builder setClientConnectionConfig( + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.Builder builderForValue) { + if (clientConnectionConfigBuilder_ == null) { + clientConnectionConfig_ = builderForValue.build(); + } else { + clientConnectionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -11690,273 +18283,243 @@ public Builder clearEtag() { * * *
-     * For Resource freshness validation (https://google.aip.dev/154)
+     * Optional. Client connection specific configurations
      * 
* - * string etag = 17; - * - * @param value The bytes for etag to set. - * @return This builder for chaining. + * + * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setEtagBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - etag_ = value; - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - - private com.google.protobuf.MapField annotations_; - - private com.google.protobuf.MapField - internalGetAnnotations() { - if (annotations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - } - return annotations_; - } - - private com.google.protobuf.MapField - internalGetMutableAnnotations() { - if (annotations_ == null) { - annotations_ = - com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + public Builder mergeClientConnectionConfig( + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig value) { + if (clientConnectionConfigBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) + && clientConnectionConfig_ != null + && clientConnectionConfig_ + != com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig + .getDefaultInstance()) { + getClientConnectionConfigBuilder().mergeFrom(value); + } else { + clientConnectionConfig_ = value; + } + } else { + clientConnectionConfigBuilder_.mergeFrom(value); } - if (!annotations_.isMutable()) { - annotations_ = annotations_.copy(); + if (clientConnectionConfig_ != null) { + bitField0_ |= 0x00800000; + onChanged(); } - bitField0_ |= 0x00100000; - onChanged(); - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); + return this; } /** * * *
-     * Annotations to allow client tools to store small amount of arbitrary data.
-     * This is distinct from labels.
-     * https://google.aip.dev/128
+     * Optional. Client connection specific configurations
      * 
* - * map<string, string> annotations = 18; + * + * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public boolean containsAnnotations(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder clearClientConnectionConfig() { + bitField0_ = (bitField0_ & ~0x00800000); + clientConnectionConfig_ = null; + if (clientConnectionConfigBuilder_ != null) { + clientConnectionConfigBuilder_.dispose(); + clientConnectionConfigBuilder_ = null; } - return internalGetAnnotations().getMap().containsKey(key); - } - /** Use {@link #getAnnotationsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); + onChanged(); + return this; } /** * * *
-     * Annotations to allow client tools to store small amount of arbitrary data.
-     * This is distinct from labels.
-     * https://google.aip.dev/128
+     * Optional. Client connection specific configurations
      * 
* - * map<string, string> annotations = 18; + * + * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); + public com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.Builder + getClientConnectionConfigBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getClientConnectionConfigFieldBuilder().getBuilder(); } /** * * *
-     * Annotations to allow client tools to store small amount of arbitrary data.
-     * This is distinct from labels.
-     * https://google.aip.dev/128
+     * Optional. Client connection specific configurations
      * 
* - * map<string, string> annotations = 18; + * + * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public /* nullable */ java.lang.String getAnnotationsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); + public com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigOrBuilder + getClientConnectionConfigOrBuilder() { + if (clientConnectionConfigBuilder_ != null) { + return clientConnectionConfigBuilder_.getMessageOrBuilder(); + } else { + return clientConnectionConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.getDefaultInstance() + : clientConnectionConfig_; } - java.util.Map map = internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Annotations to allow client tools to store small amount of arbitrary data.
-     * This is distinct from labels.
-     * https://google.aip.dev/128
+     * Optional. Client connection specific configurations
      * 
* - * map<string, string> annotations = 18; + * + * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public java.lang.String getAnnotationsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetAnnotations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig, + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigOrBuilder> + getClientConnectionConfigFieldBuilder() { + if (clientConnectionConfigBuilder_ == null) { + clientConnectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig, + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigOrBuilder>( + getClientConnectionConfig(), getParentForChildren(), isClean()); + clientConnectionConfig_ = null; } - return map.get(key); + return clientConnectionConfigBuilder_; } - public Builder clearAnnotations() { - bitField0_ = (bitField0_ & ~0x00100000); - internalGetMutableAnnotations().getMutableMap().clear(); - return this; - } + private boolean satisfiesPzs_; /** * * - *
-     * Annotations to allow client tools to store small amount of arbitrary data.
-     * This is distinct from labels.
-     * https://google.aip.dev/128
+     * 
+     * Output only. Reserved for future use.
      * 
* - * map<string, string> annotations = 18; + * bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. */ - public Builder removeAnnotations(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableAnnotations().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableAnnotations() { - bitField0_ |= 0x00100000; - return internalGetMutableAnnotations().getMutableMap(); + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; } /** * * *
-     * Annotations to allow client tools to store small amount of arbitrary data.
-     * This is distinct from labels.
-     * https://google.aip.dev/128
+     * Output only. Reserved for future use.
      * 
* - * map<string, string> annotations = 18; + * bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzs to set. + * @return This builder for chaining. */ - public Builder putAnnotations(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableAnnotations().getMutableMap().put(key, value); - bitField0_ |= 0x00100000; + public Builder setSatisfiesPzs(boolean value) { + + satisfiesPzs_ = value; + bitField0_ |= 0x01000000; + onChanged(); return this; } /** * * *
-     * Annotations to allow client tools to store small amount of arbitrary data.
-     * This is distinct from labels.
-     * https://google.aip.dev/128
+     * Output only. Reserved for future use.
      * 
* - * map<string, string> annotations = 18; + * bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - public Builder putAllAnnotations(java.util.Map values) { - internalGetMutableAnnotations().getMutableMap().putAll(values); - bitField0_ |= 0x00100000; + public Builder clearSatisfiesPzs() { + bitField0_ = (bitField0_ & ~0x01000000); + satisfiesPzs_ = false; + onChanged(); return this; } - private com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy updatePolicy_; + private com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig pscInstanceConfig_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy, - com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Builder, - com.google.cloud.alloydb.v1beta.Instance.UpdatePolicyOrBuilder> - updatePolicyBuilder_; + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig, + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfigOrBuilder> + pscInstanceConfigBuilder_; /** * * *
-     * Update policy that will be applied during instance update.
-     * This field is not persisted when you update the instance.
-     * To use a non-default update policy, you must
-     * specify explicitly specify the value in each update request.
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return Whether the updatePolicy field is set. + * @return Whether the pscInstanceConfig field is set. */ - public boolean hasUpdatePolicy() { - return ((bitField0_ & 0x00200000) != 0); + public boolean hasPscInstanceConfig() { + return ((bitField0_ & 0x02000000) != 0); } /** * * *
-     * Update policy that will be applied during instance update.
-     * This field is not persisted when you update the instance.
-     * To use a non-default update policy, you must
-     * specify explicitly specify the value in each update request.
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The updatePolicy. + * @return The pscInstanceConfig. */ - public com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy getUpdatePolicy() { - if (updatePolicyBuilder_ == null) { - return updatePolicy_ == null - ? com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.getDefaultInstance() - : updatePolicy_; + public com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig getPscInstanceConfig() { + if (pscInstanceConfigBuilder_ == null) { + return pscInstanceConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.getDefaultInstance() + : pscInstanceConfig_; } else { - return updatePolicyBuilder_.getMessage(); + return pscInstanceConfigBuilder_.getMessage(); } } /** * * *
-     * Update policy that will be applied during instance update.
-     * This field is not persisted when you update the instance.
-     * To use a non-default update policy, you must
-     * specify explicitly specify the value in each update request.
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setUpdatePolicy(com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy value) { - if (updatePolicyBuilder_ == null) { + public Builder setPscInstanceConfig( + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig value) { + if (pscInstanceConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - updatePolicy_ = value; + pscInstanceConfig_ = value; } else { - updatePolicyBuilder_.setMessage(value); + pscInstanceConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -11964,22 +18527,22 @@ public Builder setUpdatePolicy(com.google.cloud.alloydb.v1beta.Instance.UpdatePo * * *
-     * Update policy that will be applied during instance update.
-     * This field is not persisted when you update the instance.
-     * To use a non-default update policy, you must
-     * specify explicitly specify the value in each update request.
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setUpdatePolicy( - com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Builder builderForValue) { - if (updatePolicyBuilder_ == null) { - updatePolicy_ = builderForValue.build(); + public Builder setPscInstanceConfig( + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.Builder builderForValue) { + if (pscInstanceConfigBuilder_ == null) { + pscInstanceConfig_ = builderForValue.build(); } else { - updatePolicyBuilder_.setMessage(builderForValue.build()); + pscInstanceConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -11987,29 +18550,31 @@ public Builder setUpdatePolicy( * * *
-     * Update policy that will be applied during instance update.
-     * This field is not persisted when you update the instance.
-     * To use a non-default update policy, you must
-     * specify explicitly specify the value in each update request.
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder mergeUpdatePolicy(com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy value) { - if (updatePolicyBuilder_ == null) { - if (((bitField0_ & 0x00200000) != 0) - && updatePolicy_ != null - && updatePolicy_ - != com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.getDefaultInstance()) { - getUpdatePolicyBuilder().mergeFrom(value); + public Builder mergePscInstanceConfig( + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig value) { + if (pscInstanceConfigBuilder_ == null) { + if (((bitField0_ & 0x02000000) != 0) + && pscInstanceConfig_ != null + && pscInstanceConfig_ + != com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig + .getDefaultInstance()) { + getPscInstanceConfigBuilder().mergeFrom(value); } else { - updatePolicy_ = value; + pscInstanceConfig_ = value; } } else { - updatePolicyBuilder_.mergeFrom(value); + pscInstanceConfigBuilder_.mergeFrom(value); } - if (updatePolicy_ != null) { - bitField0_ |= 0x00200000; + if (pscInstanceConfig_ != null) { + bitField0_ |= 0x02000000; onChanged(); } return this; @@ -12018,20 +18583,20 @@ public Builder mergeUpdatePolicy(com.google.cloud.alloydb.v1beta.Instance.Update * * *
-     * Update policy that will be applied during instance update.
-     * This field is not persisted when you update the instance.
-     * To use a non-default update policy, you must
-     * specify explicitly specify the value in each update request.
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearUpdatePolicy() { - bitField0_ = (bitField0_ & ~0x00200000); - updatePolicy_ = null; - if (updatePolicyBuilder_ != null) { - updatePolicyBuilder_.dispose(); - updatePolicyBuilder_ = null; + public Builder clearPscInstanceConfig() { + bitField0_ = (bitField0_ & ~0x02000000); + pscInstanceConfig_ = null; + if (pscInstanceConfigBuilder_ != null) { + pscInstanceConfigBuilder_.dispose(); + pscInstanceConfigBuilder_ = null; } onChanged(); return this; @@ -12040,137 +18605,137 @@ public Builder clearUpdatePolicy() { * * *
-     * Update policy that will be applied during instance update.
-     * This field is not persisted when you update the instance.
-     * To use a non-default update policy, you must
-     * specify explicitly specify the value in each update request.
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Builder getUpdatePolicyBuilder() { - bitField0_ |= 0x00200000; + public com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.Builder + getPscInstanceConfigBuilder() { + bitField0_ |= 0x02000000; onChanged(); - return getUpdatePolicyFieldBuilder().getBuilder(); + return getPscInstanceConfigFieldBuilder().getBuilder(); } /** * * *
-     * Update policy that will be applied during instance update.
-     * This field is not persisted when you update the instance.
-     * To use a non-default update policy, you must
-     * specify explicitly specify the value in each update request.
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.cloud.alloydb.v1beta.Instance.UpdatePolicyOrBuilder - getUpdatePolicyOrBuilder() { - if (updatePolicyBuilder_ != null) { - return updatePolicyBuilder_.getMessageOrBuilder(); + public com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfigOrBuilder + getPscInstanceConfigOrBuilder() { + if (pscInstanceConfigBuilder_ != null) { + return pscInstanceConfigBuilder_.getMessageOrBuilder(); } else { - return updatePolicy_ == null - ? com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.getDefaultInstance() - : updatePolicy_; + return pscInstanceConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.getDefaultInstance() + : pscInstanceConfig_; } } /** * * *
-     * Update policy that will be applied during instance update.
-     * This field is not persisted when you update the instance.
-     * To use a non-default update policy, you must
-     * specify explicitly specify the value in each update request.
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * instance.
      * 
* - * .google.cloud.alloydb.v1beta.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy, - com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Builder, - com.google.cloud.alloydb.v1beta.Instance.UpdatePolicyOrBuilder> - getUpdatePolicyFieldBuilder() { - if (updatePolicyBuilder_ == null) { - updatePolicyBuilder_ = + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig, + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfigOrBuilder> + getPscInstanceConfigFieldBuilder() { + if (pscInstanceConfigBuilder_ == null) { + pscInstanceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy, - com.google.cloud.alloydb.v1beta.Instance.UpdatePolicy.Builder, - com.google.cloud.alloydb.v1beta.Instance.UpdatePolicyOrBuilder>( - getUpdatePolicy(), getParentForChildren(), isClean()); - updatePolicy_ = null; + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig, + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfigOrBuilder>( + getPscInstanceConfig(), getParentForChildren(), isClean()); + pscInstanceConfig_ = null; } - return updatePolicyBuilder_; + return pscInstanceConfigBuilder_; } - private com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig clientConnectionConfig_; + private com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig networkConfig_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig, - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigOrBuilder> - clientConnectionConfigBuilder_; + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfigOrBuilder> + networkConfigBuilder_; /** * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the clientConnectionConfig field is set. + * @return Whether the networkConfig field is set. */ - public boolean hasClientConnectionConfig() { - return ((bitField0_ & 0x00400000) != 0); + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x04000000) != 0); } /** * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The clientConnectionConfig. + * @return The networkConfig. */ - public com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig - getClientConnectionConfig() { - if (clientConnectionConfigBuilder_ == null) { - return clientConnectionConfig_ == null - ? com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.getDefaultInstance() - : clientConnectionConfig_; + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.getDefaultInstance() + : networkConfig_; } else { - return clientConnectionConfigBuilder_.getMessage(); + return networkConfigBuilder_.getMessage(); } } /** * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setClientConnectionConfig( - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig value) { - if (clientConnectionConfigBuilder_ == null) { + public Builder setNetworkConfig( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig value) { + if (networkConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - clientConnectionConfig_ = value; + networkConfig_ = value; } else { - clientConnectionConfigBuilder_.setMessage(value); + networkConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00400000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -12178,21 +18743,21 @@ public Builder setClientConnectionConfig( * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setClientConnectionConfig( - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.Builder builderForValue) { - if (clientConnectionConfigBuilder_ == null) { - clientConnectionConfig_ = builderForValue.build(); + public Builder setNetworkConfig( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); } else { - clientConnectionConfigBuilder_.setMessage(builderForValue.build()); + networkConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00400000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -12200,30 +18765,30 @@ public Builder setClientConnectionConfig( * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeClientConnectionConfig( - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig value) { - if (clientConnectionConfigBuilder_ == null) { - if (((bitField0_ & 0x00400000) != 0) - && clientConnectionConfig_ != null - && clientConnectionConfig_ - != com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig + public Builder mergeNetworkConfig( + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (((bitField0_ & 0x04000000) != 0) + && networkConfig_ != null + && networkConfig_ + != com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig .getDefaultInstance()) { - getClientConnectionConfigBuilder().mergeFrom(value); + getNetworkConfigBuilder().mergeFrom(value); } else { - clientConnectionConfig_ = value; + networkConfig_ = value; } } else { - clientConnectionConfigBuilder_.mergeFrom(value); + networkConfigBuilder_.mergeFrom(value); } - if (clientConnectionConfig_ != null) { - bitField0_ |= 0x00400000; + if (networkConfig_ != null) { + bitField0_ |= 0x04000000; onChanged(); } return this; @@ -12232,19 +18797,19 @@ public Builder mergeClientConnectionConfig( * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearClientConnectionConfig() { - bitField0_ = (bitField0_ & ~0x00400000); - clientConnectionConfig_ = null; - if (clientConnectionConfigBuilder_ != null) { - clientConnectionConfigBuilder_.dispose(); - clientConnectionConfigBuilder_ = null; + public Builder clearNetworkConfig() { + bitField0_ = (bitField0_ & ~0x04000000); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; } onChanged(); return this; @@ -12253,66 +18818,66 @@ public Builder clearClientConnectionConfig() { * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.Builder - getClientConnectionConfigBuilder() { - bitField0_ |= 0x00400000; + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.Builder + getNetworkConfigBuilder() { + bitField0_ |= 0x04000000; onChanged(); - return getClientConnectionConfigFieldBuilder().getBuilder(); + return getNetworkConfigFieldBuilder().getBuilder(); } /** * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigOrBuilder - getClientConnectionConfigOrBuilder() { - if (clientConnectionConfigBuilder_ != null) { - return clientConnectionConfigBuilder_.getMessageOrBuilder(); + public com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfigOrBuilder + getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); } else { - return clientConnectionConfig_ == null - ? com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.getDefaultInstance() - : clientConnectionConfig_; + return networkConfig_ == null + ? com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.getDefaultInstance() + : networkConfig_; } } /** * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig, - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigOrBuilder> - getClientConnectionConfigFieldBuilder() { - if (clientConnectionConfigBuilder_ == null) { - clientConnectionConfigBuilder_ = + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig, - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfig.Builder, - com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigOrBuilder>( - getClientConnectionConfig(), getParentForChildren(), isClean()); - clientConnectionConfig_ = null; + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.Builder, + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfigOrBuilder>( + getNetworkConfig(), getParentForChildren(), isClean()); + networkConfig_ = null; } - return clientConnectionConfigBuilder_; + return networkConfigBuilder_; } @java.lang.Override diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/InstanceOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/InstanceOrBuilder.java index 3b484b65d51c..0b8ced0045a3 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/InstanceOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/InstanceOrBuilder.java @@ -735,7 +735,8 @@ java.lang.String getDatabaseFlagsOrDefault( * * *
-   * Read pool specific config.
+   * Read pool instance configuration.
+   * This is required if the value of instanceType is READ_POOL.
    * 
* * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; @@ -747,7 +748,8 @@ java.lang.String getDatabaseFlagsOrDefault( * * *
-   * Read pool specific config.
+   * Read pool instance configuration.
+   * This is required if the value of instanceType is READ_POOL.
    * 
* * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; @@ -759,7 +761,8 @@ java.lang.String getDatabaseFlagsOrDefault( * * *
-   * Read pool specific config.
+   * Read pool instance configuration.
+   * This is required if the value of instanceType is READ_POOL.
    * 
* * .google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14; @@ -793,6 +796,35 @@ java.lang.String getDatabaseFlagsOrDefault( */ com.google.protobuf.ByteString getIpAddressBytes(); + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicIpAddress. + */ + java.lang.String getPublicIpAddress(); + /** + * + * + *
+   * Output only. The public IP addresses for the Instance. This is available
+   * ONLY when enable_public_ip is set. This is the connection endpoint for an
+   * end-user application.
+   * 
+ * + * string public_ip_address = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicIpAddress. + */ + com.google.protobuf.ByteString getPublicIpAddressBytes(); + /** * * @@ -988,4 +1020,104 @@ java.lang.String getAnnotationsOrDefault( */ com.google.cloud.alloydb.v1beta.Instance.ClientConnectionConfigOrBuilder getClientConnectionConfigOrBuilder(); + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + boolean getSatisfiesPzs(); + + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pscInstanceConfig field is set. + */ + boolean hasPscInstanceConfig(); + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pscInstanceConfig. + */ + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfig getPscInstanceConfig(); + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1beta.Instance.PscInstanceConfigOrBuilder + getPscInstanceConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Instance level network configuration.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + /** + * + * + *
+   * Optional. Instance level network configuration.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkConfig. + */ + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig getNetworkConfig(); + /** + * + * + *
+   * Optional. Instance level network configuration.
+   * 
+ * + * + * .google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfigOrBuilder + getNetworkConfigOrBuilder(); } diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesRequest.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesRequest.java new file mode 100644 index 000000000000..7bfeb3f737c0 --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesRequest.java @@ -0,0 +1,1129 @@ +/* + * Copyright 2024 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/alloydb/v1beta/service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.alloydb.v1beta; + +/** + * + * + *
+ * Message for requesting list of Databases.
+ * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.ListDatabasesRequest} + */ +public final class ListDatabasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.ListDatabasesRequest) + ListDatabasesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDatabasesRequest.newBuilder() to construct. + private ListDatabasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDatabasesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDatabasesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ServiceProto + .internal_static_google_cloud_alloydb_v1beta_ListDatabasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ServiceProto + .internal_static_google_cloud_alloydb_v1beta_ListDatabasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.ListDatabasesRequest.class, + com.google.cloud.alloydb.v1beta.ListDatabasesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListDatabasesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListDatabasesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of databases to return. The service may return
+   * fewer than this value. If unspecified, an appropriate number of databases
+   * will be returned. The max value will be 2000, values above max will be
+   * coerced to max.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDatabases` call.
+   * This should be provided to retrieve the subsequent page.
+   * This field is currently not supported, its value will be ignored if passed.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDatabases` call.
+   * This should be provided to retrieve the subsequent page.
+   * This field is currently not supported, its value will be ignored if passed.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. Filtering results.
+   * This field is currently not supported, its value will be ignored if passed.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filtering results.
+   * This field is currently not supported, its value will be ignored if passed.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + 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(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + 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.alloydb.v1beta.ListDatabasesRequest)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1beta.ListDatabasesRequest other = + (com.google.cloud.alloydb.v1beta.ListDatabasesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesRequest 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.alloydb.v1beta.ListDatabasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesRequest 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.alloydb.v1beta.ListDatabasesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesRequest 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.alloydb.v1beta.ListDatabasesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesRequest 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.alloydb.v1beta.ListDatabasesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesRequest 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.alloydb.v1beta.ListDatabasesRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Databases.
+   * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.ListDatabasesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.ListDatabasesRequest) + com.google.cloud.alloydb.v1beta.ListDatabasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ServiceProto + .internal_static_google_cloud_alloydb_v1beta_ListDatabasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ServiceProto + .internal_static_google_cloud_alloydb_v1beta_ListDatabasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.ListDatabasesRequest.class, + com.google.cloud.alloydb.v1beta.ListDatabasesRequest.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1beta.ListDatabasesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.alloydb.v1beta.ServiceProto + .internal_static_google_cloud_alloydb_v1beta_ListDatabasesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.ListDatabasesRequest getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1beta.ListDatabasesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.ListDatabasesRequest build() { + com.google.cloud.alloydb.v1beta.ListDatabasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.ListDatabasesRequest buildPartial() { + com.google.cloud.alloydb.v1beta.ListDatabasesRequest result = + new com.google.cloud.alloydb.v1beta.ListDatabasesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.alloydb.v1beta.ListDatabasesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @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.alloydb.v1beta.ListDatabasesRequest) { + return mergeFrom((com.google.cloud.alloydb.v1beta.ListDatabasesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.alloydb.v1beta.ListDatabasesRequest other) { + if (other == com.google.cloud.alloydb.v1beta.ListDatabasesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + 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 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListDatabasesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListDatabasesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListDatabasesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListDatabasesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListDatabasesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of databases to return. The service may return
+     * fewer than this value. If unspecified, an appropriate number of databases
+     * will be returned. The max value will be 2000, values above max will be
+     * coerced to max.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of databases to return. The service may return
+     * fewer than this value. If unspecified, an appropriate number of databases
+     * will be returned. The max value will be 2000, values above max will be
+     * coerced to max.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of databases to return. The service may return
+     * fewer than this value. If unspecified, an appropriate number of databases
+     * will be returned. The max value will be 2000, values above max will be
+     * coerced to max.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDatabases` call.
+     * This should be provided to retrieve the subsequent page.
+     * This field is currently not supported, its value will be ignored if passed.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDatabases` call.
+     * This should be provided to retrieve the subsequent page.
+     * This field is currently not supported, its value will be ignored if passed.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDatabases` call.
+     * This should be provided to retrieve the subsequent page.
+     * This field is currently not supported, its value will be ignored if passed.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDatabases` call.
+     * This should be provided to retrieve the subsequent page.
+     * This field is currently not supported, its value will be ignored if passed.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDatabases` call.
+     * This should be provided to retrieve the subsequent page.
+     * This field is currently not supported, its value will be ignored if passed.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filtering results.
+     * This field is currently not supported, its value will be ignored if passed.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filtering results.
+     * This field is currently not supported, its value will be ignored if passed.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filtering results.
+     * This field is currently not supported, its value will be ignored if passed.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filtering results.
+     * This field is currently not supported, its value will be ignored if passed.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filtering results.
+     * This field is currently not supported, its value will be ignored if passed.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.alloydb.v1beta.ListDatabasesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1beta.ListDatabasesRequest) + private static final com.google.cloud.alloydb.v1beta.ListDatabasesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1beta.ListDatabasesRequest(); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDatabasesRequest 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.alloydb.v1beta.ListDatabasesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesRequestOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesRequestOrBuilder.java new file mode 100644 index 000000000000..f6bd4b8264b1 --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesRequestOrBuilder.java @@ -0,0 +1,127 @@ +/* + * Copyright 2024 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/alloydb/v1beta/service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.alloydb.v1beta; + +public interface ListDatabasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1beta.ListDatabasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListDatabasesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListDatabasesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of databases to return. The service may return
+   * fewer than this value. If unspecified, an appropriate number of databases
+   * will be returned. The max value will be 2000, values above max will be
+   * coerced to max.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDatabases` call.
+   * This should be provided to retrieve the subsequent page.
+   * This field is currently not supported, its value will be ignored if passed.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDatabases` call.
+   * This should be provided to retrieve the subsequent page.
+   * This field is currently not supported, its value will be ignored if passed.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * This field is currently not supported, its value will be ignored if passed.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filtering results.
+   * This field is currently not supported, its value will be ignored if passed.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesResponse.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesResponse.java new file mode 100644 index 000000000000..3fa1878140bd --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesResponse.java @@ -0,0 +1,1126 @@ +/* + * Copyright 2024 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/alloydb/v1beta/service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.alloydb.v1beta; + +/** + * + * + *
+ * Message for response to listing Databases.
+ * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.ListDatabasesResponse} + */ +public final class ListDatabasesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.ListDatabasesResponse) + ListDatabasesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDatabasesResponse.newBuilder() to construct. + private ListDatabasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDatabasesResponse() { + databases_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDatabasesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ServiceProto + .internal_static_google_cloud_alloydb_v1beta_ListDatabasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ServiceProto + .internal_static_google_cloud_alloydb_v1beta_ListDatabasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.ListDatabasesResponse.class, + com.google.cloud.alloydb.v1beta.ListDatabasesResponse.Builder.class); + } + + public static final int DATABASES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List databases_; + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + @java.lang.Override + public java.util.List getDatabasesList() { + return databases_; + } + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + @java.lang.Override + public java.util.List + getDatabasesOrBuilderList() { + return databases_; + } + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + @java.lang.Override + public int getDatabasesCount() { + return databases_.size(); + } + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.Database getDatabases(int index) { + return databases_.get(index); + } + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + @java.lang.Override + public com.google.cloud.alloydb.v1beta.DatabaseOrBuilder getDatabasesOrBuilder(int index) { + return databases_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying the next page of results the server should return.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying the next page of results the server should return.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < databases_.size(); i++) { + output.writeMessage(1, databases_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < databases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, databases_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.alloydb.v1beta.ListDatabasesResponse)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1beta.ListDatabasesResponse other = + (com.google.cloud.alloydb.v1beta.ListDatabasesResponse) obj; + + if (!getDatabasesList().equals(other.getDatabasesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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(); + if (getDatabasesCount() > 0) { + hash = (37 * hash) + DATABASES_FIELD_NUMBER; + hash = (53 * hash) + getDatabasesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesResponse 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.alloydb.v1beta.ListDatabasesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesResponse 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.alloydb.v1beta.ListDatabasesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesResponse 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.alloydb.v1beta.ListDatabasesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesResponse 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.alloydb.v1beta.ListDatabasesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesResponse 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.alloydb.v1beta.ListDatabasesResponse 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; + } + /** + * + * + *
+   * Message for response to listing Databases.
+   * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1beta.ListDatabasesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.ListDatabasesResponse) + com.google.cloud.alloydb.v1beta.ListDatabasesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1beta.ServiceProto + .internal_static_google_cloud_alloydb_v1beta_ListDatabasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1beta.ServiceProto + .internal_static_google_cloud_alloydb_v1beta_ListDatabasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1beta.ListDatabasesResponse.class, + com.google.cloud.alloydb.v1beta.ListDatabasesResponse.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1beta.ListDatabasesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (databasesBuilder_ == null) { + databases_ = java.util.Collections.emptyList(); + } else { + databases_ = null; + databasesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.alloydb.v1beta.ServiceProto + .internal_static_google_cloud_alloydb_v1beta_ListDatabasesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.ListDatabasesResponse getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1beta.ListDatabasesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.ListDatabasesResponse build() { + com.google.cloud.alloydb.v1beta.ListDatabasesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1beta.ListDatabasesResponse buildPartial() { + com.google.cloud.alloydb.v1beta.ListDatabasesResponse result = + new com.google.cloud.alloydb.v1beta.ListDatabasesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.alloydb.v1beta.ListDatabasesResponse result) { + if (databasesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + databases_ = java.util.Collections.unmodifiableList(databases_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.databases_ = databases_; + } else { + result.databases_ = databasesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.alloydb.v1beta.ListDatabasesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.alloydb.v1beta.ListDatabasesResponse) { + return mergeFrom((com.google.cloud.alloydb.v1beta.ListDatabasesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.alloydb.v1beta.ListDatabasesResponse other) { + if (other == com.google.cloud.alloydb.v1beta.ListDatabasesResponse.getDefaultInstance()) + return this; + if (databasesBuilder_ == null) { + if (!other.databases_.isEmpty()) { + if (databases_.isEmpty()) { + databases_ = other.databases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatabasesIsMutable(); + databases_.addAll(other.databases_); + } + onChanged(); + } + } else { + if (!other.databases_.isEmpty()) { + if (databasesBuilder_.isEmpty()) { + databasesBuilder_.dispose(); + databasesBuilder_ = null; + databases_ = other.databases_; + bitField0_ = (bitField0_ & ~0x00000001); + databasesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDatabasesFieldBuilder() + : null; + } else { + databasesBuilder_.addAllMessages(other.databases_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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 10: + { + com.google.cloud.alloydb.v1beta.Database m = + input.readMessage( + com.google.cloud.alloydb.v1beta.Database.parser(), extensionRegistry); + if (databasesBuilder_ == null) { + ensureDatabasesIsMutable(); + databases_.add(m); + } else { + databasesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 java.util.List databases_ = + java.util.Collections.emptyList(); + + private void ensureDatabasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + databases_ = new java.util.ArrayList(databases_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Database, + com.google.cloud.alloydb.v1beta.Database.Builder, + com.google.cloud.alloydb.v1beta.DatabaseOrBuilder> + databasesBuilder_; + + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public java.util.List getDatabasesList() { + if (databasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(databases_); + } else { + return databasesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public int getDatabasesCount() { + if (databasesBuilder_ == null) { + return databases_.size(); + } else { + return databasesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public com.google.cloud.alloydb.v1beta.Database getDatabases(int index) { + if (databasesBuilder_ == null) { + return databases_.get(index); + } else { + return databasesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public Builder setDatabases(int index, com.google.cloud.alloydb.v1beta.Database value) { + if (databasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatabasesIsMutable(); + databases_.set(index, value); + onChanged(); + } else { + databasesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public Builder setDatabases( + int index, com.google.cloud.alloydb.v1beta.Database.Builder builderForValue) { + if (databasesBuilder_ == null) { + ensureDatabasesIsMutable(); + databases_.set(index, builderForValue.build()); + onChanged(); + } else { + databasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public Builder addDatabases(com.google.cloud.alloydb.v1beta.Database value) { + if (databasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatabasesIsMutable(); + databases_.add(value); + onChanged(); + } else { + databasesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public Builder addDatabases(int index, com.google.cloud.alloydb.v1beta.Database value) { + if (databasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatabasesIsMutable(); + databases_.add(index, value); + onChanged(); + } else { + databasesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public Builder addDatabases(com.google.cloud.alloydb.v1beta.Database.Builder builderForValue) { + if (databasesBuilder_ == null) { + ensureDatabasesIsMutable(); + databases_.add(builderForValue.build()); + onChanged(); + } else { + databasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public Builder addDatabases( + int index, com.google.cloud.alloydb.v1beta.Database.Builder builderForValue) { + if (databasesBuilder_ == null) { + ensureDatabasesIsMutable(); + databases_.add(index, builderForValue.build()); + onChanged(); + } else { + databasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public Builder addAllDatabases( + java.lang.Iterable values) { + if (databasesBuilder_ == null) { + ensureDatabasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, databases_); + onChanged(); + } else { + databasesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public Builder clearDatabases() { + if (databasesBuilder_ == null) { + databases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + databasesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public Builder removeDatabases(int index) { + if (databasesBuilder_ == null) { + ensureDatabasesIsMutable(); + databases_.remove(index); + onChanged(); + } else { + databasesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public com.google.cloud.alloydb.v1beta.Database.Builder getDatabasesBuilder(int index) { + return getDatabasesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public com.google.cloud.alloydb.v1beta.DatabaseOrBuilder getDatabasesOrBuilder(int index) { + if (databasesBuilder_ == null) { + return databases_.get(index); + } else { + return databasesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public java.util.List + getDatabasesOrBuilderList() { + if (databasesBuilder_ != null) { + return databasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(databases_); + } + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public com.google.cloud.alloydb.v1beta.Database.Builder addDatabasesBuilder() { + return getDatabasesFieldBuilder() + .addBuilder(com.google.cloud.alloydb.v1beta.Database.getDefaultInstance()); + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public com.google.cloud.alloydb.v1beta.Database.Builder addDatabasesBuilder(int index) { + return getDatabasesFieldBuilder() + .addBuilder(index, com.google.cloud.alloydb.v1beta.Database.getDefaultInstance()); + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + public java.util.List + getDatabasesBuilderList() { + return getDatabasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Database, + com.google.cloud.alloydb.v1beta.Database.Builder, + com.google.cloud.alloydb.v1beta.DatabaseOrBuilder> + getDatabasesFieldBuilder() { + if (databasesBuilder_ == null) { + databasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1beta.Database, + com.google.cloud.alloydb.v1beta.Database.Builder, + com.google.cloud.alloydb.v1beta.DatabaseOrBuilder>( + databases_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + databases_ = null; + } + return databasesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying the next page of results the server should return.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying the next page of results the server should return.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying the next page of results the server should return.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying the next page of results the server should return.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying the next page of results the server should return.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.alloydb.v1beta.ListDatabasesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1beta.ListDatabasesResponse) + private static final com.google.cloud.alloydb.v1beta.ListDatabasesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1beta.ListDatabasesResponse(); + } + + public static com.google.cloud.alloydb.v1beta.ListDatabasesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDatabasesResponse 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.alloydb.v1beta.ListDatabasesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesResponseOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesResponseOrBuilder.java new file mode 100644 index 000000000000..567e905a3bd7 --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ListDatabasesResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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/alloydb/v1beta/service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.alloydb.v1beta; + +public interface ListDatabasesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1beta.ListDatabasesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + java.util.List getDatabasesList(); + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + com.google.cloud.alloydb.v1beta.Database getDatabases(int index); + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + int getDatabasesCount(); + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + java.util.List + getDatabasesOrBuilderList(); + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1beta.Database databases = 1; + */ + com.google.cloud.alloydb.v1beta.DatabaseOrBuilder getDatabasesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying the next page of results the server should return.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying the next page of results the server should return.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ResourcesProto.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ResourcesProto.java index d93abb187d8c..419b8bdba7f2 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ResourcesProto.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ResourcesProto.java @@ -136,6 +136,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_alloydb_v1beta_Instance_ClientConnectionConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_alloydb_v1beta_Instance_ClientConnectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1beta_Instance_PscInterfaceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1beta_Instance_PscInterfaceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1beta_Instance_PscInstanceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1beta_Instance_PscInstanceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_AuthorizedNetwork_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_alloydb_v1beta_Instance_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -184,6 +200,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_alloydb_v1beta_User_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_alloydb_v1beta_User_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1beta_Database_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1beta_Database_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -195,296 +215,328 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n+google/cloud/alloydb/v1beta/resources." + "proto\022\033google.cloud.alloydb.v1beta\032\037goog" - + "le/api/field_behavior.proto\032\031google/api/" - + "resource.proto\032\036google/protobuf/duration" - + ".proto\032\037google/protobuf/timestamp.proto\032" - + "\036google/protobuf/wrappers.proto\032\033google/" - + "type/dayofweek.proto\032\033google/type/timeof" - + "day.proto\".\n\014UserPassword\022\014\n\004user\030\001 \001(\t\022" - + "\020\n\010password\030\002 \001(\t\"\347\001\n\017MigrationSource\022\026\n" - + "\thost_port\030\001 \001(\tB\003\340A\003\022\031\n\014reference_id\030\002 " - + "\001(\tB\003\340A\003\022Z\n\013source_type\030\003 \001(\0162@.google.c" - + "loud.alloydb.v1beta.MigrationSource.Migr" - + "ationSourceTypeB\003\340A\003\"E\n\023MigrationSourceT" - + "ype\022%\n!MIGRATION_SOURCE_TYPE_UNSPECIFIED" - + "\020\000\022\007\n\003DMS\020\001\"(\n\020EncryptionConfig\022\024\n\014kms_k" - + "ey_name\030\001 \001(\t\"\212\002\n\016EncryptionInfo\022N\n\017encr" - + "yption_type\030\001 \001(\01620.google.cloud.alloydb" - + ".v1beta.EncryptionInfo.TypeB\003\340A\003\022J\n\020kms_" - + "key_versions\030\002 \003(\tB0\340A\003\372A*\n(cloudkms.goo" - + "gleapis.com/CryptoKeyVersion\"\\\n\004Type\022\024\n\020" - + "TYPE_UNSPECIFIED\020\000\022\035\n\031GOOGLE_DEFAULT_ENC" - + "RYPTION\020\001\022\037\n\033CUSTOMER_MANAGED_ENCRYPTION" - + "\020\002\"\206\003\n\tSslConfig\022E\n\010ssl_mode\030\001 \001(\0162..goo" - + "gle.cloud.alloydb.v1beta.SslConfig.SslMo" - + "deB\003\340A\001\022G\n\tca_source\030\002 \001(\0162/.google.clou" - + "d.alloydb.v1beta.SslConfig.CaSourceB\003\340A\001" - + "\"\252\001\n\007SslMode\022\030\n\024SSL_MODE_UNSPECIFIED\020\000\022\026" - + "\n\016SSL_MODE_ALLOW\020\001\032\002\010\001\022\030\n\020SSL_MODE_REQUI" - + "RE\020\002\032\002\010\001\022\032\n\022SSL_MODE_VERIFY_CA\020\003\032\002\010\001\022#\n\037" - + "ALLOW_UNENCRYPTED_AND_ENCRYPTED\020\004\022\022\n\016ENC" - + "RYPTED_ONLY\020\005\"<\n\010CaSource\022\031\n\025CA_SOURCE_U" - + "NSPECIFIED\020\000\022\025\n\021CA_SOURCE_MANAGED\020\001\"\371\006\n\025" - + "AutomatedBackupPolicy\022\\\n\017weekly_schedule" - + "\030\002 \001(\0132A.google.cloud.alloydb.v1beta.Aut" - + "omatedBackupPolicy.WeeklyScheduleH\000\022e\n\024t" - + "ime_based_retention\030\004 \001(\0132E.google.cloud" - + ".alloydb.v1beta.AutomatedBackupPolicy.Ti" - + "meBasedRetentionH\001\022m\n\030quantity_based_ret" - + "ention\030\005 \001(\0132I.google.cloud.alloydb.v1be" - + "ta.AutomatedBackupPolicy.QuantityBasedRe" - + "tentionH\001\022\024\n\007enabled\030\001 \001(\010H\002\210\001\001\0220\n\rbacku" - + "p_window\030\003 \001(\0132\031.google.protobuf.Duratio" - + "n\022M\n\021encryption_config\030\010 \001(\0132-.google.cl" - + "oud.alloydb.v1beta.EncryptionConfigB\003\340A\001" - + "\022\020\n\010location\030\006 \001(\t\022N\n\006labels\030\007 \003(\0132>.goo" - + "gle.cloud.alloydb.v1beta.AutomatedBackup" - + "Policy.LabelsEntry\032k\n\016WeeklySchedule\022+\n\013" - + "start_times\030\001 \003(\0132\026.google.type.TimeOfDa" - + "y\022,\n\014days_of_week\030\002 \003(\0162\026.google.type.Da" - + "yOfWeek\032I\n\022TimeBasedRetention\0223\n\020retenti" - + "on_period\030\001 \001(\0132\031.google.protobuf.Durati" - + "on\032\'\n\026QuantityBasedRetention\022\r\n\005count\030\001 " - + "\001(\005\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001B\n\n\010scheduleB\013\n\tretentionB\n\n\010_" - + "enabled\"\242\001\n\026ContinuousBackupConfig\022\024\n\007en" - + "abled\030\001 \001(\010H\000\210\001\001\022\034\n\024recovery_window_days" - + "\030\004 \001(\005\022H\n\021encryption_config\030\003 \001(\0132-.goog" - + "le.cloud.alloydb.v1beta.EncryptionConfig" - + "B\n\n\010_enabled\"\212\002\n\024ContinuousBackupInfo\022I\n" - + "\017encryption_info\030\001 \001(\0132+.google.cloud.al" - + "loydb.v1beta.EncryptionInfoB\003\340A\003\0225\n\014enab" - + "led_time\030\002 \001(\0132\032.google.protobuf.Timesta" - + "mpB\003\340A\003\022-\n\010schedule\030\003 \003(\0162\026.google.type." - + "DayOfWeekB\003\340A\003\022A\n\030earliest_restorable_ti" - + "me\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\"c\n\014BackupSource\022\027\n\nbackup_uid\030\002 \001(\tB\003\340" - + "A\003\022:\n\013backup_name\030\001 \001(\tB%\340A\002\372A\037\n\035alloydb" - + ".googleapis.com/Backup\"f\n\026ContinuousBack" - + "upSource\022\024\n\007cluster\030\001 \001(\tB\003\340A\002\0226\n\rpoint_" - + "in_time\030\002 \001(\0132\032.google.protobuf.Timestam" - + "pB\003\340A\002\"\360\021\n\007Cluster\022G\n\rbackup_source\030\017 \001(" - + "\0132).google.cloud.alloydb.v1beta.BackupSo" - + "urceB\003\340A\003H\000\022M\n\020migration_source\030\020 \001(\0132,." - + "google.cloud.alloydb.v1beta.MigrationSou" - + "rceB\003\340A\003H\000\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014display" - + "_name\030\002 \001(\t\022\020\n\003uid\030\003 \001(\tB\003\340A\003\0224\n\013create_" - + "time\030\004 \001(\0132\032.google.protobuf.TimestampB\003" - + "\340A\003\0224\n\013update_time\030\005 \001(\0132\032.google.protob" - + "uf.TimestampB\003\340A\003\0224\n\013delete_time\030\006 \001(\0132\032" - + ".google.protobuf.TimestampB\003\340A\003\022@\n\006label" - + "s\030\007 \003(\01320.google.cloud.alloydb.v1beta.Cl" - + "uster.LabelsEntry\022>\n\005state\030\010 \001(\0162*.googl" - + "e.cloud.alloydb.v1beta.Cluster.StateB\003\340A" - + "\003\022K\n\014cluster_type\030\030 \001(\01620.google.cloud.a" - + "lloydb.v1beta.Cluster.ClusterTypeB\003\340A\003\022K" - + "\n\020database_version\030\t \001(\0162,.google.cloud." - + "alloydb.v1beta.DatabaseVersionB\003\340A\001\022O\n\016n" - + "etwork_config\030\035 \001(\01322.google.cloud.alloy" - + "db.v1beta.Cluster.NetworkConfigB\003\340A\001\0229\n\007" - + "network\030\n \001(\tB(\030\001\340A\002\372A \n\036compute.googlea" - + "pis.com/Network\022\014\n\004etag\030\013 \001(\t\022J\n\013annotat" - + "ions\030\014 \003(\01325.google.cloud.alloydb.v1beta" - + ".Cluster.AnnotationsEntry\022\030\n\013reconciling" - + "\030\r \001(\010B\003\340A\003\022D\n\014initial_user\030\016 \001(\0132).goog" - + "le.cloud.alloydb.v1beta.UserPasswordB\003\340A" - + "\004\022S\n\027automated_backup_policy\030\021 \001(\01322.goo" - + "gle.cloud.alloydb.v1beta.AutomatedBackup" - + "Policy\022>\n\nssl_config\030\022 \001(\0132&.google.clou" - + "d.alloydb.v1beta.SslConfigB\002\030\001\022M\n\021encryp" - + "tion_config\030\023 \001(\0132-.google.cloud.alloydb" - + ".v1beta.EncryptionConfigB\003\340A\001\022I\n\017encrypt" - + "ion_info\030\024 \001(\0132+.google.cloud.alloydb.v1" - + "beta.EncryptionInfoB\003\340A\003\022Z\n\030continuous_b" - + "ackup_config\030\033 \001(\01323.google.cloud.alloyd" - + "b.v1beta.ContinuousBackupConfigB\003\340A\001\022V\n\026" - + "continuous_backup_info\030\034 \001(\01321.google.cl" - + "oud.alloydb.v1beta.ContinuousBackupInfoB" - + "\003\340A\003\022N\n\020secondary_config\030\026 \001(\01324.google." - + "cloud.alloydb.v1beta.Cluster.SecondaryCo" - + "nfig\022O\n\016primary_config\030\027 \001(\01322.google.cl" - + "oud.alloydb.v1beta.Cluster.PrimaryConfig" - + "B\003\340A\003\032i\n\rNetworkConfig\0227\n\007network\030\001 \001(\tB" - + "&\340A\002\372A \n\036compute.googleapis.com/Network\022" - + "\037\n\022allocated_ip_range\030\002 \001(\tB\003\340A\001\032/\n\017Seco" - + "ndaryConfig\022\034\n\024primary_cluster_name\030\001 \001(" - + "\t\0325\n\rPrimaryConfig\022$\n\027secondary_cluster_" - + "names\030\001 \003(\tB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020AnnotationsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\234\001\n\005" - + "State\022\025\n\021STATE_UNSPECIFIED\020\000\022\t\n\005READY\020\001\022" - + "\013\n\007STOPPED\020\002\022\t\n\005EMPTY\020\003\022\014\n\010CREATING\020\004\022\014\n" - + "\010DELETING\020\005\022\n\n\006FAILED\020\006\022\021\n\rBOOTSTRAPPING" - + "\020\007\022\017\n\013MAINTENANCE\020\010\022\r\n\tPROMOTING\020\t\"G\n\013Cl" - + "usterType\022\034\n\030CLUSTER_TYPE_UNSPECIFIED\020\000\022" - + "\013\n\007PRIMARY\020\001\022\r\n\tSECONDARY\020\002:b\352A_\n\036alloyd" - + "b.googleapis.com/Cluster\022:projects/{proj" - + "ect}/locations/{location}/clusters/{clus" - + "ter}R\001\001B\010\n\006source\"\237\024\n\010Instance\022\021\n\004name\030\001" - + " \001(\tB\003\340A\003\022\024\n\014display_name\030\002 \001(\t\022\020\n\003uid\030\003" - + " \001(\tB\003\340A\003\0224\n\013create_time\030\004 \001(\0132\032.google." - + "protobuf.TimestampB\003\340A\003\0224\n\013update_time\030\005" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" - + "\013delete_time\030\006 \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\003\022A\n\006labels\030\007 \003(\01321.google.clo" - + "ud.alloydb.v1beta.Instance.LabelsEntry\022?" - + "\n\005state\030\010 \001(\0162+.google.cloud.alloydb.v1b" - + "eta.Instance.StateB\003\340A\003\022N\n\rinstance_type" - + "\030\t \001(\01622.google.cloud.alloydb.v1beta.Ins" - + "tance.InstanceTypeB\003\340A\002\022K\n\016machine_confi" - + "g\030\n \001(\01323.google.cloud.alloydb.v1beta.In" - + "stance.MachineConfig\022Q\n\021availability_typ" - + "e\030\013 \001(\01626.google.cloud.alloydb.v1beta.In" - + "stance.AvailabilityType\022\020\n\010gce_zone\030\014 \001(" - + "\t\022P\n\016database_flags\030\r \003(\01328.google.cloud" - + ".alloydb.v1beta.Instance.DatabaseFlagsEn" - + "try\022F\n\rwritable_node\030\023 \001(\0132*.google.clou" - + "d.alloydb.v1beta.Instance.NodeB\003\340A\003\022>\n\005n" - + "odes\030\024 \003(\0132*.google.cloud.alloydb.v1beta" - + ".Instance.NodeB\003\340A\003\022`\n\025query_insights_co" - + "nfig\030\025 \001(\0132A.google.cloud.alloydb.v1beta" - + ".Instance.QueryInsightsInstanceConfig\022N\n" - + "\020read_pool_config\030\016 \001(\01324.google.cloud.a" - + "lloydb.v1beta.Instance.ReadPoolConfig\022\027\n" - + "\nip_address\030\017 \001(\tB\003\340A\003\022\030\n\013reconciling\030\020 " - + "\001(\010B\003\340A\003\022\014\n\004etag\030\021 \001(\t\022K\n\013annotations\030\022 " - + "\003(\01326.google.cloud.alloydb.v1beta.Instan" - + "ce.AnnotationsEntry\022I\n\rupdate_policy\030\026 \001" - + "(\01322.google.cloud.alloydb.v1beta.Instanc" - + "e.UpdatePolicy\022c\n\030client_connection_conf" - + "ig\030\027 \001(\0132<.google.cloud.alloydb.v1beta.I" - + "nstance.ClientConnectionConfigB\003\340A\001\032\"\n\rM" - + "achineConfig\022\021\n\tcpu_count\030\001 \001(\005\032>\n\004Node\022" - + "\017\n\007zone_id\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\n\n\002ip\030\003 \001(\t" - + "\022\r\n\005state\030\004 \001(\t\032\372\001\n\033QueryInsightsInstanc" - + "eConfig\022$\n\027record_application_tags\030\002 \001(\010" - + "H\000\210\001\001\022\"\n\025record_client_address\030\003 \001(\010H\001\210\001" - + "\001\022\033\n\023query_string_length\030\004 \001(\r\022#\n\026query_" - + "plans_per_minute\030\005 \001(\rH\002\210\001\001B\032\n\030_record_a" - + "pplication_tagsB\030\n\026_record_client_addres" - + "sB\031\n\027_query_plans_per_minute\032$\n\016ReadPool" - + "Config\022\022\n\nnode_count\030\001 \001(\005\032\221\001\n\014UpdatePol" - + "icy\022E\n\004mode\030\001 \001(\01627.google.cloud.alloydb" - + ".v1beta.Instance.UpdatePolicy.Mode\":\n\004Mo" - + "de\022\024\n\020MODE_UNSPECIFIED\020\000\022\013\n\007DEFAULT\020\001\022\017\n" - + "\013FORCE_APPLY\020\002\032z\n\026ClientConnectionConfig" - + "\022\037\n\022require_connectors\030\001 \001(\010B\003\340A\001\022?\n\nssl" - + "_config\030\002 \001(\0132&.google.cloud.alloydb.v1b" - + "eta.SslConfigB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key" - + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0324\n\022DatabaseFla" - + "gsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032" - + "2\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001\"\221\001\n\005State\022\025\n\021STATE_UNSPECIFI" - + "ED\020\000\022\t\n\005READY\020\001\022\013\n\007STOPPED\020\002\022\014\n\010CREATING" - + "\020\003\022\014\n\010DELETING\020\004\022\017\n\013MAINTENANCE\020\005\022\n\n\006FAI" - + "LED\020\006\022\021\n\rBOOTSTRAPPING\020\010\022\r\n\tPROMOTING\020\t\"" - + "X\n\014InstanceType\022\035\n\031INSTANCE_TYPE_UNSPECI" - + "FIED\020\000\022\013\n\007PRIMARY\020\001\022\r\n\tREAD_POOL\020\002\022\r\n\tSE" - + "CONDARY\020\003\"N\n\020AvailabilityType\022!\n\035AVAILAB" - + "ILITY_TYPE_UNSPECIFIED\020\000\022\t\n\005ZONAL\020\001\022\014\n\010R" - + "EGIONAL\020\002:x\352Au\n\037alloydb.googleapis.com/I" - + "nstance\022Oprojects/{project}/locations/{l" - + "ocation}/clusters/{cluster}/instances/{i" - + "nstance}R\001\001\"\206\002\n\016ConnectionInfo\022\014\n\004name\030\001" - + " \001(\t\022\027\n\nip_address\030\002 \001(\tB\003\340A\003\022$\n\025pem_cer" - + "tificate_chain\030\003 \003(\tB\005\030\001\340A\003\022\031\n\014instance_" - + "uid\030\004 \001(\tB\003\340A\003:\213\001\352A\207\001\n%alloydb.googleapi" - + "s.com/ConnectionInfo\022^projects/{project}" - + "/locations/{location}/clusters/{cluster}" - + "/instances/{instance}/connectionInfo\"\306\013\n" - + "\006Backup\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014display_na" + + "le/api/field_behavior.proto\032\033google/api/" + + "field_info.proto\032\031google/api/resource.pr" + + "oto\032\036google/protobuf/duration.proto\032\037goo" + + "gle/protobuf/timestamp.proto\032\036google/pro" + + "tobuf/wrappers.proto\032\033google/type/dayofw" + + "eek.proto\032\033google/type/timeofday.proto\"." + + "\n\014UserPassword\022\014\n\004user\030\001 \001(\t\022\020\n\010password" + + "\030\002 \001(\t\"\347\001\n\017MigrationSource\022\026\n\thost_port\030" + + "\001 \001(\tB\003\340A\003\022\031\n\014reference_id\030\002 \001(\tB\003\340A\003\022Z\n" + + "\013source_type\030\003 \001(\0162@.google.cloud.alloyd" + + "b.v1beta.MigrationSource.MigrationSource" + + "TypeB\003\340A\003\"E\n\023MigrationSourceType\022%\n!MIGR" + + "ATION_SOURCE_TYPE_UNSPECIFIED\020\000\022\007\n\003DMS\020\001" + + "\"(\n\020EncryptionConfig\022\024\n\014kms_key_name\030\001 \001" + + "(\t\"\212\002\n\016EncryptionInfo\022N\n\017encryption_type" + + "\030\001 \001(\01620.google.cloud.alloydb.v1beta.Enc" + + "ryptionInfo.TypeB\003\340A\003\022J\n\020kms_key_version" + + "s\030\002 \003(\tB0\340A\003\372A*\n(cloudkms.googleapis.com" + + "/CryptoKeyVersion\"\\\n\004Type\022\024\n\020TYPE_UNSPEC" + + "IFIED\020\000\022\035\n\031GOOGLE_DEFAULT_ENCRYPTION\020\001\022\037" + + "\n\033CUSTOMER_MANAGED_ENCRYPTION\020\002\"\206\003\n\tSslC" + + "onfig\022E\n\010ssl_mode\030\001 \001(\0162..google.cloud.a" + + "lloydb.v1beta.SslConfig.SslModeB\003\340A\001\022G\n\t" + + "ca_source\030\002 \001(\0162/.google.cloud.alloydb.v" + + "1beta.SslConfig.CaSourceB\003\340A\001\"\252\001\n\007SslMod" + + "e\022\030\n\024SSL_MODE_UNSPECIFIED\020\000\022\026\n\016SSL_MODE_" + + "ALLOW\020\001\032\002\010\001\022\030\n\020SSL_MODE_REQUIRE\020\002\032\002\010\001\022\032\n" + + "\022SSL_MODE_VERIFY_CA\020\003\032\002\010\001\022#\n\037ALLOW_UNENC" + + "RYPTED_AND_ENCRYPTED\020\004\022\022\n\016ENCRYPTED_ONLY" + + "\020\005\"<\n\010CaSource\022\031\n\025CA_SOURCE_UNSPECIFIED\020" + + "\000\022\025\n\021CA_SOURCE_MANAGED\020\001\"\371\006\n\025AutomatedBa" + + "ckupPolicy\022\\\n\017weekly_schedule\030\002 \001(\0132A.go" + + "ogle.cloud.alloydb.v1beta.AutomatedBacku" + + "pPolicy.WeeklyScheduleH\000\022e\n\024time_based_r" + + "etention\030\004 \001(\0132E.google.cloud.alloydb.v1" + + "beta.AutomatedBackupPolicy.TimeBasedRete" + + "ntionH\001\022m\n\030quantity_based_retention\030\005 \001(" + + "\0132I.google.cloud.alloydb.v1beta.Automate" + + "dBackupPolicy.QuantityBasedRetentionH\001\022\024" + + "\n\007enabled\030\001 \001(\010H\002\210\001\001\0220\n\rbackup_window\030\003 " + + "\001(\0132\031.google.protobuf.Duration\022M\n\021encryp" + + "tion_config\030\010 \001(\0132-.google.cloud.alloydb" + + ".v1beta.EncryptionConfigB\003\340A\001\022\020\n\010locatio" + + "n\030\006 \001(\t\022N\n\006labels\030\007 \003(\0132>.google.cloud.a" + + "lloydb.v1beta.AutomatedBackupPolicy.Labe" + + "lsEntry\032k\n\016WeeklySchedule\022+\n\013start_times" + + "\030\001 \003(\0132\026.google.type.TimeOfDay\022,\n\014days_o" + + "f_week\030\002 \003(\0162\026.google.type.DayOfWeek\032I\n\022" + + "TimeBasedRetention\0223\n\020retention_period\030\001" + + " \001(\0132\031.google.protobuf.Duration\032\'\n\026Quant" + + "ityBasedRetention\022\r\n\005count\030\001 \001(\005\032-\n\013Labe" + + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B" + + "\n\n\010scheduleB\013\n\tretentionB\n\n\010_enabled\"\242\001\n" + + "\026ContinuousBackupConfig\022\024\n\007enabled\030\001 \001(\010" + + "H\000\210\001\001\022\034\n\024recovery_window_days\030\004 \001(\005\022H\n\021e" + + "ncryption_config\030\003 \001(\0132-.google.cloud.al" + + "loydb.v1beta.EncryptionConfigB\n\n\010_enable" + + "d\"\212\002\n\024ContinuousBackupInfo\022I\n\017encryption" + + "_info\030\001 \001(\0132+.google.cloud.alloydb.v1bet" + + "a.EncryptionInfoB\003\340A\003\0225\n\014enabled_time\030\002 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\022-\n\010" + + "schedule\030\003 \003(\0162\026.google.type.DayOfWeekB\003" + + "\340A\003\022A\n\030earliest_restorable_time\030\004 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\"c\n\014Backup" + + "Source\022\027\n\nbackup_uid\030\002 \001(\tB\003\340A\003\022:\n\013backu" + + "p_name\030\001 \001(\tB%\340A\002\372A\037\n\035alloydb.googleapis" + + ".com/Backup\"f\n\026ContinuousBackupSource\022\024\n" + + "\007cluster\030\001 \001(\tB\003\340A\002\0226\n\rpoint_in_time\030\002 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\002\"\214\022\n\007" + + "Cluster\022G\n\rbackup_source\030\017 \001(\0132).google." + + "cloud.alloydb.v1beta.BackupSourceB\003\340A\003H\000" + + "\022M\n\020migration_source\030\020 \001(\0132,.google.clou" + + "d.alloydb.v1beta.MigrationSourceB\003\340A\003H\000\022" + + "\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014display_name\030\002 \001(\t" + + "\022\020\n\003uid\030\003 \001(\tB\003\340A\003\0224\n\013create_time\030\004 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\0224\n\013upda" + + "te_time\030\005 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\0224\n\013delete_time\030\006 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\022@\n\006labels\030\007 \003(\01320.g" + + "oogle.cloud.alloydb.v1beta.Cluster.Label" + + "sEntry\022>\n\005state\030\010 \001(\0162*.google.cloud.all" + + "oydb.v1beta.Cluster.StateB\003\340A\003\022K\n\014cluste" + + "r_type\030\030 \001(\01620.google.cloud.alloydb.v1be" + + "ta.Cluster.ClusterTypeB\003\340A\003\022K\n\020database_" + + "version\030\t \001(\0162,.google.cloud.alloydb.v1b" + + "eta.DatabaseVersionB\003\340A\001\022O\n\016network_conf" + + "ig\030\035 \001(\01322.google.cloud.alloydb.v1beta.C" + + "luster.NetworkConfigB\003\340A\001\0229\n\007network\030\n \001" + + "(\tB(\030\001\340A\002\372A \n\036compute.googleapis.com/Net" + + "work\022\014\n\004etag\030\013 \001(\t\022J\n\013annotations\030\014 \003(\0132" + + "5.google.cloud.alloydb.v1beta.Cluster.An" + + "notationsEntry\022\030\n\013reconciling\030\r \001(\010B\003\340A\003" + + "\022D\n\014initial_user\030\016 \001(\0132).google.cloud.al" + + "loydb.v1beta.UserPasswordB\003\340A\004\022S\n\027automa" + + "ted_backup_policy\030\021 \001(\01322.google.cloud.a" + + "lloydb.v1beta.AutomatedBackupPolicy\022>\n\ns" + + "sl_config\030\022 \001(\0132&.google.cloud.alloydb.v" + + "1beta.SslConfigB\002\030\001\022M\n\021encryption_config" + + "\030\023 \001(\0132-.google.cloud.alloydb.v1beta.Enc" + + "ryptionConfigB\003\340A\001\022I\n\017encryption_info\030\024 " + + "\001(\0132+.google.cloud.alloydb.v1beta.Encryp" + + "tionInfoB\003\340A\003\022Z\n\030continuous_backup_confi" + + "g\030\033 \001(\01323.google.cloud.alloydb.v1beta.Co" + + "ntinuousBackupConfigB\003\340A\001\022V\n\026continuous_" + + "backup_info\030\034 \001(\01321.google.cloud.alloydb" + + ".v1beta.ContinuousBackupInfoB\003\340A\003\022N\n\020sec" + + "ondary_config\030\026 \001(\01324.google.cloud.alloy" + + "db.v1beta.Cluster.SecondaryConfig\022O\n\016pri" + + "mary_config\030\027 \001(\01322.google.cloud.alloydb" + + ".v1beta.Cluster.PrimaryConfigB\003\340A\003\022\032\n\rsa" + + "tisfies_pzs\030\036 \001(\010B\003\340A\003\032i\n\rNetworkConfig\022" + + "7\n\007network\030\001 \001(\tB&\340A\001\372A \n\036compute.google" + + "apis.com/Network\022\037\n\022allocated_ip_range\030\002" + + " \001(\tB\003\340A\001\032/\n\017SecondaryConfig\022\034\n\024primary_" + + "cluster_name\030\001 \001(\t\0325\n\rPrimaryConfig\022$\n\027s" + + "econdary_cluster_names\030\001 \003(\tB\003\340A\003\032-\n\013Lab" + + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001\"\234\001\n\005State\022\025\n\021STATE_UNSPECIF" + + "IED\020\000\022\t\n\005READY\020\001\022\013\n\007STOPPED\020\002\022\t\n\005EMPTY\020\003" + + "\022\014\n\010CREATING\020\004\022\014\n\010DELETING\020\005\022\n\n\006FAILED\020\006" + + "\022\021\n\rBOOTSTRAPPING\020\007\022\017\n\013MAINTENANCE\020\010\022\r\n\t" + + "PROMOTING\020\t\"G\n\013ClusterType\022\034\n\030CLUSTER_TY" + + "PE_UNSPECIFIED\020\000\022\013\n\007PRIMARY\020\001\022\r\n\tSECONDA" + + "RY\020\002:b\352A_\n\036alloydb.googleapis.com/Cluste" + + "r\022:projects/{project}/locations/{locatio" + + "n}/clusters/{cluster}R\001\001B\010\n\006source\"\373\032\n\010I" + + "nstance\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014display_na" + "me\030\002 \001(\t\022\020\n\003uid\030\003 \001(\tB\003\340A\003\0224\n\013create_tim" + "e\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + "\0224\n\013update_time\030\005 \001(\0132\032.google.protobuf." - + "TimestampB\003\340A\003\0224\n\013delete_time\030\017 \001(\0132\032.go" - + "ogle.protobuf.TimestampB\003\340A\003\022?\n\006labels\030\006" - + " \003(\0132/.google.cloud.alloydb.v1beta.Backu" - + "p.LabelsEntry\022=\n\005state\030\007 \001(\0162).google.cl" - + "oud.alloydb.v1beta.Backup.StateB\003\340A\003\0226\n\004" - + "type\030\010 \001(\0162(.google.cloud.alloydb.v1beta" - + ".Backup.Type\022\023\n\013description\030\t \001(\t\022\030\n\013clu" - + "ster_uid\030\022 \001(\tB\003\340A\003\022<\n\014cluster_name\030\n \001(" - + "\tB&\340A\002\372A \n\036alloydb.googleapis.com/Cluste" - + "r\022\030\n\013reconciling\030\013 \001(\010B\003\340A\003\022M\n\021encryptio" - + "n_config\030\014 \001(\0132-.google.cloud.alloydb.v1" - + "beta.EncryptionConfigB\003\340A\001\022I\n\017encryption" - + "_info\030\r \001(\0132+.google.cloud.alloydb.v1bet" - + "a.EncryptionInfoB\003\340A\003\022\014\n\004etag\030\016 \001(\t\022I\n\013a" - + "nnotations\030\020 \003(\01324.google.cloud.alloydb." - + "v1beta.Backup.AnnotationsEntry\022\027\n\nsize_b" - + "ytes\030\021 \001(\003B\003\340A\003\0224\n\013expiry_time\030\023 \001(\0132\032.g" - + "oogle.protobuf.TimestampB\003\340A\003\022U\n\017expiry_" - + "quantity\030\024 \001(\01327.google.cloud.alloydb.v1" - + "beta.Backup.QuantityBasedExpiryB\003\340A\003\022K\n\020" - + "database_version\030\026 \001(\0162,.google.cloud.al" - + "loydb.v1beta.DatabaseVersionB\003\340A\003\032W\n\023Qua" - + "ntityBasedExpiry\022\034\n\017retention_count\030\001 \001(" - + "\005B\003\340A\003\022\"\n\025total_retention_count\030\002 \001(\005B\003\340" - + "A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" - + "\002 \001(\t:\0028\001\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001" - + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"Q\n\005State\022\025\n\021STATE_" - + "UNSPECIFIED\020\000\022\t\n\005READY\020\001\022\014\n\010CREATING\020\002\022\n" - + "\n\006FAILED\020\003\022\014\n\010DELETING\020\004\"J\n\004Type\022\024\n\020TYPE" - + "_UNSPECIFIED\020\000\022\r\n\tON_DEMAND\020\001\022\r\n\tAUTOMAT" - + "ED\020\002\022\016\n\nCONTINUOUS\020\003:_\352A\\\n\035alloydb.googl" - + "eapis.com/Backup\0228projects/{project}/loc" - + "ations/{location}/backups/{backup}R\001\001\"\330\006" - + "\n\025SupportedDatabaseFlag\022d\n\023string_restri" - + "ctions\030\007 \001(\0132E.google.cloud.alloydb.v1be" - + "ta.SupportedDatabaseFlag.StringRestricti" - + "onsH\000\022f\n\024integer_restrictions\030\010 \001(\0132F.go" - + "ogle.cloud.alloydb.v1beta.SupportedDatab" - + "aseFlag.IntegerRestrictionsH\000\022\014\n\004name\030\001 " - + "\001(\t\022\021\n\tflag_name\030\002 \001(\t\022P\n\nvalue_type\030\003 \001" - + "(\0162<.google.cloud.alloydb.v1beta.Support" - + "edDatabaseFlag.ValueType\022\037\n\027accepts_mult" - + "iple_values\030\004 \001(\010\022K\n\025supported_db_versio" - + "ns\030\005 \003(\0162,.google.cloud.alloydb.v1beta.D" - + "atabaseVersion\022\033\n\023requires_db_restart\030\006 " - + "\001(\010\032,\n\022StringRestrictions\022\026\n\016allowed_val" - + "ues\030\001 \003(\t\032u\n\023IntegerRestrictions\022.\n\tmin_" - + "value\030\001 \001(\0132\033.google.protobuf.Int64Value" - + "\022.\n\tmax_value\030\002 \001(\0132\033.google.protobuf.In" - + "t64Value\"U\n\tValueType\022\032\n\026VALUE_TYPE_UNSP" - + "ECIFIED\020\000\022\n\n\006STRING\020\001\022\013\n\007INTEGER\020\002\022\t\n\005FL" - + "OAT\020\003\022\010\n\004NONE\020\004:g\352Ad\n,alloydb.googleapis" - + ".com/SupportedDatabaseFlag\0224projects/{pr" - + "oject}/locations/{location}/flags/{flag}" - + "B\016\n\014restrictions\"\322\002\n\004User\022\021\n\004name\030\001 \001(\tB" - + "\003\340A\003\022\025\n\010password\030\002 \001(\tB\003\340A\004\022\033\n\016database_" - + "roles\030\004 \003(\tB\003\340A\001\022B\n\tuser_type\030\005 \001(\0162*.go" - + "ogle.cloud.alloydb.v1beta.User.UserTypeB" - + "\003\340A\001\"Q\n\010UserType\022\031\n\025USER_TYPE_UNSPECIFIE" - + "D\020\000\022\024\n\020ALLOYDB_BUILT_IN\020\001\022\024\n\020ALLOYDB_IAM" - + "_USER\020\002:l\352Ai\n\033alloydb.googleapis.com/Use" - + "r\022Gprojects/{project}/locations/{locatio" - + "n}/clusters/{cluster}/users/{user}R\001\001*^\n" - + "\014InstanceView\022\035\n\031INSTANCE_VIEW_UNSPECIFI" - + "ED\020\000\022\027\n\023INSTANCE_VIEW_BASIC\020\001\022\026\n\022INSTANC" - + "E_VIEW_FULL\020\002*g\n\013ClusterView\022\034\n\030CLUSTER_" - + "VIEW_UNSPECIFIED\020\000\022\026\n\022CLUSTER_VIEW_BASIC" - + "\020\001\022\"\n\036CLUSTER_VIEW_CONTINUOUS_BACKUP\020\002*j" - + "\n\017DatabaseVersion\022 \n\034DATABASE_VERSION_UN" - + "SPECIFIED\020\000\022\023\n\013POSTGRES_13\020\001\032\002\010\001\022\017\n\013POST" - + "GRES_14\020\002\022\017\n\013POSTGRES_15\020\003B\306\003\n\037com.googl" - + "e.cloud.alloydb.v1betaB\016ResourcesProtoP\001" - + "Z9cloud.google.com/go/alloydb/apiv1beta/" - + "alloydbpb;alloydbpb\252\002\033Google.Cloud.Alloy" - + "Db.V1Beta\312\002\033Google\\Cloud\\AlloyDb\\V1beta\352" - + "\002\036Google::Cloud::AlloyDB::V1beta\352A\246\001\n(cl" - + "oudkms.googleapis.com/CryptoKeyVersion\022z" + + "TimestampB\003\340A\003\0224\n\013delete_time\030\006 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\022A\n\006labels\030\007" + + " \003(\01321.google.cloud.alloydb.v1beta.Insta" + + "nce.LabelsEntry\022?\n\005state\030\010 \001(\0162+.google." + + "cloud.alloydb.v1beta.Instance.StateB\003\340A\003" + + "\022N\n\rinstance_type\030\t \001(\01622.google.cloud.a" + + "lloydb.v1beta.Instance.InstanceTypeB\003\340A\002" + + "\022K\n\016machine_config\030\n \001(\01323.google.cloud." + + "alloydb.v1beta.Instance.MachineConfig\022Q\n" + + "\021availability_type\030\013 \001(\01626.google.cloud." + + "alloydb.v1beta.Instance.AvailabilityType" + + "\022\020\n\010gce_zone\030\014 \001(\t\022P\n\016database_flags\030\r \003" + + "(\01328.google.cloud.alloydb.v1beta.Instanc" + + "e.DatabaseFlagsEntry\022F\n\rwritable_node\030\023 " + + "\001(\0132*.google.cloud.alloydb.v1beta.Instan" + + "ce.NodeB\003\340A\003\022>\n\005nodes\030\024 \003(\0132*.google.clo" + + "ud.alloydb.v1beta.Instance.NodeB\003\340A\003\022`\n\025" + + "query_insights_config\030\025 \001(\0132A.google.clo" + + "ud.alloydb.v1beta.Instance.QueryInsights" + + "InstanceConfig\022N\n\020read_pool_config\030\016 \001(\013" + + "24.google.cloud.alloydb.v1beta.Instance." + + "ReadPoolConfig\022\027\n\nip_address\030\017 \001(\tB\003\340A\003\022" + + "\036\n\021public_ip_address\030\033 \001(\tB\003\340A\003\022\030\n\013recon" + + "ciling\030\020 \001(\010B\003\340A\003\022\014\n\004etag\030\021 \001(\t\022K\n\013annot" + + "ations\030\022 \003(\01326.google.cloud.alloydb.v1be" + + "ta.Instance.AnnotationsEntry\022I\n\rupdate_p" + + "olicy\030\026 \001(\01322.google.cloud.alloydb.v1bet" + + "a.Instance.UpdatePolicy\022c\n\030client_connec" + + "tion_config\030\027 \001(\0132<.google.cloud.alloydb" + + ".v1beta.Instance.ClientConnectionConfigB" + + "\003\340A\001\022\032\n\rsatisfies_pzs\030\030 \001(\010B\003\340A\003\022Y\n\023psc_" + + "instance_config\030\034 \001(\01327.google.cloud.all" + + "oydb.v1beta.Instance.PscInstanceConfigB\003" + + "\340A\001\022X\n\016network_config\030\035 \001(\0132;.google.clo" + + "ud.alloydb.v1beta.Instance.InstanceNetwo" + + "rkConfigB\003\340A\001\032\"\n\rMachineConfig\022\021\n\tcpu_co" + + "unt\030\001 \001(\005\032>\n\004Node\022\017\n\007zone_id\030\001 \001(\t\022\n\n\002id" + + "\030\002 \001(\t\022\n\n\002ip\030\003 \001(\t\022\r\n\005state\030\004 \001(\t\032\372\001\n\033Qu" + + "eryInsightsInstanceConfig\022$\n\027record_appl" + + "ication_tags\030\002 \001(\010H\000\210\001\001\022\"\n\025record_client" + + "_address\030\003 \001(\010H\001\210\001\001\022\033\n\023query_string_leng" + + "th\030\004 \001(\r\022#\n\026query_plans_per_minute\030\005 \001(\r" + + "H\002\210\001\001B\032\n\030_record_application_tagsB\030\n\026_re" + + "cord_client_addressB\031\n\027_query_plans_per_" + + "minute\032$\n\016ReadPoolConfig\022\022\n\nnode_count\030\001" + + " \001(\005\032\221\001\n\014UpdatePolicy\022E\n\004mode\030\001 \001(\01627.go" + + "ogle.cloud.alloydb.v1beta.Instance.Updat" + + "ePolicy.Mode\":\n\004Mode\022\024\n\020MODE_UNSPECIFIED" + + "\020\000\022\013\n\007DEFAULT\020\001\022\017\n\013FORCE_APPLY\020\002\032z\n\026Clie" + + "ntConnectionConfig\022\037\n\022require_connectors" + + "\030\001 \001(\010B\003\340A\001\022?\n\nssl_config\030\002 \001(\0132&.google" + + ".cloud.alloydb.v1beta.SslConfigB\003\340A\001\032O\n\022" + + "PscInterfaceConfig\022\035\n\025consumer_endpoint_" + + "ips\030\001 \003(\t\022\032\n\022network_attachment\030\002 \001(\t\032\261\002" + + "\n\021PscInstanceConfig\022$\n\027service_attachmen" + + "t_link\030\001 \001(\tB\003\340A\003\022&\n\031allowed_consumer_pr" + + "ojects\030\002 \003(\tB\003\340A\001\022&\n\031allowed_consumer_ne" + + "tworks\030\003 \003(\tB\003\340A\001\022\\\n\025psc_interface_confi" + + "gs\030\004 \003(\01328.google.cloud.alloydb.v1beta.I" + + "nstance.PscInterfaceConfigB\003\340A\001\022.\n!outgo" + + "ing_service_attachment_links\030\005 \003(\tB\003\340A\001\022" + + "\030\n\013psc_enabled\030\006 \001(\010B\003\340A\001\032\343\001\n\025InstanceNe" + + "tworkConfig\022x\n\034authorized_external_netwo" + + "rks\030\001 \003(\0132M.google.cloud.alloydb.v1beta." + + "Instance.InstanceNetworkConfig.Authorize" + + "dNetworkB\003\340A\001\022\035\n\020enable_public_ip\030\002 \001(\010B" + + "\003\340A\001\0321\n\021AuthorizedNetwork\022\034\n\ncidr_range\030" + + "\001 \001(\tB\010\342\214\317\327\010\002\010\002\032-\n\013LabelsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0324\n\022DatabaseFlagsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020" + + "AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\"\221\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020" + + "\000\022\t\n\005READY\020\001\022\013\n\007STOPPED\020\002\022\014\n\010CREATING\020\003\022" + + "\014\n\010DELETING\020\004\022\017\n\013MAINTENANCE\020\005\022\n\n\006FAILED" + + "\020\006\022\021\n\rBOOTSTRAPPING\020\010\022\r\n\tPROMOTING\020\t\"X\n\014" + + "InstanceType\022\035\n\031INSTANCE_TYPE_UNSPECIFIE" + + "D\020\000\022\013\n\007PRIMARY\020\001\022\r\n\tREAD_POOL\020\002\022\r\n\tSECON" + + "DARY\020\003\"N\n\020AvailabilityType\022!\n\035AVAILABILI" + + "TY_TYPE_UNSPECIFIED\020\000\022\t\n\005ZONAL\020\001\022\014\n\010REGI" + + "ONAL\020\002:x\352Au\n\037alloydb.googleapis.com/Inst" + + "ance\022Oprojects/{project}/locations/{loca" + + "tion}/clusters/{cluster}/instances/{inst" + + "ance}R\001\001\"\311\002\n\016ConnectionInfo\022\014\n\004name\030\001 \001(" + + "\t\022\027\n\nip_address\030\002 \001(\tB\003\340A\003\022&\n\021public_ip_" + + "address\030\005 \001(\tB\013\340A\003\342\214\317\327\010\002\010\002\022$\n\025pem_certif" + + "icate_chain\030\003 \003(\tB\005\030\001\340A\003\022\031\n\014instance_uid" + + "\030\004 \001(\tB\003\340A\003\022\031\n\014psc_dns_name\030\006 \001(\tB\003\340A\003:\213" + + "\001\352A\207\001\n%alloydb.googleapis.com/Connection" + + "Info\022^projects/{project}/locations/{loca" + + "tion}/clusters/{cluster}/instances/{inst" + + "ance}/connectionInfo\"\342\013\n\006Backup\022\021\n\004name\030" + + "\001 \001(\tB\003\340A\003\022\024\n\014display_name\030\002 \001(\t\022\020\n\003uid\030" + + "\003 \001(\tB\003\340A\003\0224\n\013create_time\030\004 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\003\0224\n\013update_time\030" + + "\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224" + + "\n\013delete_time\030\017 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\022?\n\006labels\030\006 \003(\0132/.google.cl" + + "oud.alloydb.v1beta.Backup.LabelsEntry\022=\n" + + "\005state\030\007 \001(\0162).google.cloud.alloydb.v1be" + + "ta.Backup.StateB\003\340A\003\0226\n\004type\030\010 \001(\0162(.goo" + + "gle.cloud.alloydb.v1beta.Backup.Type\022\023\n\013" + + "description\030\t \001(\t\022\030\n\013cluster_uid\030\022 \001(\tB\003" + + "\340A\003\022<\n\014cluster_name\030\n \001(\tB&\340A\002\372A \n\036alloy" + + "db.googleapis.com/Cluster\022\030\n\013reconciling" + + "\030\013 \001(\010B\003\340A\003\022M\n\021encryption_config\030\014 \001(\0132-" + + ".google.cloud.alloydb.v1beta.EncryptionC" + + "onfigB\003\340A\001\022I\n\017encryption_info\030\r \001(\0132+.go" + + "ogle.cloud.alloydb.v1beta.EncryptionInfo" + + "B\003\340A\003\022\014\n\004etag\030\016 \001(\t\022I\n\013annotations\030\020 \003(\013" + + "24.google.cloud.alloydb.v1beta.Backup.An" + + "notationsEntry\022\027\n\nsize_bytes\030\021 \001(\003B\003\340A\003\022" + + "4\n\013expiry_time\030\023 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\022U\n\017expiry_quantity\030\024 \001(\01327" + + ".google.cloud.alloydb.v1beta.Backup.Quan" + + "tityBasedExpiryB\003\340A\003\022\032\n\rsatisfies_pzs\030\025 " + + "\001(\010B\003\340A\003\022K\n\020database_version\030\026 \001(\0162,.goo" + + "gle.cloud.alloydb.v1beta.DatabaseVersion" + + "B\003\340A\003\032W\n\023QuantityBasedExpiry\022\034\n\017retentio" + + "n_count\030\001 \001(\005B\003\340A\003\022\"\n\025total_retention_co" + + "unt\030\002 \001(\005B\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020AnnotationsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"Q\n\005Sta" + + "te\022\025\n\021STATE_UNSPECIFIED\020\000\022\t\n\005READY\020\001\022\014\n\010" + + "CREATING\020\002\022\n\n\006FAILED\020\003\022\014\n\010DELETING\020\004\"J\n\004" + + "Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\r\n\tON_DEMAND\020" + + "\001\022\r\n\tAUTOMATED\020\002\022\016\n\nCONTINUOUS\020\003:_\352A\\\n\035a" + + "lloydb.googleapis.com/Backup\0228projects/{" + + "project}/locations/{location}/backups/{b" + + "ackup}R\001\001\"\330\006\n\025SupportedDatabaseFlag\022d\n\023s" + + "tring_restrictions\030\007 \001(\0132E.google.cloud." + + "alloydb.v1beta.SupportedDatabaseFlag.Str" + + "ingRestrictionsH\000\022f\n\024integer_restriction" + + "s\030\010 \001(\0132F.google.cloud.alloydb.v1beta.Su" + + "pportedDatabaseFlag.IntegerRestrictionsH" + + "\000\022\014\n\004name\030\001 \001(\t\022\021\n\tflag_name\030\002 \001(\t\022P\n\nva" + + "lue_type\030\003 \001(\0162<.google.cloud.alloydb.v1" + + "beta.SupportedDatabaseFlag.ValueType\022\037\n\027" + + "accepts_multiple_values\030\004 \001(\010\022K\n\025support" + + "ed_db_versions\030\005 \003(\0162,.google.cloud.allo" + + "ydb.v1beta.DatabaseVersion\022\033\n\023requires_d" + + "b_restart\030\006 \001(\010\032,\n\022StringRestrictions\022\026\n" + + "\016allowed_values\030\001 \003(\t\032u\n\023IntegerRestrict" + + "ions\022.\n\tmin_value\030\001 \001(\0132\033.google.protobu" + + "f.Int64Value\022.\n\tmax_value\030\002 \001(\0132\033.google" + + ".protobuf.Int64Value\"U\n\tValueType\022\032\n\026VAL" + + "UE_TYPE_UNSPECIFIED\020\000\022\n\n\006STRING\020\001\022\013\n\007INT" + + "EGER\020\002\022\t\n\005FLOAT\020\003\022\010\n\004NONE\020\004:g\352Ad\n,alloyd" + + "b.googleapis.com/SupportedDatabaseFlag\0224" + "projects/{project}/locations/{location}/" - + "keyRings/{key_ring}/cryptoKeys/{crypto_k" - + "ey}/cryptoKeyVersions/{crypto_key_versio" - + "n}\352AN\n\036compute.googleapis.com/Network\022,p" - + "rojects/{project}/global/networks/{netwo" - + "rk}b\006proto3" + + "flags/{flag}B\016\n\014restrictions\"\322\002\n\004User\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\003\022\025\n\010password\030\002 \001(\tB\003\340A\004\022" + + "\033\n\016database_roles\030\004 \003(\tB\003\340A\001\022B\n\tuser_typ" + + "e\030\005 \001(\0162*.google.cloud.alloydb.v1beta.Us" + + "er.UserTypeB\003\340A\001\"Q\n\010UserType\022\031\n\025USER_TYP" + + "E_UNSPECIFIED\020\000\022\024\n\020ALLOYDB_BUILT_IN\020\001\022\024\n" + + "\020ALLOYDB_IAM_USER\020\002:l\352Ai\n\033alloydb.google" + + "apis.com/User\022Gprojects/{project}/locati" + + "ons/{location}/clusters/{cluster}/users/" + + "{user}R\001\001\"\334\001\n\010Database\022\021\n\004name\030\001 \001(\tB\003\340A" + + "\010\022\024\n\007charset\030\002 \001(\tB\003\340A\001\022\026\n\tcollation\030\003 \001" + + "(\tB\003\340A\001:\216\001\352A\212\001\n\037alloydb.googleapis.com/D" + + "atabase\022Oprojects/{project}/locations/{l" + + "ocation}/clusters/{cluster}/databases/{d" + + "atabase}*\tdatabases2\010databaseR\001\001*^\n\014Inst" + + "anceView\022\035\n\031INSTANCE_VIEW_UNSPECIFIED\020\000\022" + + "\027\n\023INSTANCE_VIEW_BASIC\020\001\022\026\n\022INSTANCE_VIE" + + "W_FULL\020\002*g\n\013ClusterView\022\034\n\030CLUSTER_VIEW_" + + "UNSPECIFIED\020\000\022\026\n\022CLUSTER_VIEW_BASIC\020\001\022\"\n" + + "\036CLUSTER_VIEW_CONTINUOUS_BACKUP\020\002*j\n\017Dat" + + "abaseVersion\022 \n\034DATABASE_VERSION_UNSPECI" + + "FIED\020\000\022\023\n\013POSTGRES_13\020\001\032\002\010\001\022\017\n\013POSTGRES_" + + "14\020\002\022\017\n\013POSTGRES_15\020\003B\306\003\n\037com.google.clo" + + "ud.alloydb.v1betaB\016ResourcesProtoP\001Z9clo" + + "ud.google.com/go/alloydb/apiv1beta/alloy" + + "dbpb;alloydbpb\252\002\033Google.Cloud.AlloyDb.V1" + + "Beta\312\002\033Google\\Cloud\\AlloyDb\\V1beta\352\002\036Goo" + + "gle::Cloud::AlloyDB::V1beta\352A\246\001\n(cloudkm" + + "s.googleapis.com/CryptoKeyVersion\022zproje" + + "cts/{project}/locations/{location}/keyRi" + + "ngs/{key_ring}/cryptoKeys/{crypto_key}/c" + + "ryptoKeyVersions/{crypto_key_version}\352AN" + + "\n\036compute.googleapis.com/Network\022,projec" + + "ts/{project}/global/networks/{network}b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), @@ -653,6 +705,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ContinuousBackupInfo", "SecondaryConfig", "PrimaryConfig", + "SatisfiesPzs", "Source", }); internal_static_google_cloud_alloydb_v1beta_Cluster_NetworkConfig_descriptor = @@ -719,11 +772,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "QueryInsightsConfig", "ReadPoolConfig", "IpAddress", + "PublicIpAddress", "Reconciling", "Etag", "Annotations", "UpdatePolicy", "ClientConnectionConfig", + "SatisfiesPzs", + "PscInstanceConfig", + "NetworkConfig", }); internal_static_google_cloud_alloydb_v1beta_Instance_MachineConfig_descriptor = internal_static_google_cloud_alloydb_v1beta_Instance_descriptor.getNestedTypes().get(0); @@ -776,8 +833,47 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "RequireConnectors", "SslConfig", }); - internal_static_google_cloud_alloydb_v1beta_Instance_LabelsEntry_descriptor = + internal_static_google_cloud_alloydb_v1beta_Instance_PscInterfaceConfig_descriptor = internal_static_google_cloud_alloydb_v1beta_Instance_descriptor.getNestedTypes().get(6); + internal_static_google_cloud_alloydb_v1beta_Instance_PscInterfaceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1beta_Instance_PscInterfaceConfig_descriptor, + new java.lang.String[] { + "ConsumerEndpointIps", "NetworkAttachment", + }); + internal_static_google_cloud_alloydb_v1beta_Instance_PscInstanceConfig_descriptor = + internal_static_google_cloud_alloydb_v1beta_Instance_descriptor.getNestedTypes().get(7); + internal_static_google_cloud_alloydb_v1beta_Instance_PscInstanceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1beta_Instance_PscInstanceConfig_descriptor, + new java.lang.String[] { + "ServiceAttachmentLink", + "AllowedConsumerProjects", + "AllowedConsumerNetworks", + "PscInterfaceConfigs", + "OutgoingServiceAttachmentLinks", + "PscEnabled", + }); + internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_descriptor = + internal_static_google_cloud_alloydb_v1beta_Instance_descriptor.getNestedTypes().get(8); + internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_descriptor, + new java.lang.String[] { + "AuthorizedExternalNetworks", "EnablePublicIp", + }); + internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor = + internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_AuthorizedNetwork_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1beta_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor, + new java.lang.String[] { + "CidrRange", + }); + internal_static_google_cloud_alloydb_v1beta_Instance_LabelsEntry_descriptor = + internal_static_google_cloud_alloydb_v1beta_Instance_descriptor.getNestedTypes().get(9); internal_static_google_cloud_alloydb_v1beta_Instance_LabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_alloydb_v1beta_Instance_LabelsEntry_descriptor, @@ -785,7 +881,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_alloydb_v1beta_Instance_DatabaseFlagsEntry_descriptor = - internal_static_google_cloud_alloydb_v1beta_Instance_descriptor.getNestedTypes().get(7); + internal_static_google_cloud_alloydb_v1beta_Instance_descriptor.getNestedTypes().get(10); internal_static_google_cloud_alloydb_v1beta_Instance_DatabaseFlagsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_alloydb_v1beta_Instance_DatabaseFlagsEntry_descriptor, @@ -793,7 +889,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_alloydb_v1beta_Instance_AnnotationsEntry_descriptor = - internal_static_google_cloud_alloydb_v1beta_Instance_descriptor.getNestedTypes().get(8); + internal_static_google_cloud_alloydb_v1beta_Instance_descriptor.getNestedTypes().get(11); internal_static_google_cloud_alloydb_v1beta_Instance_AnnotationsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_alloydb_v1beta_Instance_AnnotationsEntry_descriptor, @@ -806,7 +902,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_alloydb_v1beta_ConnectionInfo_descriptor, new java.lang.String[] { - "Name", "IpAddress", "PemCertificateChain", "InstanceUid", + "Name", + "IpAddress", + "PublicIpAddress", + "PemCertificateChain", + "InstanceUid", + "PscDnsName", }); internal_static_google_cloud_alloydb_v1beta_Backup_descriptor = getDescriptor().getMessageTypes().get(13); @@ -834,6 +935,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SizeBytes", "ExpiryTime", "ExpiryQuantity", + "SatisfiesPzs", "DatabaseVersion", }); internal_static_google_cloud_alloydb_v1beta_Backup_QuantityBasedExpiry_descriptor = @@ -904,15 +1006,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Password", "DatabaseRoles", "UserType", }); + internal_static_google_cloud_alloydb_v1beta_Database_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_alloydb_v1beta_Database_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1beta_Database_descriptor, + new java.lang.String[] { + "Name", "Charset", "Collation", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); registry.add(com.google.api.ResourceProto.resource); registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ServiceProto.java b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ServiceProto.java index a6b193e87dcb..8d51457c5b79 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ServiceProto.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/java/com/google/cloud/alloydb/v1beta/ServiceProto.java @@ -200,6 +200,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_alloydb_v1beta_DeleteUserRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_alloydb_v1beta_DeleteUserRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1beta_ListDatabasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1beta_ListDatabasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1beta_ListDatabasesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1beta_ListDatabasesResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -372,218 +380,229 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\340A\001\022\026\n\007pem_csr\030\003 \001(\tB\005\030\001\340A\001\0225\n\rcert_dura" + "tion\030\004 \001(\0132\031.google.protobuf.DurationB\003\340" + "A\001\022\027\n\npublic_key\030\005 \001(\tB\003\340A\001\022\"\n\025use_metad" - + "ata_exchange\030\006 \001(\010B\003\340A\001\"{\n!GenerateClien" - + "tCertificateResponse\022\034\n\017pem_certificate\030" - + "\001 \001(\tB\003\340A\003\022\"\n\025pem_certificate_chain\030\002 \003(" - + "\tB\003\340A\003\022\024\n\007ca_cert\030\003 \001(\tB\003\340A\001\"l\n\030GetConne" - + "ctionInfoRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!" - + "\n\037alloydb.googleapis.com/Instance\022\027\n\nreq" - + "uest_id\030\002 \001(\tB\003\340A\001\"\377\002\n\021OperationMetadata" - + "\022i\n\037batch_create_instances_metadata\030\010 \001(" - + "\01329.google.cloud.alloydb.v1beta.BatchCre" - + "ateInstancesMetadataB\003\340A\003H\000\0224\n\013create_ti" - + "me\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\0221\n\010end_time\030\002 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004ver" - + "b\030\004 \001(\tB\003\340A\003\022\033\n\016status_message\030\005 \001(\tB\003\340A" - + "\003\022#\n\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030" - + "\n\013api_version\030\007 \001(\tB\003\340A\003B\022\n\020request_spec" - + "ific\"\244\001\n\020ListUsersRequest\0223\n\006parent\030\001 \001(" - + "\tB#\340A\002\372A\035\022\033alloydb.googleapis.com/User\022\026" - + "\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001" - + "(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by" - + "\030\005 \001(\tB\003\340A\001\"s\n\021ListUsersResponse\0220\n\005user" - + "s\030\001 \003(\0132!.google.cloud.alloydb.v1beta.Us" - + "er\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachab" - + "le\030\003 \003(\t\"C\n\016GetUserRequest\0221\n\004name\030\001 \001(\t" - + "B#\340A\002\372A\035\n\033alloydb.googleapis.com/User\"\311\001" - + "\n\021CreateUserRequest\0223\n\006parent\030\001 \001(\tB#\340A\002" - + "\372A\035\022\033alloydb.googleapis.com/User\022\024\n\007user" - + "_id\030\002 \001(\tB\003\340A\002\0224\n\004user\030\003 \001(\0132!.google.cl" - + "oud.alloydb.v1beta.UserB\003\340A\002\022\027\n\nrequest_" - + "id\030\004 \001(\tB\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003\340A" - + "\001\"\320\001\n\021UpdateUserRequest\0224\n\013update_mask\030\001" - + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\0224\n" - + "\004user\030\002 \001(\0132!.google.cloud.alloydb.v1bet" - + "a.UserB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\022\032\n\r" - + "validate_only\030\004 \001(\010B\003\340A\001\022\032\n\rallow_missin" - + "g\030\005 \001(\010B\003\340A\001\"{\n\021DeleteUserRequest\0221\n\004nam" - + "e\030\001 \001(\tB#\340A\002\372A\035\n\033alloydb.googleapis.com/" - + "User\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\022\032\n\rvalidat" - + "e_only\030\003 \001(\010B\003\340A\0012\2464\n\014AlloyDBAdmin\022\266\001\n\014L" - + "istClusters\0220.google.cloud.alloydb.v1bet" - + "a.ListClustersRequest\0321.google.cloud.all" - + "oydb.v1beta.ListClustersResponse\"A\332A\006par" - + "ent\202\323\344\223\0022\0220/v1beta/{parent=projects/*/lo" - + "cations/*}/clusters\022\243\001\n\nGetCluster\022..goo" - + "gle.cloud.alloydb.v1beta.GetClusterReque" - + "st\032$.google.cloud.alloydb.v1beta.Cluster" - + "\"?\332A\004name\202\323\344\223\0022\0220/v1beta/{name=projects/" - + "*/locations/*/clusters/*}\022\337\001\n\rCreateClus" - + "ter\0221.google.cloud.alloydb.v1beta.Create" - + "ClusterRequest\032\035.google.longrunning.Oper" - + "ation\"|\312A\034\n\007Cluster\022\021OperationMetadata\332A" - + "\031parent,cluster,cluster_id\202\323\344\223\002;\"0/v1bet" - + "a/{parent=projects/*/locations/*}/cluste" - + "rs:\007cluster\022\341\001\n\rUpdateCluster\0221.google.c" - + "loud.alloydb.v1beta.UpdateClusterRequest" - + "\032\035.google.longrunning.Operation\"~\312A\034\n\007Cl" - + "uster\022\021OperationMetadata\332A\023cluster,updat" - + "e_mask\202\323\344\223\002C28/v1beta/{cluster.name=proj" - + "ects/*/locations/*/clusters/*}:\007cluster\022" - + "\317\001\n\rDeleteCluster\0221.google.cloud.alloydb" - + ".v1beta.DeleteClusterRequest\032\035.google.lo" - + "ngrunning.Operation\"l\312A*\n\025google.protobu" - + "f.Empty\022\021OperationMetadata\332A\004name\202\323\344\223\0022*" - + "0/v1beta/{name=projects/*/locations/*/cl" - + "usters/*}\022\316\001\n\016PromoteCluster\0222.google.cl" - + "oud.alloydb.v1beta.PromoteClusterRequest" - + "\032\035.google.longrunning.Operation\"i\312A\034\n\007Cl" - + "uster\022\021OperationMetadata\332A\004name\202\323\344\223\002=\"8/" + + "ata_exchange\030\006 \001(\010B\003\340A\001\"}\n!GenerateClien" + + "tCertificateResponse\022\036\n\017pem_certificate\030" + + "\001 \001(\tB\005\030\001\340A\003\022\"\n\025pem_certificate_chain\030\002 " + + "\003(\tB\003\340A\003\022\024\n\007ca_cert\030\003 \001(\tB\003\340A\001\"l\n\030GetCon" + + "nectionInfoRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372" + + "A!\n\037alloydb.googleapis.com/Instance\022\027\n\nr" + + "equest_id\030\002 \001(\tB\003\340A\001\"\377\002\n\021OperationMetada" + + "ta\022i\n\037batch_create_instances_metadata\030\010 " + + "\001(\01329.google.cloud.alloydb.v1beta.BatchC" + + "reateInstancesMetadataB\003\340A\003H\000\0224\n\013create_" + + "time\030\001 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004v" + + "erb\030\004 \001(\tB\003\340A\003\022\033\n\016status_message\030\005 \001(\tB\003" + + "\340A\003\022#\n\026requested_cancellation\030\006 \001(\010B\003\340A\003" + + "\022\030\n\013api_version\030\007 \001(\tB\003\340A\003B\022\n\020request_sp" + + "ecific\"\244\001\n\020ListUsersRequest\0223\n\006parent\030\001 " + + "\001(\tB#\340A\002\372A\035\022\033alloydb.googleapis.com/User" + + "\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003" + + " \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_" + + "by\030\005 \001(\tB\003\340A\001\"s\n\021ListUsersResponse\0220\n\005us" + + "ers\030\001 \003(\0132!.google.cloud.alloydb.v1beta." + + "User\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreach" + + "able\030\003 \003(\t\"C\n\016GetUserRequest\0221\n\004name\030\001 \001" + + "(\tB#\340A\002\372A\035\n\033alloydb.googleapis.com/User\"" + + "\311\001\n\021CreateUserRequest\0223\n\006parent\030\001 \001(\tB#\340" + + "A\002\372A\035\022\033alloydb.googleapis.com/User\022\024\n\007us" + + "er_id\030\002 \001(\tB\003\340A\002\0224\n\004user\030\003 \001(\0132!.google." + + "cloud.alloydb.v1beta.UserB\003\340A\002\022\027\n\nreques" + + "t_id\030\004 \001(\tB\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003" + + "\340A\001\"\320\001\n\021UpdateUserRequest\0224\n\013update_mask" + + "\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022" + + "4\n\004user\030\002 \001(\0132!.google.cloud.alloydb.v1b" + + "eta.UserB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\022\032" + + "\n\rvalidate_only\030\004 \001(\010B\003\340A\001\022\032\n\rallow_miss" + + "ing\030\005 \001(\010B\003\340A\001\"{\n\021DeleteUserRequest\0221\n\004n" + + "ame\030\001 \001(\tB#\340A\002\372A\035\n\033alloydb.googleapis.co" + + "m/User\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\022\032\n\rvalid" + + "ate_only\030\003 \001(\010B\003\340A\001\"\225\001\n\024ListDatabasesReq" + + "uest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037alloydb.go" + + "ogleapis.com/Database\022\026\n\tpage_size\030\002 \001(\005" + + "B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter" + + "\030\004 \001(\tB\003\340A\001\"j\n\025ListDatabasesResponse\0228\n\t" + + "databases\030\001 \003(\0132%.google.cloud.alloydb.v" + + "1beta.Database\022\027\n\017next_page_token\030\002 \001(\t2" + + "\3565\n\014AlloyDBAdmin\022\266\001\n\014ListClusters\0220.goog" + + "le.cloud.alloydb.v1beta.ListClustersRequ" + + "est\0321.google.cloud.alloydb.v1beta.ListCl" + + "ustersResponse\"A\332A\006parent\202\323\344\223\0022\0220/v1beta" + + "/{parent=projects/*/locations/*}/cluster" + + "s\022\243\001\n\nGetCluster\022..google.cloud.alloydb." + + "v1beta.GetClusterRequest\032$.google.cloud." + + "alloydb.v1beta.Cluster\"?\332A\004name\202\323\344\223\0022\0220/" + "v1beta/{name=projects/*/locations/*/clus" - + "ters/*}:promote:\001*\022\307\001\n\016RestoreCluster\0222." - + "google.cloud.alloydb.v1beta.RestoreClust" + + "ters/*}\022\337\001\n\rCreateCluster\0221.google.cloud" + + ".alloydb.v1beta.CreateClusterRequest\032\035.g" + + "oogle.longrunning.Operation\"|\312A\034\n\007Cluste" + + "r\022\021OperationMetadata\332A\031parent,cluster,cl" + + "uster_id\202\323\344\223\002;\"0/v1beta/{parent=projects" + + "/*/locations/*}/clusters:\007cluster\022\341\001\n\rUp" + + "dateCluster\0221.google.cloud.alloydb.v1bet" + + "a.UpdateClusterRequest\032\035.google.longrunn" + + "ing.Operation\"~\312A\034\n\007Cluster\022\021OperationMe" + + "tadata\332A\023cluster,update_mask\202\323\344\223\002C28/v1b" + + "eta/{cluster.name=projects/*/locations/*" + + "/clusters/*}:\007cluster\022\317\001\n\rDeleteCluster\022" + + "1.google.cloud.alloydb.v1beta.DeleteClus" + + "terRequest\032\035.google.longrunning.Operatio" + + "n\"l\312A*\n\025google.protobuf.Empty\022\021Operation" + + "Metadata\332A\004name\202\323\344\223\0022*0/v1beta/{name=pro" + + "jects/*/locations/*/clusters/*}\022\316\001\n\016Prom" + + "oteCluster\0222.google.cloud.alloydb.v1beta" + + ".PromoteClusterRequest\032\035.google.longrunn" + + "ing.Operation\"i\312A\034\n\007Cluster\022\021OperationMe" + + "tadata\332A\004name\202\323\344\223\002=\"8/v1beta/{name=proje" + + "cts/*/locations/*/clusters/*}:promote:\001*" + + "\022\307\001\n\016RestoreCluster\0222.google.cloud.alloy" + + "db.v1beta.RestoreClusterRequest\032\035.google" + + ".longrunning.Operation\"b\312A\034\n\007Cluster\022\021Op" + + "erationMetadata\202\323\344\223\002=\"8/v1beta/{parent=p" + + "rojects/*/locations/*}/clusters:restore:" + + "\001*\022\202\002\n\026CreateSecondaryCluster\022:.google.c" + + "loud.alloydb.v1beta.CreateSecondaryClust" + "erRequest\032\035.google.longrunning.Operation" - + "\"b\312A\034\n\007Cluster\022\021OperationMetadata\202\323\344\223\002=\"" - + "8/v1beta/{parent=projects/*/locations/*}" - + "/clusters:restore:\001*\022\202\002\n\026CreateSecondary" - + "Cluster\022:.google.cloud.alloydb.v1beta.Cr" - + "eateSecondaryClusterRequest\032\035.google.lon" - + "grunning.Operation\"\214\001\312A\034\n\007Cluster\022\021Opera" - + "tionMetadata\332A\031parent,cluster,cluster_id" - + "\202\323\344\223\002K\"@/v1beta/{parent=projects/*/locat" - + "ions/*}/clusters:createsecondary:\007cluste" - + "r\022\305\001\n\rListInstances\0221.google.cloud.alloy" - + "db.v1beta.ListInstancesRequest\0322.google." - + "cloud.alloydb.v1beta.ListInstancesRespon" - + "se\"M\332A\006parent\202\323\344\223\002>\022" - + "\022\022\022**" - + "\332A\004name\202\323\344\223\0021\022//v1beta/{name=projects/*/" - + "locations/*/backups/*}\022\330\001\n\014CreateBackup\022" - + "0.google.cloud.alloydb.v1beta.CreateBack" - + "upRequest\032\035.google.longrunning.Operation" - + "\"w\312A\033\n\006Backup\022\021OperationMetadata\332A\027paren" - + "t,backup,backup_id\202\323\344\223\0029\"//v1beta/{paren" - + "t=projects/*/locations/*}/backups:\006backu" - + "p\022\332\001\n\014UpdateBackup\0220.google.cloud.alloyd" - + "b.v1beta.UpdateBackupRequest\032\035.google.lo" - + "ngrunning.Operation\"y\312A\033\n\006Backup\022\021Operat" - + "ionMetadata\332A\022backup,update_mask\202\323\344\223\002@26" - + "/v1beta/{backup.name=projects/*/location" - + "s/*/backups/*}:\006backup\022\314\001\n\014DeleteBackup\022" - + "0.google.cloud.alloydb.v1beta.DeleteBack" - + "upRequest\032\035.google.longrunning.Operation" - + "\"k\312A*\n\025google.protobuf.Empty\022\021OperationM" - + "etadata\332A\004name\202\323\344\223\0021*//v1beta/{name=proj" - + "ects/*/locations/*/backups/*}\022\356\001\n\032ListSu" - + "pportedDatabaseFlags\022>.google.cloud.allo" - + "ydb.v1beta.ListSupportedDatabaseFlagsReq" - + "uest\032?.google.cloud.alloydb.v1beta.ListS" - + "upportedDatabaseFlagsResponse\"O\332A\006parent" - + "\202\323\344\223\002@\022>/v1beta/{parent=projects/*/locat" - + "ions/*}/supportedDatabaseFlags\022\374\001\n\031Gener" - + "ateClientCertificate\022=.google.cloud.allo" - + "ydb.v1beta.GenerateClientCertificateRequ" - + "est\032>.google.cloud.alloydb.v1beta.Genera" - + "teClientCertificateResponse\"`\332A\006parent\202\323" - + "\344\223\002Q\"L/v1beta/{parent=projects/*/locatio" - + "ns/*/clusters/*}:generateClientCertifica" - + "te:\001*\022\327\001\n\021GetConnectionInfo\0225.google.clo" - + "ud.alloydb.v1beta.GetConnectionInfoReque" - + "st\032+.google.cloud.alloydb.v1beta.Connect" - + "ionInfo\"^\332A\006parent\202\323\344\223\002O\022M/v1beta/{paren" - + "t=projects/*/locations/*/clusters/*/inst" - + "ances/*}/connectionInfo\022\265\001\n\tListUsers\022-." - + "google.cloud.alloydb.v1beta.ListUsersReq" - + "uest\032..google.cloud.alloydb.v1beta.ListU" - + "sersResponse\"I\332A\006parent\202\323\344\223\002:\0228/v1beta/{" - + "parent=projects/*/locations/*/clusters/*" - + "}/users\022\242\001\n\007GetUser\022+.google.cloud.alloy" - + "db.v1beta.GetUserRequest\032!.google.cloud." - + "alloydb.v1beta.User\"G\332A\004name\202\323\344\223\002:\0228/v1b" - + "eta/{name=projects/*/locations/*/cluster" - + "s/*/users/*}\022\275\001\n\nCreateUser\022..google.clo" - + "ud.alloydb.v1beta.CreateUserRequest\032!.go" - + "ogle.cloud.alloydb.v1beta.User\"\\\332A\023paren" - + "t,user,user_id\202\323\344\223\002@\"8/v1beta/{parent=pr" - + "ojects/*/locations/*/clusters/*}/users:\004" - + "user\022\277\001\n\nUpdateUser\022..google.cloud.alloy" - + "db.v1beta.UpdateUserRequest\032!.google.clo" - + "ud.alloydb.v1beta.User\"^\332A\020user,update_m" - + "ask\202\323\344\223\002E2=/v1beta/{user.name=projects/*" - + "/locations/*/clusters/*/users/*}:\004user\022\235" - + "\001\n\nDeleteUser\022..google.cloud.alloydb.v1b" - + "eta.DeleteUserRequest\032\026.google.protobuf." - + "Empty\"G\332A\004name\202\323\344\223\002:*8/v1beta/{name=proj" - + "ects/*/locations/*/clusters/*/users/*}\032J" - + "\312A\026alloydb.googleapis.com\322A.https://www." - + "googleapis.com/auth/cloud-platformB\311\001\n\037c" - + "om.google.cloud.alloydb.v1betaB\014ServiceP" - + "rotoP\001Z9cloud.google.com/go/alloydb/apiv" - + "1beta/alloydbpb;alloydbpb\252\002\033Google.Cloud" - + ".AlloyDb.V1Beta\312\002\033Google\\Cloud\\AlloyDb\\V" - + "1beta\352\002\036Google::Cloud::AlloyDB::V1betab\006" - + "proto3" + + "tion\"w\312A\035\n\010Instance\022\021OperationMetadata\332A" + + "\004name\202\323\344\223\002J\"E/v1beta/{name=projects/*/lo" + + "cations/*/clusters/*/instances/*}:failov" + + "er:\001*\022\345\001\n\013InjectFault\022/.google.cloud.all" + + "oydb.v1beta.InjectFaultRequest\032\035.google." + + "longrunning.Operation\"\205\001\312A\035\n\010Instance\022\021O" + + "perationMetadata\332A\017fault_type,name\202\323\344\223\002M" + + "\"H/v1beta/{name=projects/*/locations/*/c" + + "lusters/*/instances/*}:injectFault:\001*\022\335\001" + + "\n\017RestartInstance\0223.google.cloud.alloydb" + + ".v1beta.RestartInstanceRequest\032\035.google." + + "longrunning.Operation\"v\312A\035\n\010Instance\022\021Op" + + "erationMetadata\332A\004name\202\323\344\223\002I\"D/v1beta/{n" + + "ame=projects/*/locations/*/clusters/*/in" + + "stances/*}:restart:\001*\022\262\001\n\013ListBackups\022/." + + "google.cloud.alloydb.v1beta.ListBackupsR" + + "equest\0320.google.cloud.alloydb.v1beta.Lis" + + "tBackupsResponse\"@\332A\006parent\202\323\344\223\0021\022//v1be" + + "ta/{parent=projects/*/locations/*}/backu" + + "ps\022\237\001\n\tGetBackup\022-.google.cloud.alloydb." + + "v1beta.GetBackupRequest\032#.google.cloud.a" + + "lloydb.v1beta.Backup\">\332A\004name\202\323\344\223\0021\022//v1" + + "beta/{name=projects/*/locations/*/backup" + + "s/*}\022\330\001\n\014CreateBackup\0220.google.cloud.all" + + "oydb.v1beta.CreateBackupRequest\032\035.google" + + ".longrunning.Operation\"w\312A\033\n\006Backup\022\021Ope" + + "rationMetadata\332A\027parent,backup,backup_id" + + "\202\323\344\223\0029\"//v1beta/{parent=projects/*/locat" + + "ions/*}/backups:\006backup\022\332\001\n\014UpdateBackup" + + "\0220.google.cloud.alloydb.v1beta.UpdateBac" + + "kupRequest\032\035.google.longrunning.Operatio" + + "n\"y\312A\033\n\006Backup\022\021OperationMetadata\332A\022back" + + "up,update_mask\202\323\344\223\002@26/v1beta/{backup.na" + + "me=projects/*/locations/*/backups/*}:\006ba" + + "ckup\022\314\001\n\014DeleteBackup\0220.google.cloud.all" + + "oydb.v1beta.DeleteBackupRequest\032\035.google" + + ".longrunning.Operation\"k\312A*\n\025google.prot" + + "obuf.Empty\022\021OperationMetadata\332A\004name\202\323\344\223" + + "\0021*//v1beta/{name=projects/*/locations/*" + + "/backups/*}\022\356\001\n\032ListSupportedDatabaseFla" + + "gs\022>.google.cloud.alloydb.v1beta.ListSup" + + "portedDatabaseFlagsRequest\032?.google.clou" + + "d.alloydb.v1beta.ListSupportedDatabaseFl" + + "agsResponse\"O\332A\006parent\202\323\344\223\002@\022>/v1beta/{p" + + "arent=projects/*/locations/*}/supportedD" + + "atabaseFlags\022\374\001\n\031GenerateClientCertifica" + + "te\022=.google.cloud.alloydb.v1beta.Generat" + + "eClientCertificateRequest\032>.google.cloud" + + ".alloydb.v1beta.GenerateClientCertificat" + + "eResponse\"`\332A\006parent\202\323\344\223\002Q\"L/v1beta/{par" + + "ent=projects/*/locations/*/clusters/*}:g" + + "enerateClientCertificate:\001*\022\327\001\n\021GetConne" + + "ctionInfo\0225.google.cloud.alloydb.v1beta." + + "GetConnectionInfoRequest\032+.google.cloud." + + "alloydb.v1beta.ConnectionInfo\"^\332A\006parent" + + "\202\323\344\223\002O\022M/v1beta/{parent=projects/*/locat" + + "ions/*/clusters/*/instances/*}/connectio" + + "nInfo\022\265\001\n\tListUsers\022-.google.cloud.alloy" + + "db.v1beta.ListUsersRequest\032..google.clou" + + "d.alloydb.v1beta.ListUsersResponse\"I\332A\006p" + + "arent\202\323\344\223\002:\0228/v1beta/{parent=projects/*/" + + "locations/*/clusters/*}/users\022\242\001\n\007GetUse" + + "r\022+.google.cloud.alloydb.v1beta.GetUserR" + + "equest\032!.google.cloud.alloydb.v1beta.Use" + + "r\"G\332A\004name\202\323\344\223\002:\0228/v1beta/{name=projects" + + "/*/locations/*/clusters/*/users/*}\022\275\001\n\nC" + + "reateUser\022..google.cloud.alloydb.v1beta." + + "CreateUserRequest\032!.google.cloud.alloydb" + + ".v1beta.User\"\\\332A\023parent,user,user_id\202\323\344\223" + + "\002@\"8/v1beta/{parent=projects/*/locations" + + "/*/clusters/*}/users:\004user\022\277\001\n\nUpdateUse" + + "r\022..google.cloud.alloydb.v1beta.UpdateUs" + + "erRequest\032!.google.cloud.alloydb.v1beta." + + "User\"^\332A\020user,update_mask\202\323\344\223\002E2=/v1beta" + + "/{user.name=projects/*/locations/*/clust" + + "ers/*/users/*}:\004user\022\235\001\n\nDeleteUser\022..go" + + "ogle.cloud.alloydb.v1beta.DeleteUserRequ" + + "est\032\026.google.protobuf.Empty\"G\332A\004name\202\323\344\223" + + "\002:*8/v1beta/{name=projects/*/locations/*" + + "/clusters/*/users/*}\022\305\001\n\rListDatabases\0221" + + ".google.cloud.alloydb.v1beta.ListDatabas" + + "esRequest\0322.google.cloud.alloydb.v1beta." + + "ListDatabasesResponse\"M\332A\006parent\202\323\344\223\002>\022<" + + "/v1beta/{parent=projects/*/locations/*/c" + + "lusters/*}/databases\032J\312A\026alloydb.googlea" + + "pis.com\322A.https://www.googleapis.com/aut" + + "h/cloud-platformB\311\001\n\037com.google.cloud.al" + + "loydb.v1betaB\014ServiceProtoP\001Z9cloud.goog" + + "le.com/go/alloydb/apiv1beta/alloydbpb;al" + + "loydbpb\252\002\033Google.Cloud.AlloyDb.V1Beta\312\002\033" + + "Google\\Cloud\\AlloyDb\\V1beta\352\002\036Google::Cl" + + "oud::AlloyDB::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -962,6 +981,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "RequestId", "ValidateOnly", }); + internal_static_google_cloud_alloydb_v1beta_ListDatabasesRequest_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_cloud_alloydb_v1beta_ListDatabasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1beta_ListDatabasesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_alloydb_v1beta_ListDatabasesResponse_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_google_cloud_alloydb_v1beta_ListDatabasesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1beta_ListDatabasesResponse_descriptor, + new java.lang.String[] { + "Databases", "NextPageToken", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/proto/google/cloud/alloydb/v1beta/resources.proto b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/proto/google/cloud/alloydb/v1beta/resources.proto index bbcfd96d33a6..59e443ff5ca9 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/proto/google/cloud/alloydb/v1beta/resources.proto +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/proto/google/cloud/alloydb/v1beta/resources.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.alloydb.v1beta; import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -386,14 +387,14 @@ message Cluster { // Metadata related to network configuration. message NetworkConfig { - // Required. The resource link for the VPC network in which cluster + // Optional. The resource link for the VPC network in which cluster // resources are created and from which they are accessible via Private IP. // The network must belong to the same project as the cluster. It is // specified in the form: // "projects/{project_number}/global/networks/{network_id}". This is // required to create a cluster. string network = 1 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } @@ -404,8 +405,8 @@ message Cluster { // instance IPs for this cluster will be created in the allocated range. The // range name must comply with RFC 1035. Specifically, the name must be 1-63 // characters long and match the regular expression - // [a-z]([-a-z0-9]*[a-z0-9])?. - // Field name is intended to be consistent with CloudSQL. + // `[a-z]([-a-z0-9]*[a-z0-9])?`. + // Field name is intended to be consistent with Cloud SQL. string allocated_ip_range = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -606,6 +607,9 @@ message Cluster { // Output only. Cross Region replication config specific to PRIMARY cluster. PrimaryConfig primary_config = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzs = 30 [(google.api.field_behavior) = OUTPUT_ONLY]; } // An Instance is a computing unit that an end customer can connect to. @@ -698,6 +702,79 @@ message Instance { SslConfig ssl_config = 2 [(google.api.field_behavior) = OPTIONAL]; } + // Configuration for setting up a PSC interface. This information needs to be + // provided by the customer. + // PSC interfaces will be created and added to VMs via SLM (adding a network + // interface will require recreating the VM). For HA instances this will be + // done via LDTM. + message PscInterfaceConfig { + // A list of endpoints in the consumer VPC the interface might initiate + // outbound connections to. This list has to be provided when the PSC + // interface is created. + repeated string consumer_endpoint_ips = 1; + + // The NetworkAttachment resource created in the consumer VPC to which the + // PSC interface will be linked, in the form of: + // `projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}`. + // NetworkAttachment has to be provided when the PSC interface is created. + string network_attachment = 2; + } + + // PscInstanceConfig contains PSC related configuration at an + // instance level. + message PscInstanceConfig { + // Output only. The service attachment created when Private + // Service Connect (PSC) is enabled for the instance. + // The name of the resource will be in the format of + // `projects//regions//serviceAttachments/` + string service_attachment_link = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. List of consumer projects that are allowed to create + // PSC endpoints to service-attachments to this instance. + repeated string allowed_consumer_projects = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of consumer networks that are allowed to create + // PSC endpoints to service-attachments to this instance. + repeated string allowed_consumer_networks = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configurations for setting up PSC interfaces attached to the + // instance which are used for outbound connectivity. Only primary instances + // can have PSC interface attached. All the VMs created for the primary + // instance will share the same configurations. Currently we only support 0 + // or 1 PSC interface. + repeated PscInterfaceConfig psc_interface_configs = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of service attachments that this instance has created + // endpoints to connect with. Currently, only a single outgoing service + // attachment is supported per instance. + repeated string outgoing_service_attachment_links = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether PSC connectivity is enabled for this instance. + // This is populated by referencing the value from the parent cluster. + bool psc_enabled = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Metadata related to instance level network configuration. + message InstanceNetworkConfig { + // AuthorizedNetwork contains metadata for an authorized network. + message AuthorizedNetwork { + // CIDR range for one authorzied network of the instance. + string cidr_range = 1 [(google.api.field_info).format = IPV4]; + } + + // Optional. A list of external network authorized to access this instance. + repeated AuthorizedNetwork authorized_external_networks = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Enabling public ip for the instance. + bool enable_public_ip = 2 [(google.api.field_behavior) = OPTIONAL]; + } + // Instance State enum State { // The state of the instance is unknown. @@ -857,13 +934,19 @@ message Instance { // Configuration for query insights. QueryInsightsInstanceConfig query_insights_config = 21; - // Read pool specific config. + // Read pool instance configuration. + // This is required if the value of instanceType is READ_POOL. ReadPoolConfig read_pool_config = 14; // Output only. The IP address for the Instance. // This is the connection endpoint for an end-user application. string ip_address = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The public IP addresses for the Instance. This is available + // ONLY when enable_public_ip is set. This is the connection endpoint for an + // end-user application. + string public_ip_address = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Reconciling (https://google.aip.dev/128#reconciliation). // Set to true if the current state of Instance does not match the user's // intended state, and the service is actively updating the resource to @@ -888,6 +971,18 @@ message Instance { // Optional. Client connection specific configurations ClientConnectionConfig client_connection_config = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Reserved for future use. + bool satisfies_pzs = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The configuration for Private Service Connect (PSC) for the + // instance. + PscInstanceConfig psc_instance_config = 28 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Instance level network configuration. + InstanceNetworkConfig network_config = 29 + [(google.api.field_behavior) = OPTIONAL]; } // ConnectionInfo singleton resource. @@ -908,6 +1003,14 @@ message ConnectionInfo { // is set). This is the connection endpoint for an end-user application. string ip_address = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The public IP addresses for the Instance. This is available + // ONLY when enable_public_ip is set. This is the connection endpoint for an + // end-user application. + string public_ip_address = 5 [ + (google.api.field_info).format = IPV4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + // Output only. The pem-encoded chain that may be used to verify the X.509 // certificate. Expected to be in issuer-to-root order according to RFC 5246. repeated string pem_certificate_chain = 3 @@ -915,6 +1018,9 @@ message ConnectionInfo { // Output only. The unique ID of the Instance. string instance_uid = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The DNS name to use with PSC for the Instance. + string psc_dns_name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Message describing Backup object @@ -1077,6 +1183,9 @@ message Backup { QuantityBasedExpiry expiry_quantity = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Reserved for future use. + bool satisfies_pzs = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The database engine major version of the cluster this backup // was created from. Any restored cluster created from this backup will have // the same database version. @@ -1200,3 +1309,28 @@ message User { // Optional. Type of this user. UserType user_type = 5 [(google.api.field_behavior) = OPTIONAL]; } + +// Message describing Database object. +message Database { + option (google.api.resource) = { + type: "alloydb.googleapis.com/Database" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}" + plural: "databases" + singular: "database" + style: DECLARATIVE_FRIENDLY + }; + + // Identifier. Name of the resource in the form of + // `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Charset for the database. + // This field can contain any PostgreSQL supported charset name. + // Example values include "UTF8", "SQL_ASCII", etc. + string charset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Collation for the database. + // Name of the custom or native collation for postgres. + // Example values include "C", "POSIX", etc + string collation = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/proto/google/cloud/alloydb/v1beta/service.proto b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/proto/google/cloud/alloydb/v1beta/service.proto index df23a56f11f8..b8c6c660ac56 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/proto/google/cloud/alloydb/v1beta/service.proto +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/src/main/proto/google/cloud/alloydb/v1beta/service.proto @@ -410,6 +410,14 @@ service AlloyDBAdmin { }; option (google.api.method_signature) = "name"; } + + // Lists Databases in a given project and location. + rpc ListDatabases(ListDatabasesRequest) returns (ListDatabasesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/clusters/*}/databases" + }; + option (google.api.method_signature) = "parent"; + } } // Message for requesting list of Clusters @@ -1348,7 +1356,8 @@ message GenerateClientCertificateRequest { // not supported (00000000-0000-0000-0000-000000000000). string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pem-encoded X.509 certificate signing request (CSR). + // Optional. A pem-encoded X.509 certificate signing request (CSR). It is + // recommended to use public_key instead. string pem_csr = 3 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; @@ -1372,7 +1381,8 @@ message GenerateClientCertificateRequest { // Message returned by a GenerateClientCertificate operation. message GenerateClientCertificateResponse { // Output only. The pem-encoded, signed X.509 certificate. - string pem_certificate = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string pem_certificate = 1 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The pem-encoded chain that may be used to verify the X.509 // certificate. Expected to be in issuer-to-root order according to RFC 5246. @@ -1593,3 +1603,39 @@ message DeleteUserRequest { // execute it. bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } + +// Message for requesting list of Databases. +message ListDatabasesRequest { + // Required. Parent value for ListDatabasesRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "alloydb.googleapis.com/Database" + } + ]; + + // Optional. The maximum number of databases to return. The service may return + // fewer than this value. If unspecified, an appropriate number of databases + // will be returned. The max value will be 2000, values above max will be + // coerced to max. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDatabases` call. + // This should be provided to retrieve the subsequent page. + // This field is currently not supported, its value will be ignored if passed. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + // This field is currently not supported, its value will be ignored if passed. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Databases. +message ListDatabasesResponse { + // The list of databases + repeated Database databases = 1; + + // A token identifying the next page of results the server should return. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/AsyncListDatabases.java b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/AsyncListDatabases.java new file mode 100644 index 000000000000..ac0a726817df --- /dev/null +++ b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/AsyncListDatabases.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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.alloydb.v1beta.samples; + +// [START alloydb_v1beta_generated_AlloyDBAdmin_ListDatabases_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.alloydb.v1beta.AlloyDBAdminClient; +import com.google.cloud.alloydb.v1beta.ClusterName; +import com.google.cloud.alloydb.v1beta.Database; +import com.google.cloud.alloydb.v1beta.ListDatabasesRequest; + +public class AsyncListDatabases { + + public static void main(String[] args) throws Exception { + asyncListDatabases(); + } + + public static void asyncListDatabases() 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 (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) { + ListDatabasesRequest request = + ListDatabasesRequest.newBuilder() + .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + alloyDBAdminClient.listDatabasesPagedCallable().futureCall(request); + // Do something. + for (Database element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END alloydb_v1beta_generated_AlloyDBAdmin_ListDatabases_async] diff --git a/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/AsyncListDatabasesPaged.java b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/AsyncListDatabasesPaged.java new file mode 100644 index 000000000000..e34ba5478574 --- /dev/null +++ b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/AsyncListDatabasesPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2024 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.alloydb.v1beta.samples; + +// [START alloydb_v1beta_generated_AlloyDBAdmin_ListDatabases_Paged_async] +import com.google.cloud.alloydb.v1beta.AlloyDBAdminClient; +import com.google.cloud.alloydb.v1beta.ClusterName; +import com.google.cloud.alloydb.v1beta.Database; +import com.google.cloud.alloydb.v1beta.ListDatabasesRequest; +import com.google.cloud.alloydb.v1beta.ListDatabasesResponse; +import com.google.common.base.Strings; + +public class AsyncListDatabasesPaged { + + public static void main(String[] args) throws Exception { + asyncListDatabasesPaged(); + } + + public static void asyncListDatabasesPaged() 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 (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) { + ListDatabasesRequest request = + ListDatabasesRequest.newBuilder() + .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListDatabasesResponse response = alloyDBAdminClient.listDatabasesCallable().call(request); + for (Database element : response.getDatabasesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END alloydb_v1beta_generated_AlloyDBAdmin_ListDatabases_Paged_async] diff --git a/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/SyncListDatabases.java b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/SyncListDatabases.java new file mode 100644 index 000000000000..f6dfa83e7160 --- /dev/null +++ b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/SyncListDatabases.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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.alloydb.v1beta.samples; + +// [START alloydb_v1beta_generated_AlloyDBAdmin_ListDatabases_sync] +import com.google.cloud.alloydb.v1beta.AlloyDBAdminClient; +import com.google.cloud.alloydb.v1beta.ClusterName; +import com.google.cloud.alloydb.v1beta.Database; +import com.google.cloud.alloydb.v1beta.ListDatabasesRequest; + +public class SyncListDatabases { + + public static void main(String[] args) throws Exception { + syncListDatabases(); + } + + public static void syncListDatabases() 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 (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) { + ListDatabasesRequest request = + ListDatabasesRequest.newBuilder() + .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (Database element : alloyDBAdminClient.listDatabases(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END alloydb_v1beta_generated_AlloyDBAdmin_ListDatabases_sync] diff --git a/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/SyncListDatabasesClustername.java b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/SyncListDatabasesClustername.java new file mode 100644 index 000000000000..b84560f6f116 --- /dev/null +++ b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/SyncListDatabasesClustername.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.alloydb.v1beta.samples; + +// [START alloydb_v1beta_generated_AlloyDBAdmin_ListDatabases_Clustername_sync] +import com.google.cloud.alloydb.v1beta.AlloyDBAdminClient; +import com.google.cloud.alloydb.v1beta.ClusterName; +import com.google.cloud.alloydb.v1beta.Database; + +public class SyncListDatabasesClustername { + + public static void main(String[] args) throws Exception { + syncListDatabasesClustername(); + } + + public static void syncListDatabasesClustername() 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 (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + for (Database element : alloyDBAdminClient.listDatabases(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END alloydb_v1beta_generated_AlloyDBAdmin_ListDatabases_Clustername_sync] diff --git a/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/SyncListDatabasesString.java b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/SyncListDatabasesString.java new file mode 100644 index 000000000000..1351e96dc8a8 --- /dev/null +++ b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1beta/alloydbadmin/listdatabases/SyncListDatabasesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.alloydb.v1beta.samples; + +// [START alloydb_v1beta_generated_AlloyDBAdmin_ListDatabases_String_sync] +import com.google.cloud.alloydb.v1beta.AlloyDBAdminClient; +import com.google.cloud.alloydb.v1beta.ClusterName; +import com.google.cloud.alloydb.v1beta.Database; + +public class SyncListDatabasesString { + + public static void main(String[] args) throws Exception { + syncListDatabasesString(); + } + + public static void syncListDatabasesString() 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 (AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.create()) { + String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); + for (Database element : alloyDBAdminClient.listDatabases(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END alloydb_v1beta_generated_AlloyDBAdmin_ListDatabases_String_sync]