diff --git a/java-alloydb/README.md b/java-alloydb/README.md index d509d334c2bd..9c56414871c9 100644 --- a/java-alloydb/README.md +++ b/java-alloydb/README.md @@ -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.19.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb/0.21.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/v1alpha/AlloyDBAdminClient.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClient.java index d9c964bea42c..8d649e867afe 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClient.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClient.java @@ -4657,6 +4657,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. @@ -5227,6 +5392,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/v1alpha/AlloyDBAdminSettings.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminSettings.java index e648ff619596..2d4d7747629b 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminSettings.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminSettings.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1alpha.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() { @@ -760,6 +767,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/v1alpha/gapic_metadata.json b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/gapic_metadata.json index cbe0952c01e8..b452eed9970d 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/gapic_metadata.json +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/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/v1alpha/stub/AlloyDBAdminStub.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/AlloyDBAdminStub.java index af9e9fbe5c5e..d96e8ca40385 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/AlloyDBAdminStub.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/AlloyDBAdminStub.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -56,6 +57,8 @@ import com.google.cloud.alloydb.v1alpha.ListBackupsResponse; import com.google.cloud.alloydb.v1alpha.ListClustersRequest; import com.google.cloud.alloydb.v1alpha.ListClustersResponse; +import com.google.cloud.alloydb.v1alpha.ListDatabasesRequest; +import com.google.cloud.alloydb.v1alpha.ListDatabasesResponse; import com.google.cloud.alloydb.v1alpha.ListInstancesRequest; import com.google.cloud.alloydb.v1alpha.ListInstancesResponse; import com.google.cloud.alloydb.v1alpha.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/v1alpha/stub/AlloyDBAdminStubSettings.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/AlloyDBAdminStubSettings.java index 9aa857024625..f6fd3e8c2d78 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/AlloyDBAdminStubSettings.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/AlloyDBAdminStubSettings.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -63,6 +64,7 @@ import com.google.cloud.alloydb.v1alpha.CreateSecondaryClusterRequest; import com.google.cloud.alloydb.v1alpha.CreateSecondaryInstanceRequest; import com.google.cloud.alloydb.v1alpha.CreateUserRequest; +import com.google.cloud.alloydb.v1alpha.Database; import com.google.cloud.alloydb.v1alpha.DeleteBackupRequest; import com.google.cloud.alloydb.v1alpha.DeleteClusterRequest; import com.google.cloud.alloydb.v1alpha.DeleteInstanceRequest; @@ -81,6 +83,8 @@ import com.google.cloud.alloydb.v1alpha.ListBackupsResponse; import com.google.cloud.alloydb.v1alpha.ListClustersRequest; import com.google.cloud.alloydb.v1alpha.ListClustersResponse; +import com.google.cloud.alloydb.v1alpha.ListDatabasesRequest; +import com.google.cloud.alloydb.v1alpha.ListDatabasesResponse; import com.google.cloud.alloydb.v1alpha.ListInstancesRequest; import com.google.cloud.alloydb.v1alpha.ListInstancesResponse; import com.google.cloud.alloydb.v1alpha.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() { @@ -1023,6 +1089,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(); } @@ -1124,6 +1191,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; @@ -1225,6 +1295,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(); @@ -1261,6 +1332,7 @@ protected Builder(ClientContext clientContext) { createUserSettings, updateUserSettings, deleteUserSettings, + listDatabasesSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -1320,6 +1392,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(); @@ -1356,6 +1429,7 @@ protected Builder(AlloyDBAdminStubSettings settings) { createUserSettings, updateUserSettings, deleteUserSettings, + listDatabasesSettings, listLocationsSettings, getLocationSettings); } @@ -1542,6 +1616,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")) @@ -2289,6 +2368,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/v1alpha/stub/GrpcAlloyDBAdminStub.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/GrpcAlloyDBAdminStub.java index 98c25f9487ae..29ece46fbb16 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/GrpcAlloyDBAdminStub.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/GrpcAlloyDBAdminStub.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -61,6 +62,8 @@ import com.google.cloud.alloydb.v1alpha.ListBackupsResponse; import com.google.cloud.alloydb.v1alpha.ListClustersRequest; import com.google.cloud.alloydb.v1alpha.ListClustersResponse; +import com.google.cloud.alloydb.v1alpha.ListDatabasesRequest; +import com.google.cloud.alloydb.v1alpha.ListDatabasesResponse; import com.google.cloud.alloydb.v1alpha.ListInstancesRequest; import com.google.cloud.alloydb.v1alpha.ListInstancesResponse; import com.google.cloud.alloydb.v1alpha.ListSupportedDatabaseFlagsRequest; @@ -398,6 +401,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.v1alpha.AlloyDBAdmin/ListDatabases") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDatabasesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDatabasesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -497,6 +511,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; @@ -860,6 +877,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) @@ -1105,6 +1132,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); @@ -1411,6 +1444,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/v1alpha/stub/HttpJsonAlloyDBAdminStub.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/HttpJsonAlloyDBAdminStub.java index efb59a833775..caed0d92bd24 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/HttpJsonAlloyDBAdminStub.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/stub/HttpJsonAlloyDBAdminStub.java @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -69,6 +70,8 @@ import com.google.cloud.alloydb.v1alpha.ListBackupsResponse; import com.google.cloud.alloydb.v1alpha.ListClustersRequest; import com.google.cloud.alloydb.v1alpha.ListClustersResponse; +import com.google.cloud.alloydb.v1alpha.ListDatabasesRequest; +import com.google.cloud.alloydb.v1alpha.ListDatabasesResponse; import com.google.cloud.alloydb.v1alpha.ListInstancesRequest; import com.google.cloud.alloydb.v1alpha.ListInstancesResponse; import com.google.cloud.alloydb.v1alpha.ListSupportedDatabaseFlagsRequest; @@ -1359,6 +1362,43 @@ public class HttpJsonAlloyDBAdminStub extends AlloyDBAdminStub { .build()) .build(); + private static final ApiMethodDescriptor + listDatabasesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.alloydb.v1alpha.AlloyDBAdmin/ListDatabases") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{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() @@ -1507,6 +1547,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; @@ -1932,6 +1975,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() @@ -2180,6 +2235,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); @@ -2228,6 +2289,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; @@ -2525,6 +2587,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.v1alpha/reflect-config.json b/java-alloydb/google-cloud-alloydb/src/main/resources/META-INF/native-image/com.google.cloud.alloydb.v1alpha/reflect-config.json index 1c6cdf2a0f37..984928270a07 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/resources/META-INF/native-image/com.google.cloud.alloydb.v1alpha/reflect-config.json +++ b/java-alloydb/google-cloud-alloydb/src/main/resources/META-INF/native-image/com.google.cloud.alloydb.v1alpha/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, @@ -665,6 +692,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.alloydb.v1alpha.Cluster$PscConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1alpha.Cluster$PscConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.alloydb.v1alpha.Cluster$SecondaryConfig", "queryAllDeclaredConstructors": true, @@ -899,6 +944,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.alloydb.v1alpha.Database", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1alpha.Database$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.alloydb.v1alpha.DatabaseVersion", "queryAllDeclaredConstructors": true, @@ -1241,6 +1304,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.alloydb.v1alpha.Instance$InstanceNetworkConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1alpha.Instance$InstanceNetworkConfig$AuthorizedNetwork", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1alpha.Instance$InstanceNetworkConfig$AuthorizedNetwork$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1alpha.Instance$InstanceNetworkConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.alloydb.v1alpha.Instance$InstanceType", "queryAllDeclaredConstructors": true, @@ -1286,6 +1385,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.alloydb.v1alpha.Instance$PscInstanceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1alpha.Instance$PscInstanceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1alpha.Instance$PscInterfaceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1alpha.Instance$PscInterfaceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.alloydb.v1alpha.Instance$QueryInsightsInstanceConfig", "queryAllDeclaredConstructors": true, @@ -1439,6 +1574,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.alloydb.v1alpha.ListDatabasesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1alpha.ListDatabasesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1alpha.ListDatabasesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.alloydb.v1alpha.ListDatabasesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.alloydb.v1alpha.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 47ddf0d9556b..e18da8c20b65 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 @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -218,7 +219,9 @@ public void getClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -284,7 +287,9 @@ public void getClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -350,7 +355,9 @@ public void createClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -425,7 +432,9 @@ public void createClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -500,7 +509,9 @@ public void updateClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -534,7 +545,9 @@ public void updateClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -588,7 +601,9 @@ public void updateClusterExceptionTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateClusterAsync(cluster, updateMask).get(); @@ -713,7 +728,9 @@ public void promoteClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -784,7 +801,9 @@ public void promoteClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -855,7 +874,9 @@ public void restoreClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -940,7 +961,9 @@ public void createSecondaryClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1015,7 +1038,9 @@ public void createSecondaryClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1189,7 +1214,10 @@ public void getInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1254,7 +1282,10 @@ public void getInstanceTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1321,7 +1352,10 @@ public void createInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1395,7 +1429,10 @@ public void createInstanceTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1469,7 +1506,10 @@ public void createSecondaryInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1544,7 +1584,10 @@ public void createSecondaryInstanceTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1678,7 +1721,10 @@ public void updateInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1711,7 +1757,10 @@ public void updateInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1764,7 +1813,10 @@ public void updateInstanceExceptionTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateInstanceAsync(instance, updateMask).get(); @@ -1890,7 +1942,10 @@ public void failoverInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1960,7 +2015,10 @@ public void failoverInstanceTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2032,7 +2090,10 @@ public void injectFaultTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2104,7 +2165,10 @@ public void injectFaultTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2178,7 +2242,10 @@ public void restartInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2248,7 +2315,10 @@ public void restartInstanceTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2417,6 +2487,7 @@ public void getBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -2480,6 +2551,7 @@ public void getBackupTest2() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -2543,6 +2615,7 @@ public void createBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -2615,6 +2688,7 @@ public void createBackupTest2() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -2687,6 +2761,7 @@ public void updateBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -2718,6 +2793,7 @@ public void updateBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -2769,6 +2845,7 @@ public void updateBackupExceptionTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -3069,6 +3146,7 @@ public void getConnectionInfoTest() throws Exception { ConnectionInfo.newBuilder() .setName("name3373707") .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") .build(); @@ -3116,6 +3194,7 @@ public void getConnectionInfoTest2() throws Exception { ConnectionInfo.newBuilder() .setName("name3373707") .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") .build(); @@ -3593,6 +3672,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/v1alpha/AlloyDBAdminClientTest.java b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClientTest.java index 45634f9806a7..ffb5b6a34e90 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 @@ -18,6 +18,7 @@ import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListBackupsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListClustersPagedResponse; +import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListDatabasesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListInstancesPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListLocationsPagedResponse; import static com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient.ListSupportedDatabaseFlagsPagedResponse; @@ -215,7 +216,9 @@ public void getClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -275,7 +278,9 @@ public void getClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -335,7 +340,9 @@ public void createClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -409,7 +416,9 @@ public void createClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -483,7 +492,9 @@ public void updateClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -638,7 +649,9 @@ public void promoteClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -706,7 +719,9 @@ public void promoteClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -774,7 +789,9 @@ public void restoreClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -863,7 +880,9 @@ public void createSecondaryClusterTest() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -938,7 +957,9 @@ public void createSecondaryClusterTest2() throws Exception { .setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build()) .setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build()) .setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscConfig(Cluster.PscConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1100,7 +1121,10 @@ public void getInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -1159,7 +1183,10 @@ public void getInstanceTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); mockAlloyDBAdmin.addResponse(expectedResponse); @@ -1218,7 +1245,10 @@ public void createInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1291,7 +1321,10 @@ public void createInstanceTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1364,7 +1397,10 @@ public void createSecondaryInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1439,7 +1475,10 @@ public void createSecondaryInstanceTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1573,7 +1612,10 @@ public void updateInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1727,7 +1769,10 @@ public void failoverInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1794,7 +1839,10 @@ public void failoverInstanceTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1861,7 +1909,10 @@ public void injectFaultTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1931,7 +1982,10 @@ public void injectFaultTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2001,7 +2055,10 @@ public void restartInstanceTest() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2068,7 +2125,10 @@ public void restartInstanceTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build()) .setClientConnectionConfig(Instance.ClientConnectionConfig.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) + .setPscInstanceConfig(Instance.PscInstanceConfig.newBuilder().build()) + .setNetworkConfig(Instance.InstanceNetworkConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2220,6 +2280,7 @@ public void getBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -2277,6 +2338,7 @@ public void getBackupTest2() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -2334,6 +2396,7 @@ public void createBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -2405,6 +2468,7 @@ public void createBackupTest2() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -2476,6 +2540,7 @@ public void updateBackupTest() throws Exception { .setSizeBytes(-1796325715) .setExpiryTime(Timestamp.newBuilder().build()) .setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build()) + .setSatisfiesPzi(true) .setSatisfiesPzs(true) .setDatabaseVersion(DatabaseVersion.forNumber(0)) .build(); @@ -2786,6 +2851,7 @@ public void getConnectionInfoTest() throws Exception { ConnectionInfo.newBuilder() .setName("name3373707") .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") .build(); @@ -2827,6 +2893,7 @@ public void getConnectionInfoTest2() throws Exception { ConnectionInfo.newBuilder() .setName("name3373707") .setIpAddress("ipAddress1634032845") + .setPublicIpAddress("publicIpAddress2055303268") .addAllPemCertificateChain(new ArrayList()) .setInstanceUid("instanceUid-2102004869") .build(); @@ -3233,6 +3300,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/v1alpha/MockAlloyDBAdminImpl.java b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/MockAlloyDBAdminImpl.java index 62811727dae0..41d7fafda0e1 100644 --- a/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/MockAlloyDBAdminImpl.java +++ b/java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/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-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminGrpc.java b/java-alloydb/grpc-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminGrpc.java index b3d01b069145..71b8d0b79193 100644 --- a/java-alloydb/grpc-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminGrpc.java +++ b/java-alloydb/grpc-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminGrpc.java @@ -1425,6 +1425,53 @@ private AlloyDBAdminGrpc() {} return getDeleteUserMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.alloydb.v1alpha.ListDatabasesRequest, + com.google.cloud.alloydb.v1alpha.ListDatabasesResponse> + getListDatabasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDatabases", + requestType = com.google.cloud.alloydb.v1alpha.ListDatabasesRequest.class, + responseType = com.google.cloud.alloydb.v1alpha.ListDatabasesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.alloydb.v1alpha.ListDatabasesRequest, + com.google.cloud.alloydb.v1alpha.ListDatabasesResponse> + getListDatabasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.alloydb.v1alpha.ListDatabasesRequest, + com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.alloydb.v1alpha.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 = @@ -1933,6 +1980,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.v1alpha.ListDatabasesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDatabasesMethod(), responseObserver); + } } /** @@ -2482,6 +2544,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.v1alpha.ListDatabasesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDatabasesMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -2930,6 +3009,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.v1alpha.ListDatabasesResponse listDatabases( + com.google.cloud.alloydb.v1alpha.ListDatabasesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDatabasesMethod(), getCallOptions(), request); + } } /** @@ -3390,6 +3482,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.v1alpha.ListDatabasesResponse> + listDatabases(com.google.cloud.alloydb.v1alpha.ListDatabasesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDatabasesMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_CLUSTERS = 0; @@ -3423,6 +3529,7 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3611,6 +3718,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.alloydb.v1alpha.DeleteUserRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_DATABASES: + serviceImpl.listDatabases( + (com.google.cloud.alloydb.v1alpha.ListDatabasesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -3822,6 +3935,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.alloydb.v1alpha.DeleteUserRequest, com.google.protobuf.Empty>( service, METHODID_DELETE_USER))) + .addMethod( + getListDatabasesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.alloydb.v1alpha.ListDatabasesRequest, + com.google.cloud.alloydb.v1alpha.ListDatabasesResponse>( + service, METHODID_LIST_DATABASES))) .build(); } @@ -3904,6 +4024,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/Backup.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Backup.java index d19740b09f03..7fc6f4e43be7 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Backup.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Backup.java @@ -2252,16 +2252,34 @@ public com.google.cloud.alloydb.v1alpha.Backup.QuantityBasedExpiry getExpiryQuan : expiryQuantity_; } + public static final int SATISFIES_PZI_FIELD_NUMBER = 23; + private boolean satisfiesPzi_ = false; + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzi = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + public static final int SATISFIES_PZS_FIELD_NUMBER = 21; private boolean satisfiesPzs_ = false; /** * * *
-   * Reserved for future use.
+   * Output only. Reserved for future use.
    * 
* - * bool satisfies_pzs = 21; + * bool satisfies_pzs = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The satisfiesPzs. */ @@ -2393,6 +2411,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(22, databaseVersion_); } + if (satisfiesPzi_ != false) { + output.writeBool(23, satisfiesPzi_); + } getUnknownFields().writeTo(output); } @@ -2484,6 +2505,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, databaseVersion_); } + if (satisfiesPzi_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(23, satisfiesPzi_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2540,6 +2564,7 @@ public boolean equals(final java.lang.Object obj) { if (hasExpiryQuantity()) { if (!getExpiryQuantity().equals(other.getExpiryQuantity())) return false; } + if (getSatisfiesPzi() != other.getSatisfiesPzi()) return false; if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; if (databaseVersion_ != other.databaseVersion_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -2611,6 +2636,8 @@ public int hashCode() { hash = (37 * hash) + EXPIRY_QUANTITY_FIELD_NUMBER; hash = (53 * hash) + getExpiryQuantity().hashCode(); } + hash = (37 * hash) + SATISFIES_PZI_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzi()); hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); hash = (37 * hash) + DATABASE_VERSION_FIELD_NUMBER; @@ -2826,6 +2853,7 @@ public Builder clear() { expiryQuantityBuilder_.dispose(); expiryQuantityBuilder_ = null; } + satisfiesPzi_ = false; satisfiesPzs_ = false; databaseVersion_ = 0; return this; @@ -2930,9 +2958,12 @@ private void buildPartial0(com.google.cloud.alloydb.v1alpha.Backup result) { expiryQuantityBuilder_ == null ? expiryQuantity_ : expiryQuantityBuilder_.build(); } if (((from_bitField0_ & 0x00100000) != 0)) { - result.satisfiesPzs_ = satisfiesPzs_; + result.satisfiesPzi_ = satisfiesPzi_; } if (((from_bitField0_ & 0x00200000) != 0)) { + result.satisfiesPzs_ = satisfiesPzs_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { result.databaseVersion_ = databaseVersion_; } } @@ -3054,6 +3085,9 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.Backup other) { if (other.hasExpiryQuantity()) { mergeExpiryQuantity(other.getExpiryQuantity()); } + if (other.getSatisfiesPzi() != false) { + setSatisfiesPzi(other.getSatisfiesPzi()); + } if (other.getSatisfiesPzs() != false) { setSatisfiesPzs(other.getSatisfiesPzs()); } @@ -3222,15 +3256,21 @@ public Builder mergeFrom( case 168: { satisfiesPzs_ = input.readBool(); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; break; } // case 168 case 176: { databaseVersion_ = input.readEnum(); - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; break; } // case 176 + case 184: + { + satisfiesPzi_ = input.readBool(); + bitField0_ |= 0x00100000; + break; + } // case 184 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6187,15 +6227,68 @@ public Builder clearExpiryQuantity() { return expiryQuantityBuilder_; } + private boolean satisfiesPzi_; + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzi = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzi = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzi to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzi(boolean value) { + + satisfiesPzi_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzi = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzi() { + bitField0_ = (bitField0_ & ~0x00100000); + satisfiesPzi_ = false; + onChanged(); + return this; + } + private boolean satisfiesPzs_; /** * * *
-     * Reserved for future use.
+     * Output only. Reserved for future use.
      * 
* - * bool satisfies_pzs = 21; + * bool satisfies_pzs = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The satisfiesPzs. */ @@ -6207,10 +6300,10 @@ public boolean getSatisfiesPzs() { * * *
-     * Reserved for future use.
+     * Output only. Reserved for future use.
      * 
* - * bool satisfies_pzs = 21; + * bool satisfies_pzs = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The satisfiesPzs to set. * @return This builder for chaining. @@ -6218,7 +6311,7 @@ public boolean getSatisfiesPzs() { public Builder setSatisfiesPzs(boolean value) { satisfiesPzs_ = value; - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -6226,15 +6319,15 @@ public Builder setSatisfiesPzs(boolean value) { * * *
-     * Reserved for future use.
+     * Output only. Reserved for future use.
      * 
* - * bool satisfies_pzs = 21; + * bool satisfies_pzs = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearSatisfiesPzs() { - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); satisfiesPzs_ = false; onChanged(); return this; @@ -6278,7 +6371,7 @@ public int getDatabaseVersionValue() { */ public Builder setDatabaseVersionValue(int value) { databaseVersion_ = value; - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -6325,7 +6418,7 @@ public Builder setDatabaseVersion(com.google.cloud.alloydb.v1alpha.DatabaseVersi if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; databaseVersion_ = value.getNumber(); onChanged(); return this; @@ -6346,7 +6439,7 @@ public Builder setDatabaseVersion(com.google.cloud.alloydb.v1alpha.DatabaseVersi * @return This builder for chaining. */ public Builder clearDatabaseVersion() { - bitField0_ = (bitField0_ & ~0x00200000); + bitField0_ = (bitField0_ & ~0x00400000); databaseVersion_ = 0; onChanged(); return this; diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/BackupOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/BackupOrBuilder.java index c130951879a2..ea7114655c4e 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/BackupOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/BackupOrBuilder.java @@ -733,10 +733,23 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Reserved for future use.
+   * Output only. Reserved for future use.
    * 
* - * bool satisfies_pzs = 21; + * bool satisfies_pzi = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + boolean getSatisfiesPzi(); + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzs = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The satisfiesPzs. */ diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Cluster.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Cluster.java index 740394b81efa..0ace485ba7a8 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Cluster.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Cluster.java @@ -579,7 +579,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:
@@ -588,7 +588,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. @@ -598,7 +598,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:
@@ -607,7 +607,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. @@ -623,8 +623,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]; @@ -641,8 +641,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]; @@ -704,7 +704,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:
@@ -713,7 +713,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. @@ -734,7 +734,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:
@@ -743,7 +743,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. @@ -774,8 +774,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]; @@ -803,8 +803,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]; @@ -1200,7 +1200,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:
@@ -1209,7 +1209,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. @@ -1229,7 +1229,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:
@@ -1238,7 +1238,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. @@ -1258,7 +1258,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:
@@ -1267,7 +1267,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. @@ -1286,7 +1286,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:
@@ -1295,7 +1295,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. @@ -1310,7 +1310,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:
@@ -1319,7 +1319,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. @@ -1346,8 +1346,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]; @@ -1374,8 +1374,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]; @@ -1402,8 +1402,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]; @@ -1429,8 +1429,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]; @@ -1452,8 +1452,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]; @@ -3010,6 +3010,550 @@ public com.google.cloud.alloydb.v1alpha.Cluster.PrimaryConfig getDefaultInstance } } + public interface PscConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1alpha.Cluster.PscConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Create an instance that allows connections from Private Service
+     * Connect endpoints to the instance.
+     * 
+ * + * bool psc_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pscEnabled. + */ + boolean getPscEnabled(); + } + /** + * + * + *
+   * PscConfig contains PSC related configuration at a cluster level.
+   * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1alpha.Cluster.PscConfig} + */ + public static final class PscConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1alpha.Cluster.PscConfig) + PscConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PscConfig.newBuilder() to construct. + private PscConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PscConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PscConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Cluster_PscConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Cluster_PscConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.class, + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.Builder.class); + } + + public static final int PSC_ENABLED_FIELD_NUMBER = 1; + private boolean pscEnabled_ = false; + /** + * + * + *
+     * Optional. Create an instance that allows connections from Private Service
+     * Connect endpoints to the instance.
+     * 
+ * + * bool psc_enabled = 1 [(.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 (pscEnabled_ != false) { + output.writeBool(1, pscEnabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pscEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, 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.v1alpha.Cluster.PscConfig)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig other = + (com.google.cloud.alloydb.v1alpha.Cluster.PscConfig) obj; + + 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) + 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.v1alpha.Cluster.PscConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.Cluster.PscConfig 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.v1alpha.Cluster.PscConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.Cluster.PscConfig 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.v1alpha.Cluster.PscConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.Cluster.PscConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.alloydb.v1alpha.Cluster.PscConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.Cluster.PscConfig 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.v1alpha.Cluster.PscConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.Cluster.PscConfig 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.v1alpha.Cluster.PscConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.Cluster.PscConfig 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.v1alpha.Cluster.PscConfig 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; + } + /** + * + * + *
+     * PscConfig contains PSC related configuration at a cluster level.
+     * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1alpha.Cluster.PscConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1alpha.Cluster.PscConfig) + com.google.cloud.alloydb.v1alpha.Cluster.PscConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Cluster_PscConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Cluster_PscConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.class, + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pscEnabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Cluster_PscConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Cluster.PscConfig getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Cluster.PscConfig build() { + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Cluster.PscConfig buildPartial() { + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig result = + new com.google.cloud.alloydb.v1alpha.Cluster.PscConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.alloydb.v1alpha.Cluster.PscConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 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.v1alpha.Cluster.PscConfig) { + return mergeFrom((com.google.cloud.alloydb.v1alpha.Cluster.PscConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.Cluster.PscConfig other) { + if (other == com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.getDefaultInstance()) + return this; + 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 8: + { + pscEnabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 boolean pscEnabled_; + /** + * + * + *
+       * Optional. Create an instance that allows connections from Private Service
+       * Connect endpoints to the instance.
+       * 
+ * + * bool psc_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pscEnabled. + */ + @java.lang.Override + public boolean getPscEnabled() { + return pscEnabled_; + } + /** + * + * + *
+       * Optional. Create an instance that allows connections from Private Service
+       * Connect endpoints to the instance.
+       * 
+ * + * bool psc_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pscEnabled to set. + * @return This builder for chaining. + */ + public Builder setPscEnabled(boolean value) { + + pscEnabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Create an instance that allows connections from Private Service
+       * Connect endpoints to the instance.
+       * 
+ * + * bool psc_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPscEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + 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.v1alpha.Cluster.PscConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1alpha.Cluster.PscConfig) + private static final com.google.cloud.alloydb.v1alpha.Cluster.PscConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1alpha.Cluster.PscConfig(); + } + + public static com.google.cloud.alloydb.v1alpha.Cluster.PscConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PscConfig 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.v1alpha.Cluster.PscConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int sourceCase_ = 0; @SuppressWarnings("serial") @@ -3777,7 +4321,7 @@ public com.google.cloud.alloydb.v1alpha.Cluster.NetworkConfig getNetworkConfig() * * * @deprecated google.cloud.alloydb.v1alpha.Cluster.network is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=546 + * google/cloud/alloydb/v1alpha/resources.proto;l=554 * @return The network. */ @java.lang.Override @@ -3809,7 +4353,7 @@ public java.lang.String getNetwork() { * * * @deprecated google.cloud.alloydb.v1alpha.Cluster.network is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=546 + * google/cloud/alloydb/v1alpha/resources.proto;l=554 * @return The bytes for network. */ @java.lang.Override @@ -4150,7 +4694,7 @@ public com.google.cloud.alloydb.v1alpha.AutomatedBackupPolicy getAutomatedBackup * .google.cloud.alloydb.v1alpha.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1alpha.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=581 + * google/cloud/alloydb/v1alpha/resources.proto;l=589 * @return Whether the sslConfig field is set. */ @java.lang.Override @@ -4168,7 +4712,7 @@ public boolean hasSslConfig() { * .google.cloud.alloydb.v1alpha.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1alpha.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=581 + * google/cloud/alloydb/v1alpha/resources.proto;l=589 * @return The sslConfig. */ @java.lang.Override @@ -4541,16 +5085,34 @@ public com.google.cloud.alloydb.v1alpha.Cluster.PrimaryConfig getPrimaryConfig() : primaryConfig_; } + public static final int SATISFIES_PZI_FIELD_NUMBER = 33; + private boolean satisfiesPzi_ = false; + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzi = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + public static final int SATISFIES_PZS_FIELD_NUMBER = 30; private boolean satisfiesPzs_ = false; /** * * *
-   * Reserved for future use.
+   * Output only. Reserved for future use.
    * 
* - * bool satisfies_pzs = 30; + * bool satisfies_pzs = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The satisfiesPzs. */ @@ -4559,6 +5121,65 @@ public boolean getSatisfiesPzs() { return satisfiesPzs_; } + public static final int PSC_CONFIG_FIELD_NUMBER = 31; + private com.google.cloud.alloydb.v1alpha.Cluster.PscConfig pscConfig_; + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * cluster.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pscConfig field is set. + */ + @java.lang.Override + public boolean hasPscConfig() { + return pscConfig_ != null; + } + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * cluster.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pscConfig. + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Cluster.PscConfig getPscConfig() { + return pscConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.getDefaultInstance() + : pscConfig_; + } + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * cluster.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Cluster.PscConfigOrBuilder getPscConfigOrBuilder() { + return pscConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.getDefaultInstance() + : pscConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4656,6 +5277,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (satisfiesPzs_ != false) { output.writeBool(30, satisfiesPzs_); } + if (pscConfig_ != null) { + output.writeMessage(31, getPscConfig()); + } + if (satisfiesPzi_ != false) { + output.writeBool(33, satisfiesPzi_); + } getUnknownFields().writeTo(output); } @@ -4771,6 +5398,12 @@ public int getSerializedSize() { if (satisfiesPzs_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(30, satisfiesPzs_); } + if (pscConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, getPscConfig()); + } + if (satisfiesPzi_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(33, satisfiesPzi_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4849,7 +5482,12 @@ public boolean equals(final java.lang.Object obj) { if (hasPrimaryConfig()) { if (!getPrimaryConfig().equals(other.getPrimaryConfig())) return false; } + if (getSatisfiesPzi() != other.getSatisfiesPzi()) return false; if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; + if (hasPscConfig() != other.hasPscConfig()) return false; + if (hasPscConfig()) { + if (!getPscConfig().equals(other.getPscConfig())) return false; + } if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 15: @@ -4950,8 +5588,14 @@ public int hashCode() { hash = (37 * hash) + PRIMARY_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getPrimaryConfig().hashCode(); } + hash = (37 * hash) + SATISFIES_PZI_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzi()); hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); + if (hasPscConfig()) { + hash = (37 * hash) + PSC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPscConfig().hashCode(); + } switch (sourceCase_) { case 15: hash = (37 * hash) + BACKUP_SOURCE_FIELD_NUMBER; @@ -5211,7 +5855,13 @@ public Builder clear() { primaryConfigBuilder_.dispose(); primaryConfigBuilder_ = null; } + satisfiesPzi_ = false; satisfiesPzs_ = false; + pscConfig_ = null; + if (pscConfigBuilder_ != null) { + pscConfigBuilder_.dispose(); + pscConfigBuilder_ = null; + } sourceCase_ = 0; source_ = null; return this; @@ -5341,8 +5991,14 @@ private void buildPartial0(com.google.cloud.alloydb.v1alpha.Cluster result) { primaryConfigBuilder_ == null ? primaryConfig_ : primaryConfigBuilder_.build(); } if (((from_bitField0_ & 0x04000000) != 0)) { + result.satisfiesPzi_ = satisfiesPzi_; + } + if (((from_bitField0_ & 0x08000000) != 0)) { result.satisfiesPzs_ = satisfiesPzs_; } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.pscConfig_ = pscConfigBuilder_ == null ? pscConfig_ : pscConfigBuilder_.build(); + } } private void buildPartialOneofs(com.google.cloud.alloydb.v1alpha.Cluster result) { @@ -5481,9 +6137,15 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.Cluster other) { if (other.hasPrimaryConfig()) { mergePrimaryConfig(other.getPrimaryConfig()); } + if (other.getSatisfiesPzi() != false) { + setSatisfiesPzi(other.getSatisfiesPzi()); + } if (other.getSatisfiesPzs() != false) { setSatisfiesPzs(other.getSatisfiesPzs()); } + if (other.hasPscConfig()) { + mergePscConfig(other.getPscConfig()); + } switch (other.getSourceCase()) { case BACKUP_SOURCE: { @@ -5701,9 +6363,21 @@ public Builder mergeFrom( case 240: { satisfiesPzs_ = input.readBool(); - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; break; } // case 240 + case 250: + { + input.readMessage(getPscConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x10000000; + break; + } // case 250 + case 264: + { + satisfiesPzi_ = input.readBool(); + bitField0_ |= 0x04000000; + break; + } // case 264 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -7808,7 +8482,7 @@ public Builder clearNetworkConfig() { * * * @deprecated google.cloud.alloydb.v1alpha.Cluster.network is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=546 + * google/cloud/alloydb/v1alpha/resources.proto;l=554 * @return The network. */ @java.lang.Deprecated @@ -7839,7 +8513,7 @@ public java.lang.String getNetwork() { * * * @deprecated google.cloud.alloydb.v1alpha.Cluster.network is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=546 + * google/cloud/alloydb/v1alpha/resources.proto;l=554 * @return The bytes for network. */ @java.lang.Deprecated @@ -7870,7 +8544,7 @@ public com.google.protobuf.ByteString getNetworkBytes() { * * * @deprecated google.cloud.alloydb.v1alpha.Cluster.network is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=546 + * google/cloud/alloydb/v1alpha/resources.proto;l=554 * @param value The network to set. * @return This builder for chaining. */ @@ -7900,7 +8574,7 @@ public Builder setNetwork(java.lang.String value) { * * * @deprecated google.cloud.alloydb.v1alpha.Cluster.network is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=546 + * google/cloud/alloydb/v1alpha/resources.proto;l=554 * @return This builder for chaining. */ @java.lang.Deprecated @@ -7926,7 +8600,7 @@ public Builder clearNetwork() { * * * @deprecated google.cloud.alloydb.v1alpha.Cluster.network is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=546 + * google/cloud/alloydb/v1alpha/resources.proto;l=554 * @param value The bytes for network to set. * @return This builder for chaining. */ @@ -8772,7 +9446,7 @@ public Builder clearAutomatedBackupPolicy() { * .google.cloud.alloydb.v1alpha.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1alpha.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=581 + * google/cloud/alloydb/v1alpha/resources.proto;l=589 * @return Whether the sslConfig field is set. */ @java.lang.Deprecated @@ -8789,7 +9463,7 @@ public boolean hasSslConfig() { * .google.cloud.alloydb.v1alpha.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1alpha.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=581 + * google/cloud/alloydb/v1alpha/resources.proto;l=589 * @return The sslConfig. */ @java.lang.Deprecated @@ -10204,15 +10878,68 @@ public Builder clearPrimaryConfig() { return primaryConfigBuilder_; } + private boolean satisfiesPzi_; + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzi = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzi = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzi to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzi(boolean value) { + + satisfiesPzi_ = value; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzi = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzi() { + bitField0_ = (bitField0_ & ~0x04000000); + satisfiesPzi_ = false; + onChanged(); + return this; + } + private boolean satisfiesPzs_; /** * * *
-     * Reserved for future use.
+     * Output only. Reserved for future use.
      * 
* - * bool satisfies_pzs = 30; + * bool satisfies_pzs = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The satisfiesPzs. */ @@ -10224,10 +10951,10 @@ public boolean getSatisfiesPzs() { * * *
-     * Reserved for future use.
+     * Output only. Reserved for future use.
      * 
* - * bool satisfies_pzs = 30; + * bool satisfies_pzs = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The satisfiesPzs to set. * @return This builder for chaining. @@ -10235,7 +10962,7 @@ public boolean getSatisfiesPzs() { public Builder setSatisfiesPzs(boolean value) { satisfiesPzs_ = value; - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -10243,20 +10970,232 @@ public Builder setSatisfiesPzs(boolean value) { * * *
-     * Reserved for future use.
+     * Output only. Reserved for future use.
      * 
* - * bool satisfies_pzs = 30; + * bool satisfies_pzs = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearSatisfiesPzs() { - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); satisfiesPzs_ = false; onChanged(); return this; } + private com.google.cloud.alloydb.v1alpha.Cluster.PscConfig pscConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig, + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.Builder, + com.google.cloud.alloydb.v1alpha.Cluster.PscConfigOrBuilder> + pscConfigBuilder_; + /** + * + * + *
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * cluster.
+     * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pscConfig field is set. + */ + public boolean hasPscConfig() { + return ((bitField0_ & 0x10000000) != 0); + } + /** + * + * + *
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * cluster.
+     * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pscConfig. + */ + public com.google.cloud.alloydb.v1alpha.Cluster.PscConfig getPscConfig() { + if (pscConfigBuilder_ == null) { + return pscConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.getDefaultInstance() + : pscConfig_; + } else { + return pscConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * cluster.
+     * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPscConfig(com.google.cloud.alloydb.v1alpha.Cluster.PscConfig value) { + if (pscConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pscConfig_ = value; + } else { + pscConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * cluster.
+     * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPscConfig( + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.Builder builderForValue) { + if (pscConfigBuilder_ == null) { + pscConfig_ = builderForValue.build(); + } else { + pscConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * cluster.
+     * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePscConfig(com.google.cloud.alloydb.v1alpha.Cluster.PscConfig value) { + if (pscConfigBuilder_ == null) { + if (((bitField0_ & 0x10000000) != 0) + && pscConfig_ != null + && pscConfig_ + != com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.getDefaultInstance()) { + getPscConfigBuilder().mergeFrom(value); + } else { + pscConfig_ = value; + } + } else { + pscConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * cluster.
+     * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPscConfig() { + bitField0_ = (bitField0_ & ~0x10000000); + pscConfig_ = null; + if (pscConfigBuilder_ != null) { + pscConfigBuilder_.dispose(); + pscConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * cluster.
+     * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.Builder getPscConfigBuilder() { + bitField0_ |= 0x10000000; + onChanged(); + return getPscConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * cluster.
+     * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.Cluster.PscConfigOrBuilder getPscConfigOrBuilder() { + if (pscConfigBuilder_ != null) { + return pscConfigBuilder_.getMessageOrBuilder(); + } else { + return pscConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.getDefaultInstance() + : pscConfig_; + } + } + /** + * + * + *
+     * Optional. The configuration for Private Service Connect (PSC) for the
+     * cluster.
+     * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig, + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.Builder, + com.google.cloud.alloydb.v1alpha.Cluster.PscConfigOrBuilder> + getPscConfigFieldBuilder() { + if (pscConfigBuilder_ == null) { + pscConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig, + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig.Builder, + com.google.cloud.alloydb.v1alpha.Cluster.PscConfigOrBuilder>( + getPscConfig(), getParentForChildren(), isClean()); + pscConfig_ = null; + } + return pscConfigBuilder_; + } + @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/ClusterOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ClusterOrBuilder.java index 3ba02e0205e7..1bdf0371e8b9 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ClusterOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ClusterOrBuilder.java @@ -502,7 +502,7 @@ java.lang.String getLabelsOrDefault( * * * @deprecated google.cloud.alloydb.v1alpha.Cluster.network is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=546 + * google/cloud/alloydb/v1alpha/resources.proto;l=554 * @return The network. */ @java.lang.Deprecated @@ -523,7 +523,7 @@ java.lang.String getLabelsOrDefault( * * * @deprecated google.cloud.alloydb.v1alpha.Cluster.network is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=546 + * google/cloud/alloydb/v1alpha/resources.proto;l=554 * @return The bytes for network. */ @java.lang.Deprecated @@ -747,7 +747,7 @@ java.lang.String getAnnotationsOrDefault( * .google.cloud.alloydb.v1alpha.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1alpha.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=581 + * google/cloud/alloydb/v1alpha/resources.proto;l=589 * @return Whether the sslConfig field is set. */ @java.lang.Deprecated @@ -762,7 +762,7 @@ java.lang.String getAnnotationsOrDefault( * .google.cloud.alloydb.v1alpha.SslConfig ssl_config = 18 [deprecated = true]; * * @deprecated google.cloud.alloydb.v1alpha.Cluster.ssl_config is deprecated. See - * google/cloud/alloydb/v1alpha/resources.proto;l=581 + * google/cloud/alloydb/v1alpha/resources.proto;l=589 * @return The sslConfig. */ @java.lang.Deprecated @@ -1036,14 +1036,71 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Reserved for future use.
+   * Output only. Reserved for future use.
    * 
* - * bool satisfies_pzs = 30; + * bool satisfies_pzi = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + boolean getSatisfiesPzi(); + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzs = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The satisfiesPzs. */ boolean getSatisfiesPzs(); + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * cluster.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pscConfig field is set. + */ + boolean hasPscConfig(); + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * cluster.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pscConfig. + */ + com.google.cloud.alloydb.v1alpha.Cluster.PscConfig getPscConfig(); + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * cluster.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Cluster.PscConfig psc_config = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1alpha.Cluster.PscConfigOrBuilder getPscConfigOrBuilder(); + com.google.cloud.alloydb.v1alpha.Cluster.SourceCase getSourceCase(); } 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 2112e855be77..995be654a16e 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 @@ -41,6 +41,7 @@ private ConnectionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder private ConnectionInfo() { name_ = ""; ipAddress_ = ""; + publicIpAddress_ = ""; pemCertificateChain_ = com.google.protobuf.LazyStringArrayList.emptyList(); instanceUid_ = ""; } @@ -176,6 +177,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") @@ -194,7 +254,7 @@ public com.google.protobuf.ByteString getIpAddressBytes() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @return A list containing the pemCertificateChain. */ @java.lang.Deprecated @@ -214,7 +274,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=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @return The count of pemCertificateChain. */ @java.lang.Deprecated @@ -234,7 +294,7 @@ public int getPemCertificateChainCount() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @param index The index of the element to return. * @return The pemCertificateChain at the given index. */ @@ -255,7 +315,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=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @param index The index of the value to return. * @return The bytes of the pemCertificateChain at the given index. */ @@ -341,6 +401,9 @@ 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_); + } getUnknownFields().writeTo(output); } @@ -367,6 +430,9 @@ 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_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -385,6 +451,7 @@ 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 (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -402,6 +469,8 @@ 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(); @@ -550,6 +619,7 @@ public Builder clear() { bitField0_ = 0; name_ = ""; ipAddress_ = ""; + publicIpAddress_ = ""; pemCertificateChain_ = com.google.protobuf.LazyStringArrayList.emptyList(); instanceUid_ = ""; return this; @@ -595,10 +665,13 @@ private void buildPartial0(com.google.cloud.alloydb.v1alpha.ConnectionInfo resul 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_; } } @@ -659,10 +732,15 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.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 +749,7 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.ConnectionInfo other) } if (!other.getInstanceUid().isEmpty()) { instanceUid_ = other.instanceUid_; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -722,9 +800,15 @@ 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 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -976,6 +1060,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 +1193,7 @@ private void ensurePemCertificateChainIsMutable() { if (!pemCertificateChain_.isModifiable()) { pemCertificateChain_ = new com.google.protobuf.LazyStringArrayList(pemCertificateChain_); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } /** * @@ -998,7 +1208,7 @@ private void ensurePemCertificateChainIsMutable() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @return A list containing the pemCertificateChain. */ @java.lang.Deprecated @@ -1019,7 +1229,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=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @return The count of pemCertificateChain. */ @java.lang.Deprecated @@ -1039,7 +1249,7 @@ public int getPemCertificateChainCount() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @param index The index of the element to return. * @return The pemCertificateChain at the given index. */ @@ -1060,7 +1270,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=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @param index The index of the value to return. * @return The bytes of the pemCertificateChain at the given index. */ @@ -1081,7 +1291,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=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @param index The index to set the value at. * @param value The pemCertificateChain to set. * @return This builder for chaining. @@ -1093,7 +1303,7 @@ public Builder setPemCertificateChain(int index, java.lang.String value) { } ensurePemCertificateChainIsMutable(); pemCertificateChain_.set(index, value); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1110,7 +1320,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=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @param value The pemCertificateChain to add. * @return This builder for chaining. */ @@ -1121,7 +1331,7 @@ public Builder addPemCertificateChain(java.lang.String value) { } ensurePemCertificateChainIsMutable(); pemCertificateChain_.add(value); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1138,7 +1348,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=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @param values The pemCertificateChain to add. * @return This builder for chaining. */ @@ -1146,7 +1356,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 +1373,13 @@ 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=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @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 +1397,7 @@ public Builder clearPemCertificateChain() { * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @param value The bytes of the pemCertificateChain to add. * @return This builder for chaining. */ @@ -1199,7 +1409,7 @@ public Builder addPemCertificateChainBytes(com.google.protobuf.ByteString value) checkByteStringIsUtf8(value); ensurePemCertificateChainIsMutable(); pemCertificateChain_.add(value); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1266,7 +1476,7 @@ public Builder setInstanceUid(java.lang.String value) { throw new NullPointerException(); } instanceUid_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1283,7 +1493,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 +1515,7 @@ public Builder setInstanceUidBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); instanceUid_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } 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 16a8d2c2475e..3cfcc71ea620 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 @@ -81,6 +81,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(); + /** * * @@ -94,7 +127,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @return A list containing the pemCertificateChain. */ @java.lang.Deprecated @@ -112,7 +145,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @return The count of pemCertificateChain. */ @java.lang.Deprecated @@ -130,7 +163,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @param index The index of the element to return. * @return The pemCertificateChain at the given index. */ @@ -149,7 +182,7 @@ public interface ConnectionInfoOrBuilder * * * @deprecated google.cloud.alloydb.v1alpha.ConnectionInfo.pem_certificate_chain is deprecated. - * See google/cloud/alloydb/v1alpha/resources.proto;l=918 + * See google/cloud/alloydb/v1alpha/resources.proto;l=1027 * @param index The index of the value to return. * @return The bytes of the pemCertificateChain at the given index. */ diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Database.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Database.java new file mode 100644 index 000000000000..94a216e5a149 --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/Database.java @@ -0,0 +1,1022 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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/v1alpha/resources.proto + +package com.google.cloud.alloydb.v1alpha; + +/** + * + * + *
+ * Message describing Database object.
+ * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1alpha.Database} + */ +public final class Database extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1alpha.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.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Database_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Database_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Database.class, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Database)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1alpha.Database other = + (com.google.cloud.alloydb.v1alpha.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.v1alpha.Database parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Database parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Database parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Database parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Database parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.Database} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1alpha.Database) + com.google.cloud.alloydb.v1alpha.DatabaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Database_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Database_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Database.class, + com.google.cloud.alloydb.v1alpha.Database.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1alpha.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.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Database_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Database getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1alpha.Database.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Database build() { + com.google.cloud.alloydb.v1alpha.Database result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Database buildPartial() { + com.google.cloud.alloydb.v1alpha.Database result = + new com.google.cloud.alloydb.v1alpha.Database(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.alloydb.v1alpha.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.v1alpha.Database) { + return mergeFrom((com.google.cloud.alloydb.v1alpha.Database) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.Database other) { + if (other == com.google.cloud.alloydb.v1alpha.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.v1alpha.Database) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1alpha.Database) + private static final com.google.cloud.alloydb.v1alpha.Database DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1alpha.Database(); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Database getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/DatabaseName.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/DatabaseName.java new file mode 100644 index 000000000000..ee7e22409fd9 --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/DatabaseName.java @@ -0,0 +1,259 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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.v1alpha; + +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-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/DatabaseOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/DatabaseOrBuilder.java new file mode 100644 index 000000000000..6cd5957e900d --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/DatabaseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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/v1alpha/resources.proto + +package com.google.cloud.alloydb.v1alpha; + +public interface DatabaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1alpha.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-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateRequest.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateRequest.java index 0a52fd008d3f..7fc3a3091c35 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateRequest.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateRequest.java @@ -207,13 +207,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.v1alpha.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1360 * @return The pemCsr. */ @java.lang.Override @@ -233,13 +234,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.v1alpha.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1360 * @return The bytes for pemCsr. */ @java.lang.Override @@ -1160,13 +1162,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.v1alpha.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1360 * @return The pemCsr. */ @java.lang.Deprecated @@ -1185,13 +1188,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.v1alpha.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1360 * @return The bytes for pemCsr. */ @java.lang.Deprecated @@ -1210,13 +1214,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.v1alpha.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1360 * @param value The pemCsr to set. * @return This builder for chaining. */ @@ -1234,13 +1239,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.v1alpha.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1360 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1254,13 +1260,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.v1alpha.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1alpha/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-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateRequestOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateRequestOrBuilder.java index a1108ae9b9a7..9897225b56ca 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateRequestOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateRequestOrBuilder.java @@ -107,13 +107,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.v1alpha.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1360 * @return The pemCsr. */ @java.lang.Deprecated @@ -122,13 +123,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.v1alpha.GenerateClientCertificateRequest.pem_csr is - * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1351 + * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1360 * @return The bytes for pemCsr. */ @java.lang.Deprecated diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateResponse.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateResponse.java index f6bf2f36464f..6e7292536c9f 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateResponse.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateResponse.java @@ -76,11 +76,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.v1alpha.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1alpha/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) { @@ -99,11 +104,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.v1alpha.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1alpha/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) { @@ -660,10 +670,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.v1alpha.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1alpha/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)) { @@ -682,10 +697,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.v1alpha.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1alpha/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) { @@ -704,11 +724,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.v1alpha.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1alpha/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(); @@ -725,10 +750,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.v1alpha.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1383 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearPemCertificate() { pemCertificate_ = getDefaultInstance().getPemCertificate(); bitField0_ = (bitField0_ & ~0x00000001); @@ -742,11 +772,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.v1alpha.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1alpha/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-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateResponseOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateResponseOrBuilder.java index a5af059f09d7..0a31f3286f3b 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateResponseOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/GenerateClientCertificateResponseOrBuilder.java @@ -30,10 +30,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.v1alpha.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1alpha/service.proto;l=1383 * @return The pemCertificate. */ + @java.lang.Deprecated java.lang.String getPemCertificate(); /** * @@ -42,10 +47,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.v1alpha.GenerateClientCertificateResponse.pem_certificate is + * deprecated. See google/cloud/alloydb/v1alpha/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-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 6235f3269740..d2487800125f 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 @@ -5835,6 +5835,5672 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface PscInterfaceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * 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(); + } + /** + * + * + *
+   * 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.v1alpha.Instance.PscInterfaceConfig} + */ + public static final class PscInterfaceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig) + PscInterfaceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PscInterfaceConfig.newBuilder() to construct. + private PscInterfaceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PscInterfaceConfig() { + consumerEndpointIps_ = com.google.protobuf.LazyStringArrayList.emptyList(); + networkAttachment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PscInterfaceConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_PscInterfaceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_PscInterfaceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig.class, + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig.Builder.class); + } + + 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_; + } + /** + * + * + *
+     * 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 NETWORK_ATTACHMENT_FIELD_NUMBER = 2; + + @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; + } + } + + 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 < 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); + } + + @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; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig other = + (com.google.cloud.alloydb.v1alpha.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; + } + + @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; + } + + public static com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig 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.v1alpha.Instance.PscInterfaceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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 com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.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 com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.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); + } + + public static com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.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); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration 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.v1alpha.Instance.PscInterfaceConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig) + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_PscInterfaceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_PscInterfaceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig.class, + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1alpha.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.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_PscInterfaceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig + getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig build() { + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig buildPartial() { + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig result = + new com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig) { + return mergeFrom((com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig other) { + if (other + == com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig) + private static final com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig(); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PscInstanceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInstanceConfig} + */ + public static final class PscInstanceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1alpha.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.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_PscInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_PscInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig.class, + com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInstanceConfig)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig other = + (com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInstanceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInstanceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInstanceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.Instance.PscInstanceConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig) + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_PscInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_PscInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig.class, + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1alpha.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.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_PscInstanceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig + getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig build() { + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig buildPartial() { + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig result = + new com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.Instance.PscInstanceConfig) { + return mergeFrom((com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig other) { + if (other + == com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig m = + input.readMessage( + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig, + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig.Builder, + com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPscInterfaceConfigs( + int index, com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPscInterfaceConfigs( + int index, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPscInterfaceConfigs( + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPscInterfaceConfigs( + int index, com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPscInterfaceConfigs( + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPscInterfaceConfigs( + int index, + com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig.Builder + addPscInterfaceConfigsBuilder() { + return getPscInterfaceConfigsFieldBuilder() + .addBuilder( + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInterfaceConfig psc_interface_configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig.Builder + addPscInterfaceConfigsBuilder(int index) { + return getPscInterfaceConfigsFieldBuilder() + .addBuilder( + index, + com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.Instance.PscInterfaceConfig, + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfigOrBuilder> + getPscInterfaceConfigsFieldBuilder() { + if (pscInterfaceConfigsBuilder_ == null) { + pscInterfaceConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig, + com.google.cloud.alloydb.v1alpha.Instance.PscInterfaceConfig.Builder, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInstanceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig) + private static final com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig(); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.PscInstanceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InstanceNetworkConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork> + getAuthorizedExternalNetworksList(); + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + getAuthorizedExternalNetworks(int index); + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder> + getAuthorizedExternalNetworksOrBuilderList(); + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig} + */ + public static final class InstanceNetworkConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1alpha.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.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.class, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.Builder.class); + } + + public interface AuthorizedNetworkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork} + */ + public static final class AuthorizedNetwork extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1alpha.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.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_AuthorizedNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .class, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork other = + (com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig + .AuthorizedNetwork + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig + .AuthorizedNetwork + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig + .AuthorizedNetwork + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork) + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_AuthorizedNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .class, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder.class); + } + + // Construct using + // com.google.cloud.alloydb.v1alpha.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.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + build() { + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + buildPartial() { + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork result = + new com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork) { + return mergeFrom( + (com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + other) { + if (other + == com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork) + private static final com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig + .AuthorizedNetwork + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork(); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork> + authorizedExternalNetworks_; + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork> + getAuthorizedExternalNetworksList() { + return authorizedExternalNetworks_; + } + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder> + getAuthorizedExternalNetworksOrBuilderList() { + return authorizedExternalNetworks_; + } + /** + * + * + *
+     * Optional. A list of external network authorized to access this instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig other = + (com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig) + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.class, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.Builder.class); + } + + // Construct using + // com.google.cloud.alloydb.v1alpha.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.v1alpha.ResourcesProto + .internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig + getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig build() { + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig buildPartial() { + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig result = + new com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig) { + return mergeFrom((com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig other) { + if (other + == com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + m = + input.readMessage( + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork> + authorizedExternalNetworks_ = java.util.Collections.emptyList(); + + private void ensureAuthorizedExternalNetworksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + authorizedExternalNetworks_ = + new java.util.ArrayList< + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig + .AuthorizedNetwork>(authorizedExternalNetworks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder> + authorizedExternalNetworksBuilder_; + + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAuthorizedExternalNetworks( + int index, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAuthorizedExternalNetworks( + int index, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuthorizedExternalNetworks( + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuthorizedExternalNetworks( + int index, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuthorizedExternalNetworks( + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAuthorizedExternalNetworks( + int index, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAuthorizedExternalNetworks( + java.lang.Iterable< + ? extends + com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder + addAuthorizedExternalNetworksBuilder() { + return getAuthorizedExternalNetworksFieldBuilder() + .addBuilder( + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .getDefaultInstance()); + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder + addAuthorizedExternalNetworksBuilder(int index) { + return getAuthorizedExternalNetworksFieldBuilder() + .addBuilder( + index, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .getDefaultInstance()); + } + /** + * + * + *
+       * Optional. A list of external network authorized to access this instance.
+       * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork authorized_external_networks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder> + getAuthorizedExternalNetworksBuilderList() { + return getAuthorizedExternalNetworksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig + .AuthorizedNetworkOrBuilder> + getAuthorizedExternalNetworksFieldBuilder() { + if (authorizedExternalNetworksBuilder_ == null) { + authorizedExternalNetworksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.AuthorizedNetwork + .Builder, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig) + private static final com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig(); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -6863,7 +12529,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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; @@ -6878,7 +12545,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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; @@ -6895,7 +12563,8 @@ public com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig getReadPoolConfi * * *
-   * Read pool specific config.
+   * Read pool instance configuration.
+   * This is required if the value of instanceType is READ_POOL.
    * 
* * .google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; @@ -7263,16 +12932,34 @@ public boolean hasClientConnectionConfig() { : clientConnectionConfig_; } + public static final int SATISFIES_PZI_FIELD_NUMBER = 30; + private boolean satisfiesPzi_ = false; + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzi = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + public static final int SATISFIES_PZS_FIELD_NUMBER = 24; private boolean satisfiesPzs_ = false; /** * * *
-   * Reserved for future use.
+   * Output only. Reserved for future use.
    * 
* - * bool satisfies_pzs = 24; + * bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The satisfiesPzs. */ @@ -7281,6 +12968,123 @@ public boolean getSatisfiesPzs() { return satisfiesPzs_; } + public static final int PSC_INSTANCE_CONFIG_FIELD_NUMBER = 28; + private com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig pscInstanceConfig_; + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.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 pscInstanceConfig_ != null; + } + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pscInstanceConfig. + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig getPscInstanceConfig() { + return pscInstanceConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig.getDefaultInstance() + : pscInstanceConfig_; + } + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfigOrBuilder + getPscInstanceConfigOrBuilder() { + return pscInstanceConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig.getDefaultInstance() + : pscInstanceConfig_; + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 29; + private com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig networkConfig_; + /** + * + * + *
+   * Optional. Instance level network configuration.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return networkConfig_ != null; + } + /** + * + * + *
+   * Optional. Instance level network configuration.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig getNetworkConfig() { + return networkConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.getDefaultInstance() + : networkConfig_; + } + /** + * + * + *
+   * Optional. Instance level network configuration.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfigOrBuilder + getNetworkConfigOrBuilder() { + return networkConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.getDefaultInstance() + : networkConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -7368,6 +13172,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (satisfiesPzs_ != false) { output.writeBool(24, satisfiesPzs_); } + if (pscInstanceConfig_ != null) { + output.writeMessage(28, getPscInstanceConfig()); + } + if (networkConfig_ != null) { + output.writeMessage(29, getNetworkConfig()); + } + if (satisfiesPzi_ != false) { + output.writeBool(30, satisfiesPzi_); + } getUnknownFields().writeTo(output); } @@ -7476,6 +13289,15 @@ public int getSerializedSize() { if (satisfiesPzs_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(24, satisfiesPzs_); } + if (pscInstanceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getPscInstanceConfig()); + } + if (networkConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, getNetworkConfig()); + } + if (satisfiesPzi_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(30, satisfiesPzi_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -7542,7 +13364,16 @@ public boolean equals(final java.lang.Object obj) { if (hasClientConnectionConfig()) { if (!getClientConnectionConfig().equals(other.getClientConnectionConfig())) return false; } + if (getSatisfiesPzi() != other.getSatisfiesPzi()) 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; } @@ -7626,8 +13457,18 @@ public int hashCode() { hash = (37 * hash) + CLIENT_CONNECTION_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getClientConnectionConfig().hashCode(); } + hash = (37 * hash) + SATISFIES_PZI_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzi()); 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; @@ -7861,7 +13702,18 @@ public Builder clear() { clientConnectionConfigBuilder_.dispose(); clientConnectionConfigBuilder_ = null; } - satisfiesPzs_ = false; + satisfiesPzi_ = false; + satisfiesPzs_ = false; + pscInstanceConfig_ = null; + if (pscInstanceConfigBuilder_ != null) { + pscInstanceConfigBuilder_.dispose(); + pscInstanceConfigBuilder_ = null; + } + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } return this; } @@ -7991,8 +13843,21 @@ private void buildPartial0(com.google.cloud.alloydb.v1alpha.Instance result) { : clientConnectionConfigBuilder_.build(); } if (((from_bitField0_ & 0x00800000) != 0)) { + result.satisfiesPzi_ = satisfiesPzi_; + } + if (((from_bitField0_ & 0x01000000) != 0)) { result.satisfiesPzs_ = satisfiesPzs_; } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.pscInstanceConfig_ = + pscInstanceConfigBuilder_ == null + ? pscInstanceConfig_ + : pscInstanceConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.networkConfig_ = + networkConfigBuilder_ == null ? networkConfig_ : networkConfigBuilder_.build(); + } } @java.lang.Override @@ -8142,9 +14007,18 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.Instance other) { if (other.hasClientConnectionConfig()) { mergeClientConnectionConfig(other.getClientConnectionConfig()); } + if (other.getSatisfiesPzi() != false) { + setSatisfiesPzi(other.getSatisfiesPzi()); + } 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; @@ -8339,9 +14213,28 @@ public Builder mergeFrom( case 192: { satisfiesPzs_ = input.readBool(); - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; break; } // case 192 + case 226: + { + input.readMessage( + getPscInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x02000000; + break; + } // case 226 + case 234: + { + input.readMessage(getNetworkConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 234 + case 240: + { + satisfiesPzi_ = input.readBool(); + bitField0_ |= 0x00800000; + break; + } // case 240 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -8359,34 +14252,279 @@ public Builder mergeFrom( return this; } - private int bitField0_; - - private java.lang.Object name_ = ""; + 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}
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * 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 { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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(); + } + 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; + } + + 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; + } + } + /** + * + * + *
+     * 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 { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + } + /** + * + * + *
+     * 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; + } + + private java.lang.Object uid_ = ""; /** * * *
-     * 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. 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 name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The name. + * @return The uid. */ - public java.lang.String getName() { - java.lang.Object ref = name_; + 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(); - name_ = s; + uid_ = s; return s; } else { return (java.lang.String) ref; @@ -8396,27 +14534,20 @@ public java.lang.String getName() { * * *
-     * 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. 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 name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The bytes for name. + * @return The bytes for uid. */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; + 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); - name_ = b; + uid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -8426,28 +14557,21 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * 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. 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 name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @param value The name to set. + * @param value The uid to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setUid(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; + uid_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -8455,24 +14579,178 @@ public Builder setName(java.lang.String value) { * * *
-     * 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. 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 name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); + 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(); + } + 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(); + } + } + /** + * + * + *
+     * 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); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * 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()); + } + 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); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } onChanged(); return this; } @@ -8480,205 +14758,200 @@ public Builder clearName() { * * *
-     * 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 bytes for name to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; onChanged(); - return this; + return getCreateTimeFieldBuilder().getBuilder(); } - - private java.lang.Object displayName_ = ""; /** * * *
-     * User-settable and human-readable display name for the Instance.
+     * Output only. Create time stamp
      * 
* - * string display_name = 2; - * - * @return The displayName. + * + * .google.protobuf.Timestamp create_time = 4 [(.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 com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); } else { - return (java.lang.String) ref; + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; } } /** * * *
-     * User-settable and human-readable display name for the Instance.
+     * Output only. Create time stamp
      * 
* - * string display_name = 2; - * - * @return The bytes for displayName. + * + * .google.protobuf.Timestamp create_time = 4 [(.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; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; } + return createTimeBuilder_; } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; /** * * *
-     * 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]; + * * - * @param value The displayName to set. - * @return This builder for chaining. + * @return Whether the updateTime field is set. */ - public Builder setDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - displayName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); } /** * * *
-     * 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]; + * * - * @return This builder for chaining. + * @return The updateTime. */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } } /** * * *
-     * 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(); + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); } - checkByteStringIsUtf8(value); - displayName_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000010; onChanged(); return this; } - - 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.
+     * Output only. Update time stamp
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - 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; + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); } else { - return (java.lang.String) ref; + updateTimeBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000010; + 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.
+     * Output only. Update time stamp
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - 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 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 (com.google.protobuf.ByteString) ref; + updateTimeBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000010; + 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.
+     * Output only. Update 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 update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setUid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; } - uid_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -8686,109 +14959,131 @@ 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. Update time stamp
      * 
* - * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** * - * @return This builder for chaining. + * + *
+     * Output only. Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearUid() { - uid_ = getDefaultInstance().getUid(); - bitField0_ = (bitField0_ & ~0x00000004); - 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_; + } } /** * * *
-     * 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. Update 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 update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setUidBytes(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); - uid_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + return updateTimeBuilder_; } - private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.Timestamp deleteTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; + deleteTimeBuilder_; /** * * *
-     * 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 Whether the createTime field is set. + * @return Whether the deleteTime field is set. */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000008) != 0); + public boolean hasDeleteTime() { + return ((bitField0_ & 0x00000020) != 0); } /** * * *
-     * 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. + * @return The deleteTime. */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null + public com.google.protobuf.Timestamp getDeleteTime() { + if (deleteTimeBuilder_ == null) { + return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + : deleteTime_; } else { - return createTimeBuilder_.getMessage(); + return deleteTimeBuilder_.getMessage(); } } /** * * *
-     * 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) { + public Builder setDeleteTime(com.google.protobuf.Timestamp value) { + if (deleteTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - createTime_ = value; + deleteTime_ = value; } else { - createTimeBuilder_.setMessage(value); + deleteTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -8796,20 +15091,20 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * 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.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); + public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deleteTimeBuilder_ == null) { + deleteTime_ = builderForValue.build(); } else { - createTimeBuilder_.setMessage(builderForValue.build()); + deleteTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -8817,26 +15112,26 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * 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 mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); + 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 { - createTime_ = value; + deleteTime_ = value; } } else { - createTimeBuilder_.mergeFrom(value); + deleteTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -8844,19 +15139,19 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * 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 clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000008); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + public Builder clearDeleteTime() { + bitField0_ = (bitField0_ & ~0x00000020); + deleteTime_ = null; + if (deleteTimeBuilder_ != null) { + deleteTimeBuilder_.dispose(); + deleteTimeBuilder_ = null; } onChanged(); return this; @@ -8865,179 +15160,264 @@ public Builder clearCreateTime() { * * *
-     * 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 com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000008; + public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { + bitField0_ |= 0x00000020; onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return getDeleteTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Delete time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { + if (deleteTimeBuilder_ != null) { + return deleteTimeBuilder_.getMessageOrBuilder(); + } else { + 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]; + * + */ + 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; + } + 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 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(); } /** * * *
-     * 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_; + @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; } /** * * *
-     * 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; + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - return createTimeBuilder_; + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); } - 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_; + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } /** * * *
-     * Output only. Update time stamp
+     * Labels as key value pairs
      * 
* - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. + * map<string, string> labels = 7; */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000010) != 0); + 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. Update time stamp
+     * Labels as key value pairs
      * 
* - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. + * map<string, string> labels = 7; */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); + 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. Update time stamp
+     * Labels as key value pairs
      * 
* - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * map<string, string> labels = 7; */ - 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(); + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; return this; } + + private int state_ = 0; /** * * *
-     * 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.v1alpha.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The enum numeric value on the wire for state. */ - 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; + @java.lang.Override + public int getStateValue() { + return state_; } /** * * *
-     * 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.v1alpha.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. */ - 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); - } - bitField0_ |= 0x00000010; + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -9045,152 +15425,143 @@ public Builder mergeUpdateTime(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.v1alpha.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The state. */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000010); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.State getState() { + com.google.cloud.alloydb.v1alpha.Instance.State result = + com.google.cloud.alloydb.v1alpha.Instance.State.forNumber(state_); + return result == null ? com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param value The state to set. + * @return This builder for chaining. */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000010; + public Builder setState(com.google.cloud.alloydb.v1alpha.Instance.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + state_ = value.getNumber(); onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); + 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.v1alpha.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @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 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.v1alpha.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; * - */ - 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_; + * + * @return The enum numeric value on the wire for instanceType. + */ + @java.lang.Override + public int getInstanceTypeValue() { + return instanceType_; } - - 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. Delete time stamp
+     * Required. The type of the instance. Specified at creation time.
      * 
* * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the deleteTime field is set. + * @param value The enum numeric value on the wire for instanceType to set. + * @return This builder for chaining. */ - public boolean hasDeleteTime() { - return ((bitField0_ & 0x00000020) != 0); + public Builder setInstanceTypeValue(int value) { + instanceType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; } /** * * *
-     * Output only. Delete time stamp
+     * Required. The type of the instance. Specified at creation time.
      * 
* * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The deleteTime. + * @return The instanceType. */ - public com.google.protobuf.Timestamp getDeleteTime() { - if (deleteTimeBuilder_ == null) { - return deleteTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : deleteTime_; - } else { - return deleteTimeBuilder_.getMessage(); - } + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.InstanceType getInstanceType() { + com.google.cloud.alloydb.v1alpha.Instance.InstanceType result = + com.google.cloud.alloydb.v1alpha.Instance.InstanceType.forNumber(instanceType_); + return result == null + ? com.google.cloud.alloydb.v1alpha.Instance.InstanceType.UNRECOGNIZED + : result; } /** * * *
-     * Output only. Delete time stamp
+     * Required. The type of the instance. Specified at creation time.
      * 
* * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; * + * + * @param value The instanceType to set. + * @return This builder for chaining. */ - public Builder setDeleteTime(com.google.protobuf.Timestamp value) { - if (deleteTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deleteTime_ = value; - } else { - deleteTimeBuilder_.setMessage(value); + public Builder setInstanceType(com.google.cloud.alloydb.v1alpha.Instance.InstanceType value) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000100; + instanceType_ = value.getNumber(); onChanged(); return this; } @@ -9198,68 +15569,84 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Delete time stamp
+     * Required. The type of the instance. Specified at creation time.
      * 
* * - * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; * + * + * @return This builder for chaining. */ - public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (deleteTimeBuilder_ == null) { - deleteTime_ = builderForValue.build(); - } else { - deleteTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; + public Builder clearInstanceType() { + bitField0_ = (bitField0_ & ~0x00000100); + instanceType_ = 0; onChanged(); return this; } + + private com.google.cloud.alloydb.v1alpha.Instance.MachineConfig machineConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.MachineConfig, + com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.Builder, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.MachineConfig machine_config = 10; + * + * @return Whether the machineConfig field is set. */ - 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; - } + public boolean hasMachineConfig() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Configurations for the machines that host the underlying
+     * database engine.
+     * 
+ * + * .google.cloud.alloydb.v1alpha.Instance.MachineConfig machine_config = 10; + * + * @return The machineConfig. + */ + public com.google.cloud.alloydb.v1alpha.Instance.MachineConfig getMachineConfig() { + if (machineConfigBuilder_ == null) { + return machineConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.getDefaultInstance() + : machineConfig_; } else { - deleteTimeBuilder_.mergeFrom(value); + return machineConfigBuilder_.getMessage(); } - bitField0_ |= 0x00000020; - onChanged(); - return this; } /** * * *
-     * 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.v1alpha.Instance.MachineConfig machine_config = 10; */ - public Builder clearDeleteTime() { - bitField0_ = (bitField0_ & ~0x00000020); - deleteTime_ = null; - if (deleteTimeBuilder_ != null) { - deleteTimeBuilder_.dispose(); - deleteTimeBuilder_ = null; + public Builder setMachineConfig(com.google.cloud.alloydb.v1alpha.Instance.MachineConfig value) { + if (machineConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + machineConfig_ = value; + } else { + machineConfigBuilder_.setMessage(value); } + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -9267,264 +15654,330 @@ 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.v1alpha.Instance.MachineConfig machine_config = 10; */ - public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { - bitField0_ |= 0x00000020; + public Builder setMachineConfig( + com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.Builder builderForValue) { + if (machineConfigBuilder_ == null) { + machineConfig_ = builderForValue.build(); + } else { + machineConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; onChanged(); - return getDeleteTimeFieldBuilder().getBuilder(); + return this; } /** * * *
-     * 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.v1alpha.Instance.MachineConfig machine_config = 10; */ - public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { - if (deleteTimeBuilder_ != null) { - return deleteTimeBuilder_.getMessageOrBuilder(); + public Builder mergeMachineConfig( + com.google.cloud.alloydb.v1alpha.Instance.MachineConfig value) { + if (machineConfigBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && machineConfig_ != null + && machineConfig_ + != com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.getDefaultInstance()) { + getMachineConfigBuilder().mergeFrom(value); + } else { + machineConfig_ = value; + } } else { - return deleteTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : deleteTime_; + machineConfigBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000200; + onChanged(); + return this; } /** * * *
-     * 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.v1alpha.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_ = - 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(); + public Builder clearMachineConfig() { + bitField0_ = (bitField0_ & ~0x00000200); + machineConfig_ = null; + if (machineConfigBuilder_ != null) { + machineConfigBuilder_.dispose(); + machineConfigBuilder_ = null; } - bitField0_ |= 0x00000040; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); + onChanged(); + return this; } /** * * *
-     * Labels as key value pairs
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * map<string, string> labels = 7; + * .google.cloud.alloydb.v1alpha.Instance.MachineConfig machine_config = 10; */ - @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(); + public com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.Builder + getMachineConfigBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getMachineConfigFieldBuilder().getBuilder(); } /** * * *
-     * Labels as key value pairs
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * map<string, string> labels = 7; + * .google.cloud.alloydb.v1alpha.Instance.MachineConfig machine_config = 10; */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); + public com.google.cloud.alloydb.v1alpha.Instance.MachineConfigOrBuilder + getMachineConfigOrBuilder() { + if (machineConfigBuilder_ != null) { + return machineConfigBuilder_.getMessageOrBuilder(); + } else { + return machineConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.getDefaultInstance() + : machineConfig_; + } } /** * * *
-     * Labels as key value pairs
+     * Configurations for the machines that host the underlying
+     * database engine.
      * 
* - * map<string, string> labels = 7; + * .google.cloud.alloydb.v1alpha.Instance.MachineConfig machine_config = 10; */ - @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"); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.MachineConfig, + com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.MachineConfigOrBuilder> + getMachineConfigFieldBuilder() { + if (machineConfigBuilder_ == null) { + machineConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.MachineConfig, + com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.MachineConfigOrBuilder>( + getMachineConfig(), getParentForChildren(), isClean()); + machineConfig_ = null; } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + return machineConfigBuilder_; } + + 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; + * .google.cloud.alloydb.v1alpha.Instance.AvailabilityType availability_type = 11; + * + * @return The enum numeric value on the wire for 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 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.v1alpha.Instance.AvailabilityType availability_type = 11; + * + * @param value The enum numeric value on the wire for availabilityType to set. + * @return This builder for chaining. */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); + public Builder setAvailabilityTypeValue(int value) { + availabilityType_ = value; + bitField0_ |= 0x00000400; + onChanged(); return this; } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000040; - return internalGetMutableLabels().getMutableMap(); + /** + * + * + *
+     * 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.v1alpha.Instance.AvailabilityType availability_type = 11; + * + * @return The availabilityType. + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Instance.AvailabilityType getAvailabilityType() { + com.google.cloud.alloydb.v1alpha.Instance.AvailabilityType result = + com.google.cloud.alloydb.v1alpha.Instance.AvailabilityType.forNumber(availabilityType_); + return result == null + ? com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.AvailabilityType availability_type = 11; + * + * @param value The availabilityType to set. + * @return This builder for chaining. */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } + public Builder setAvailabilityType( + com.google.cloud.alloydb.v1alpha.Instance.AvailabilityType value) { if (value == null) { - throw new NullPointerException("map value"); + throw new NullPointerException(); } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000400; + availabilityType_ = value.getNumber(); + 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.v1alpha.Instance.AvailabilityType availability_type = 11; + * + * @return This builder for chaining. */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000040; + public Builder clearAvailabilityType() { + bitField0_ = (bitField0_ & ~0x00000400); + availabilityType_ = 0; + onChanged(); return this; } - private int state_ = 0; + private java.lang.Object gceZone_ = ""; /** * * *
-     * 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.v1alpha.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 gceZone. */ - @java.lang.Override - public int getStateValue() { - return state_; + 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; + } } /** * * *
-     * 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.v1alpha.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string gce_zone = 12; + * + * @return The bytes for gceZone. + */ + 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; + } + } + /** + * + * + *
+     * 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; * - * @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; } @@ -9532,249 +15985,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.v1alpha.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.v1alpha.Instance.State getState() { - com.google.cloud.alloydb.v1alpha.Instance.State result = - com.google.cloud.alloydb.v1alpha.Instance.State.forNumber(state_); - return result == null ? com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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. * - * - * .google.cloud.alloydb.v1alpha.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * * - * @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 clearState() { - bitField0_ = (bitField0_ & ~0x00000080); - state_ = 0; - onChanged(); - return this; + @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(); } - - 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.v1alpha.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 java.util.Map getDatabaseFlagsMap() { + return internalGetDatabaseFlags().getMap(); } /** * * *
-     * 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.
+     *
+     *
+     * 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.v1alpha.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED]; - * + * 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; + } + /** * - * @param value The enum numeric value on the wire for instanceType to set. - * @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 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.v1alpha.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.v1alpha.Instance.InstanceType getInstanceType() { - com.google.cloud.alloydb.v1alpha.Instance.InstanceType result = - com.google.cloud.alloydb.v1alpha.Instance.InstanceType.forNumber(instanceType_); - return result == null - ? com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.Instance.MachineConfig machineConfig_; + private com.google.cloud.alloydb.v1alpha.Instance.Node writableNode_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.MachineConfig, - com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.MachineConfigOrBuilder> - machineConfigBuilder_; + com.google.cloud.alloydb.v1alpha.Instance.Node, + com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1alpha.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.v1alpha.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The machineConfig. + * @return The writableNode. */ - public com.google.cloud.alloydb.v1alpha.Instance.MachineConfig getMachineConfig() { - if (machineConfigBuilder_ == null) { - return machineConfig_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.getDefaultInstance() - : machineConfig_; + public com.google.cloud.alloydb.v1alpha.Instance.Node getWritableNode() { + if (writableNodeBuilder_ == null) { + return writableNode_ == null + ? com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setMachineConfig(com.google.cloud.alloydb.v1alpha.Instance.MachineConfig value) { - if (machineConfigBuilder_ == null) { + public Builder setWritableNode(com.google.cloud.alloydb.v1alpha.Instance.Node value) { + if (writableNodeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - machineConfig_ = value; - } else { - machineConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * - * - *
-     * Configurations for the machines that host the underlying
-     * database engine.
-     * 
- * - * .google.cloud.alloydb.v1alpha.Instance.MachineConfig machine_config = 10; - */ - public Builder setMachineConfig( - com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.Builder builderForValue) { - if (machineConfigBuilder_ == null) { - machineConfig_ = builderForValue.build(); + writableNode_ = value; } else { - machineConfigBuilder_.setMessage(builderForValue.build()); + writableNodeBuilder_.setMessage(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -9782,47 +16363,22 @@ 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.v1alpha.Instance.MachineConfig machine_config = 10; + * + * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder mergeMachineConfig( - com.google.cloud.alloydb.v1alpha.Instance.MachineConfig value) { - if (machineConfigBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) - && machineConfig_ != null - && machineConfig_ - != com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.getDefaultInstance()) { - getMachineConfigBuilder().mergeFrom(value); - } else { - machineConfig_ = value; - } + public Builder setWritableNode( + com.google.cloud.alloydb.v1alpha.Instance.Node.Builder builderForValue) { + if (writableNodeBuilder_ == null) { + writableNode_ = builderForValue.build(); } else { - machineConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * - * - *
-     * Configurations for the machines that host the underlying
-     * database engine.
-     * 
- * - * .google.cloud.alloydb.v1alpha.Instance.MachineConfig machine_config = 10; - */ - public Builder clearMachineConfig() { - bitField0_ = (bitField0_ & ~0x00000200); - machineConfig_ = null; - if (machineConfigBuilder_ != null) { - machineConfigBuilder_.dispose(); - machineConfigBuilder_ = null; + writableNodeBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -9830,713 +16386,593 @@ public Builder clearMachineConfig() { * * *
-     * Configurations for the machines that host the underlying
-     * database engine.
-     * 
- * - * .google.cloud.alloydb.v1alpha.Instance.MachineConfig machine_config = 10; - */ - public com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.Builder - getMachineConfigBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return getMachineConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Configurations for the machines that host the underlying
-     * database engine.
-     * 
- * - * .google.cloud.alloydb.v1alpha.Instance.MachineConfig machine_config = 10; - */ - public com.google.cloud.alloydb.v1alpha.Instance.MachineConfigOrBuilder - getMachineConfigOrBuilder() { - if (machineConfigBuilder_ != null) { - return machineConfigBuilder_.getMessageOrBuilder(); - } else { - return machineConfig_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.getDefaultInstance() - : machineConfig_; - } - } - /** - * - * - *
-     * 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.v1alpha.Instance.MachineConfig machine_config = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.MachineConfig, - com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.MachineConfigOrBuilder> - getMachineConfigFieldBuilder() { - if (machineConfigBuilder_ == null) { - machineConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.MachineConfig, - com.google.cloud.alloydb.v1alpha.Instance.MachineConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.MachineConfigOrBuilder>( - getMachineConfig(), getParentForChildren(), isClean()); - machineConfig_ = null; + * + * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeWritableNode(com.google.cloud.alloydb.v1alpha.Instance.Node value) { + if (writableNodeBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && writableNode_ != null + && writableNode_ + != com.google.cloud.alloydb.v1alpha.Instance.Node.getDefaultInstance()) { + getWritableNodeBuilder().mergeFrom(value); + } else { + writableNode_ = value; + } + } else { + writableNodeBuilder_.mergeFrom(value); } - return machineConfigBuilder_; + bitField0_ |= 0x00002000; + onChanged(); + return this; } - - 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).
+     * Output only. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1alpha.Instance.AvailabilityType availability_type = 11; - * - * @return The enum numeric value on the wire for availabilityType. + * + * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public int getAvailabilityTypeValue() { - return availabilityType_; + public Builder clearWritableNode() { + bitField0_ = (bitField0_ & ~0x00002000); + writableNode_ = null; + if (writableNodeBuilder_ != null) { + writableNodeBuilder_.dispose(); + writableNodeBuilder_ = null; + } + 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. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1alpha.Instance.AvailabilityType availability_type = 11; - * - * @param value The enum numeric value on the wire for availabilityType to set. - * @return This builder for chaining. + * + * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setAvailabilityTypeValue(int value) { - availabilityType_ = value; - bitField0_ |= 0x00000400; + public com.google.cloud.alloydb.v1alpha.Instance.Node.Builder getWritableNodeBuilder() { + bitField0_ |= 0x00002000; onChanged(); - return this; + return getWritableNodeFieldBuilder().getBuilder(); } /** * * *
-     * 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. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1alpha.Instance.AvailabilityType availability_type = 11; - * - * @return The availabilityType. + * + * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public com.google.cloud.alloydb.v1alpha.Instance.AvailabilityType getAvailabilityType() { - com.google.cloud.alloydb.v1alpha.Instance.AvailabilityType result = - com.google.cloud.alloydb.v1alpha.Instance.AvailabilityType.forNumber(availabilityType_); - return result == null - ? com.google.cloud.alloydb.v1alpha.Instance.AvailabilityType.UNRECOGNIZED - : result; + public com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder getWritableNodeOrBuilder() { + if (writableNodeBuilder_ != null) { + return writableNodeBuilder_.getMessageOrBuilder(); + } else { + return writableNode_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.Node.getDefaultInstance() + : writableNode_; + } } /** * * *
-     * 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. This is set for the read-write VM of the PRIMARY instance
+     * only.
      * 
* - * .google.cloud.alloydb.v1alpha.Instance.AvailabilityType availability_type = 11; - * - * @param value The availabilityType to set. - * @return This builder for chaining. + * + * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setAvailabilityType( - com.google.cloud.alloydb.v1alpha.Instance.AvailabilityType value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.Node, + com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, + com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder> + getWritableNodeFieldBuilder() { + if (writableNodeBuilder_ == null) { + writableNodeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.Node, + com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, + com.google.cloud.alloydb.v1alpha.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; } - bitField0_ |= 0x00000400; - availabilityType_ = value.getNumber(); - onChanged(); - return this; } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.Node, + com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.AvailabilityType availability_type = 11; - * - * @return This builder for chaining. + * + * repeated .google.cloud.alloydb.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearAvailabilityType() { - bitField0_ = (bitField0_ & ~0x00000400); - availabilityType_ = 0; - onChanged(); - return this; + public java.util.List getNodesList() { + if (nodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodes_); + } else { + return nodesBuilder_.getMessageList(); + } } - - 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.v1alpha.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 int getNodesCount() { + if (nodesBuilder_ == null) { + return nodes_.size(); } else { - return (java.lang.String) ref; + return nodesBuilder_.getCount(); } } /** * * *
-     * 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.v1alpha.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 com.google.cloud.alloydb.v1alpha.Instance.Node getNodes(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); } else { - return (com.google.protobuf.ByteString) ref; + return nodesBuilder_.getMessage(index); } } /** * * *
-     * 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; + * + * repeated .google.cloud.alloydb.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setNodes(int index, com.google.cloud.alloydb.v1alpha.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; + } + /** + * * - * @param value The gceZone to set. - * @return This builder for chaining. + *
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.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 setNodes( + int index, com.google.cloud.alloydb.v1alpha.Instance.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.set(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.setMessage(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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearGceZone() { - gceZone_ = getDefaultInstance().getGceZone(); - bitField0_ = (bitField0_ & ~0x00000800); - onChanged(); + public Builder addNodes(com.google.cloud.alloydb.v1alpha.Instance.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(value); + onChanged(); + } else { + nodesBuilder_.addMessage(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; - * - * @param value The bytes for gceZone to set. - * @return This builder for chaining. + * + * repeated .google.cloud.alloydb.v1alpha.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 addNodes(int index, com.google.cloud.alloydb.v1alpha.Instance.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(index, value); + onChanged(); + } else { + nodesBuilder_.addMessage(index, value); } - 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.v1alpha.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 addNodes( + com.google.cloud.alloydb.v1alpha.Instance.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(builderForValue.build()); } - 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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - @java.lang.Override - public java.util.Map getDatabaseFlagsMap() { - return internalGetDatabaseFlags().getMap(); + public Builder addNodes( + int index, com.google.cloud.alloydb.v1alpha.Instance.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(index, builderForValue.build()); + } + 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.v1alpha.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 Builder addAllNodes( + java.lang.Iterable values) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); + onChanged(); + } else { + nodesBuilder_.addAllMessages(values); } - java.util.Map map = internalGetDatabaseFlags().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + 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.v1alpha.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 Builder clearNodes() { + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + } else { + nodesBuilder_.clear(); } - 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.v1alpha.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"); + public Builder removeNodes(int index) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.remove(index); + onChanged(); + } else { + nodesBuilder_.remove(index); } - internalGetMutableDatabaseFlags().getMutableMap().remove(key); return this; } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableDatabaseFlags() { - bitField0_ |= 0x00001000; - return internalGetMutableDatabaseFlags().getMutableMap(); - } /** * * *
-     * 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.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
+     * 
+ * + * + * repeated .google.cloud.alloydb.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.alloydb.v1alpha.Instance.Node.Builder getNodesBuilder(int index) { + return getNodesFieldBuilder().getBuilder(index); + } + /** * * - * 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.v1alpha.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"); + public com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder getNodesOrBuilder(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessageOrBuilder(index); } - internalGetMutableDatabaseFlags().getMutableMap().put(key, value); - bitField0_ |= 0x00001000; - 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.v1alpha.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 + getNodesOrBuilderList() { + if (nodesBuilder_ != null) { + return nodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodes_); + } } - - private com.google.cloud.alloydb.v1alpha.Instance.Node writableNode_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.Node, - com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, - com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder> - writableNodeBuilder_; /** * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.alloydb.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return Whether the writableNode field is set. */ - public boolean hasWritableNode() { - return ((bitField0_ & 0x00002000) != 0); + public com.google.cloud.alloydb.v1alpha.Instance.Node.Builder addNodesBuilder() { + return getNodesFieldBuilder() + .addBuilder(com.google.cloud.alloydb.v1alpha.Instance.Node.getDefaultInstance()); } /** * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.alloydb.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The writableNode. */ - public com.google.cloud.alloydb.v1alpha.Instance.Node getWritableNode() { - if (writableNodeBuilder_ == null) { - return writableNode_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.Node.getDefaultInstance() - : writableNode_; - } else { - return writableNodeBuilder_.getMessage(); - } + public com.google.cloud.alloydb.v1alpha.Instance.Node.Builder addNodesBuilder(int index) { + return getNodesFieldBuilder() + .addBuilder(index, com.google.cloud.alloydb.v1alpha.Instance.Node.getDefaultInstance()); } /** * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Output only. List of available read-only VMs in this instance, including
+     * the standby for a PRIMARY instance.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.alloydb.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setWritableNode(com.google.cloud.alloydb.v1alpha.Instance.Node value) { - if (writableNodeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - writableNode_ = value; - } else { - writableNodeBuilder_.setMessage(value); + public java.util.List + getNodesBuilderList() { + return getNodesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.Node, + com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, + com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder> + getNodesFieldBuilder() { + if (nodesBuilder_ == null) { + nodesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.Node, + com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, + com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder>( + nodes_, ((bitField0_ & 0x00004000) != 0), getParentForChildren(), isClean()); + nodes_ = null; } - bitField0_ |= 0x00002000; - onChanged(); - return this; + return nodesBuilder_; } + + private com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig + queryInsightsConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig, + com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig.Builder, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * + * + * @return Whether the queryInsightsConfig field is set. */ - public Builder setWritableNode( - com.google.cloud.alloydb.v1alpha.Instance.Node.Builder builderForValue) { - if (writableNodeBuilder_ == null) { - writableNode_ = builderForValue.build(); - } else { - writableNodeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00002000; - onChanged(); - return this; + 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.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * + * + * @return The queryInsightsConfig. */ - public Builder mergeWritableNode(com.google.cloud.alloydb.v1alpha.Instance.Node value) { - if (writableNodeBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) - && writableNode_ != null - && writableNode_ - != com.google.cloud.alloydb.v1alpha.Instance.Node.getDefaultInstance()) { - getWritableNodeBuilder().mergeFrom(value); - } else { - writableNode_ = value; - } + public com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig + getQueryInsightsConfig() { + if (queryInsightsConfigBuilder_ == null) { + return queryInsightsConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig + .getDefaultInstance() + : queryInsightsConfig_; } else { - writableNodeBuilder_.mergeFrom(value); + return queryInsightsConfigBuilder_.getMessage(); } - bitField0_ |= 0x00002000; - onChanged(); - return this; } /** * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public Builder clearWritableNode() { - bitField0_ = (bitField0_ & ~0x00002000); - writableNode_ = null; - if (writableNodeBuilder_ != null) { - writableNodeBuilder_.dispose(); - writableNodeBuilder_ = null; + public Builder setQueryInsightsConfig( + com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig value) { + if (queryInsightsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryInsightsConfig_ = value; + } else { + queryInsightsConfigBuilder_.setMessage(value); } + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -10544,616 +16980,580 @@ 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.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public com.google.cloud.alloydb.v1alpha.Instance.Node.Builder getWritableNodeBuilder() { - bitField0_ |= 0x00002000; + public Builder setQueryInsightsConfig( + com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig.Builder + builderForValue) { + if (queryInsightsConfigBuilder_ == null) { + queryInsightsConfig_ = builderForValue.build(); + } else { + queryInsightsConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; onChanged(); - return getWritableNodeFieldBuilder().getBuilder(); + return this; } /** * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder getWritableNodeOrBuilder() { - if (writableNodeBuilder_ != null) { - return writableNodeBuilder_.getMessageOrBuilder(); + public Builder mergeQueryInsightsConfig( + com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig value) { + if (queryInsightsConfigBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && queryInsightsConfig_ != null + && queryInsightsConfig_ + != com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig + .getDefaultInstance()) { + getQueryInsightsConfigBuilder().mergeFrom(value); + } else { + queryInsightsConfig_ = value; + } } else { - return writableNode_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.Node.getDefaultInstance() - : writableNode_; + queryInsightsConfigBuilder_.mergeFrom(value); } + bitField0_ |= 0x00008000; + onChanged(); + return this; } /** * * *
-     * Output only. This is set for the read-write VM of the PRIMARY instance
-     * only.
+     * Configuration for query insights.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.Node, - com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, - com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder> - getWritableNodeFieldBuilder() { - if (writableNodeBuilder_ == null) { - writableNodeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.Node, - com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, - com.google.cloud.alloydb.v1alpha.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; + public Builder clearQueryInsightsConfig() { + bitField0_ = (bitField0_ & ~0x00008000); + queryInsightsConfig_ = null; + if (queryInsightsConfigBuilder_ != null) { + queryInsightsConfigBuilder_.dispose(); + queryInsightsConfigBuilder_ = null; } + onChanged(); + return this; } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.Node, - com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, - com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder> - nodesBuilder_; - /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Configuration for query insights.
      * 
* * - * repeated .google.cloud.alloydb.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public java.util.List getNodesList() { - if (nodesBuilder_ == null) { - return java.util.Collections.unmodifiableList(nodes_); - } else { - return nodesBuilder_.getMessageList(); - } + public com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig.Builder + getQueryInsightsConfigBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getQueryInsightsConfigFieldBuilder().getBuilder(); } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Configuration for query insights.
      * 
* * - * repeated .google.cloud.alloydb.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public int getNodesCount() { - if (nodesBuilder_ == null) { - return nodes_.size(); + public com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfigOrBuilder + getQueryInsightsConfigOrBuilder() { + if (queryInsightsConfigBuilder_ != null) { + return queryInsightsConfigBuilder_.getMessageOrBuilder(); } else { - return nodesBuilder_.getCount(); + return queryInsightsConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig + .getDefaultInstance() + : queryInsightsConfig_; } } /** * * *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
+     * Configuration for query insights.
      * 
* * - * repeated .google.cloud.alloydb.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; * */ - public com.google.cloud.alloydb.v1alpha.Instance.Node getNodes(int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); - } else { - return nodesBuilder_.getMessage(index); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig, + com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfigOrBuilder> + getQueryInsightsConfigFieldBuilder() { + if (queryInsightsConfigBuilder_ == null) { + queryInsightsConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig, + com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfigOrBuilder>( + getQueryInsightsConfig(), getParentForChildren(), isClean()); + queryInsightsConfig_ = null; } + return queryInsightsConfigBuilder_; } + + private com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig readPoolConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig, + com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.Builder, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setNodes(int index, com.google.cloud.alloydb.v1alpha.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; - } - /** - * - * - *
-     * Output only. List of available read-only VMs in this instance, including
-     * the standby for a PRIMARY instance.
-     * 
+ * .google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; * - * - * repeated .google.cloud.alloydb.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @return Whether the readPoolConfig field is set. */ - public Builder setNodes( - int index, com.google.cloud.alloydb.v1alpha.Instance.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.set(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.setMessage(index, builderForValue.build()); - } - return this; + 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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; + * + * @return The readPoolConfig. */ - public Builder addNodes(com.google.cloud.alloydb.v1alpha.Instance.Node value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(value); - onChanged(); + public com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig getReadPoolConfig() { + if (readPoolConfigBuilder_ == null) { + return readPoolConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.getDefaultInstance() + : readPoolConfig_; } else { - nodesBuilder_.addMessage(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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder addNodes(int index, com.google.cloud.alloydb.v1alpha.Instance.Node value) { - if (nodesBuilder_ == null) { + public Builder setReadPoolConfig( + com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig value) { + if (readPoolConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureNodesIsMutable(); - nodes_.add(index, value); - onChanged(); + readPoolConfig_ = value; } else { - nodesBuilder_.addMessage(index, value); + 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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder addNodes( - com.google.cloud.alloydb.v1alpha.Instance.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(builderForValue.build()); - onChanged(); + public Builder setReadPoolConfig( + com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.Builder builderForValue) { + if (readPoolConfigBuilder_ == null) { + readPoolConfig_ = builderForValue.build(); } else { - nodesBuilder_.addMessage(builderForValue.build()); + 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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder addNodes( - int index, com.google.cloud.alloydb.v1alpha.Instance.Node.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(index, builderForValue.build()); - onChanged(); + public Builder mergeReadPoolConfig( + com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig value) { + if (readPoolConfigBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && readPoolConfig_ != null + && readPoolConfig_ + != com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.getDefaultInstance()) { + getReadPoolConfigBuilder().mergeFrom(value); + } else { + readPoolConfig_ = value; + } } else { - nodesBuilder_.addMessage(index, builderForValue.build()); + readPoolConfigBuilder_.mergeFrom(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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1alpha.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(); - } else { - nodesBuilder_.addAllMessages(values); + 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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder clearNodes() { - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00004000); - onChanged(); - } else { - nodesBuilder_.clear(); - } - return this; + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; */ - public Builder removeNodes(int index) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.remove(index); - onChanged(); + public com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfigOrBuilder + getReadPoolConfigOrBuilder() { + if (readPoolConfigBuilder_ != null) { + return readPoolConfigBuilder_.getMessageOrBuilder(); } else { - nodesBuilder_.remove(index); + return readPoolConfig_ == null + ? com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; */ - public com.google.cloud.alloydb.v1alpha.Instance.Node.Builder getNodesBuilder(int index) { - return getNodesFieldBuilder().getBuilder(index); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig, + com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfigOrBuilder> + getReadPoolConfigFieldBuilder() { + if (readPoolConfigBuilder_ == null) { + readPoolConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig, + com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfigOrBuilder>( + getReadPoolConfig(), getParentForChildren(), isClean()); + readPoolConfig_ = null; + } + 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.v1alpha.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ipAddress. */ - public com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder getNodesOrBuilder(int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); + 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 { - return nodesBuilder_.getMessageOrBuilder(index); + 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 IP address for the Instance.
+     * This is the connection endpoint for an end-user application.
      * 
* - * - * repeated .google.cloud.alloydb.v1alpha.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 java.util.List - getNodesOrBuilderList() { - if (nodesBuilder_ != null) { - return nodesBuilder_.getMessageOrBuilderList(); + 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 java.util.Collections.unmodifiableList(nodes_); + 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.v1alpha.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.v1alpha.Instance.Node.Builder addNodesBuilder() { - return getNodesFieldBuilder() - .addBuilder(com.google.cloud.alloydb.v1alpha.Instance.Node.getDefaultInstance()); + 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.v1alpha.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 com.google.cloud.alloydb.v1alpha.Instance.Node.Builder addNodesBuilder(int index) { - return getNodesFieldBuilder() - .addBuilder(index, com.google.cloud.alloydb.v1alpha.Instance.Node.getDefaultInstance()); + 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.v1alpha.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 java.util.List - getNodesBuilderList() { - return getNodesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.Node, - com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, - com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder> - getNodesFieldBuilder() { - if (nodesBuilder_ == null) { - nodesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.Node, - com.google.cloud.alloydb.v1alpha.Instance.Node.Builder, - com.google.cloud.alloydb.v1alpha.Instance.NodeOrBuilder>( - nodes_, ((bitField0_ & 0x00004000) != 0), getParentForChildren(), isClean()); - nodes_ = null; + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return nodesBuilder_; + checkByteStringIsUtf8(value); + ipAddress_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; } - private com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig - queryInsightsConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig, - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfigOrBuilder> - queryInsightsConfigBuilder_; + 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.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return Whether the queryInsightsConfig field is set. + * @return The reconciling. */ - public boolean hasQueryInsightsConfig() { - return ((bitField0_ & 0x00008000) != 0); + @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.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The queryInsightsConfig. + * @param value The reconciling to set. + * @return This builder for chaining. */ - public com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig - getQueryInsightsConfig() { - if (queryInsightsConfigBuilder_ == null) { - return queryInsightsConfig_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig - .getDefaultInstance() - : queryInsightsConfig_; - } else { - return queryInsightsConfigBuilder_.getMessage(); - } + public Builder setReconciling(boolean value) { + + reconciling_ = value; + bitField0_ |= 0x00040000; + 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.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - public Builder setQueryInsightsConfig( - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig value) { - if (queryInsightsConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - queryInsightsConfig_ = value; - } else { - queryInsightsConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00008000; + public Builder clearReconciling() { + bitField0_ = (bitField0_ & ~0x00040000); + 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.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * string etag = 17; + * + * @return The etag. */ - public Builder setQueryInsightsConfig( - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig.Builder - builderForValue) { - if (queryInsightsConfigBuilder_ == null) { - queryInsightsConfig_ = builderForValue.build(); + 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 { - queryInsightsConfigBuilder_.setMessage(builderForValue.build()); + return (java.lang.String) ref; } - bitField0_ |= 0x00008000; - onChanged(); - return this; } /** * * *
-     * Configuration for query insights.
+     * For Resource freshness validation (https://google.aip.dev/154)
      * 
* - * - * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * string etag = 17; + * + * @return The bytes for etag. */ - public Builder mergeQueryInsightsConfig( - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig value) { - if (queryInsightsConfigBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) - && queryInsightsConfig_ != null - && queryInsightsConfig_ - != com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig - .getDefaultInstance()) { - getQueryInsightsConfigBuilder().mergeFrom(value); - } else { - queryInsightsConfig_ = value; - } + 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 { - queryInsightsConfigBuilder_.mergeFrom(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00008000; - onChanged(); - return this; } /** * * *
-     * Configuration for query insights.
+     * For Resource freshness validation (https://google.aip.dev/154)
      * 
* - * - * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * string etag = 17; + * + * @param value The etag to set. + * @return This builder for chaining. */ - public Builder clearQueryInsightsConfig() { - bitField0_ = (bitField0_ & ~0x00008000); - queryInsightsConfig_ = null; - if (queryInsightsConfigBuilder_ != null) { - queryInsightsConfigBuilder_.dispose(); - queryInsightsConfigBuilder_ = null; + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + etag_ = value; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -11161,324 +17561,364 @@ public Builder clearQueryInsightsConfig() { * * *
-     * Configuration for query insights.
+     * For Resource freshness validation (https://google.aip.dev/154)
      * 
* - * - * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * string etag = 17; + * + * @return This builder for chaining. */ - public com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig.Builder - getQueryInsightsConfigBuilder() { - bitField0_ |= 0x00008000; + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00080000); onChanged(); - return getQueryInsightsConfigFieldBuilder().getBuilder(); + return this; } /** * * *
-     * Configuration for query insights.
+     * For Resource freshness validation (https://google.aip.dev/154)
      * 
* - * - * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * + * string etag = 17; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. */ - public com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfigOrBuilder - getQueryInsightsConfigOrBuilder() { - if (queryInsightsConfigBuilder_ != null) { - return queryInsightsConfigBuilder_.getMessageOrBuilder(); - } else { - return queryInsightsConfig_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig - .getDefaultInstance() - : queryInsightsConfig_; + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; } - /** - * - * - *
-     * Configuration for query insights.
-     * 
- * - * - * .google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig query_insights_config = 21; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig, - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfigOrBuilder> - getQueryInsightsConfigFieldBuilder() { - if (queryInsightsConfigBuilder_ == null) { - queryInsightsConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig, - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.QueryInsightsInstanceConfigOrBuilder>( - getQueryInsightsConfig(), getParentForChildren(), isClean()); - queryInsightsConfig_ = null; + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); } - return queryInsightsConfigBuilder_; + 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_ |= 0x00100000; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); } - - private com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig readPoolConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig, - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfigOrBuilder> - readPoolConfigBuilder_; /** * * *
-     * 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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; - * - * @return Whether the readPoolConfig field is set. + * map<string, string> annotations = 18; */ - public boolean hasReadPoolConfig() { - return ((bitField0_ & 0x00010000) != 0); + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + 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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; + * map<string, string> annotations = 18; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** * - * @return The readPoolConfig. + * + *
+     * 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 com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig getReadPoolConfig() { - if (readPoolConfigBuilder_ == null) { - return readPoolConfig_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.getDefaultInstance() - : readPoolConfig_; - } else { - return readPoolConfigBuilder_.getMessage(); + @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"); } + 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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; + * map<string, string> annotations = 18; */ - public Builder setReadPoolConfig( - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig value) { - if (readPoolConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readPoolConfig_ = value; - } else { - readPoolConfigBuilder_.setMessage(value); + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00010000; - 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_ & ~0x00100000); + 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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; + * map<string, string> annotations = 18; */ - public Builder setReadPoolConfig( - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.Builder builderForValue) { - if (readPoolConfigBuilder_ == null) { - readPoolConfig_ = builderForValue.build(); - } else { - readPoolConfigBuilder_.setMessage(builderForValue.build()); + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00010000; - onChanged(); + internalGetMutableAnnotations().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00100000; + 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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; + * map<string, string> annotations = 18; */ - public Builder mergeReadPoolConfig( - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig value) { - if (readPoolConfigBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) - && readPoolConfig_ != null - && readPoolConfig_ - != com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.getDefaultInstance()) { - getReadPoolConfigBuilder().mergeFrom(value); - } else { - readPoolConfig_ = value; - } - } else { - readPoolConfigBuilder_.mergeFrom(value); + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00010000; - onChanged(); + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00100000; 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.v1alpha.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; - } - onChanged(); + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00100000; return this; } + + private com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy updatePolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy, + com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; + * .google.cloud.alloydb.v1alpha.Instance.UpdatePolicy update_policy = 22; + * + * @return Whether the updatePolicy field is set. */ - public com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.Builder - getReadPoolConfigBuilder() { - bitField0_ |= 0x00010000; - onChanged(); - return getReadPoolConfigFieldBuilder().getBuilder(); + public boolean hasUpdatePolicy() { + return ((bitField0_ & 0x00200000) != 0); } /** * * *
-     * 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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; + * .google.cloud.alloydb.v1alpha.Instance.UpdatePolicy update_policy = 22; + * + * @return The updatePolicy. */ - public com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfigOrBuilder - getReadPoolConfigOrBuilder() { - if (readPoolConfigBuilder_ != null) { - return readPoolConfigBuilder_.getMessageOrBuilder(); + public com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy getUpdatePolicy() { + if (updatePolicyBuilder_ == null) { + return updatePolicy_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.getDefaultInstance() + : updatePolicy_; } else { - return readPoolConfig_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.getDefaultInstance() - : readPoolConfig_; + return updatePolicyBuilder_.getMessage(); } } /** * * *
-     * 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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; + * .google.cloud.alloydb.v1alpha.Instance.UpdatePolicy update_policy = 22; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig, - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfigOrBuilder> - getReadPoolConfigFieldBuilder() { - if (readPoolConfigBuilder_ == null) { - readPoolConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig, - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.ReadPoolConfigOrBuilder>( - getReadPoolConfig(), getParentForChildren(), isClean()); - readPoolConfig_ = null; + public Builder setUpdatePolicy(com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy value) { + if (updatePolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updatePolicy_ = value; + } else { + updatePolicyBuilder_.setMessage(value); } - return readPoolConfigBuilder_; + bitField0_ |= 0x00200000; + onChanged(); + return this; } - - 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]; - * - * @return The ipAddress. - */ - 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; + * .google.cloud.alloydb.v1alpha.Instance.UpdatePolicy update_policy = 22; + */ + public Builder setUpdatePolicy( + com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder builderForValue) { + if (updatePolicyBuilder_ == null) { + updatePolicy_ = builderForValue.build(); } else { - return (java.lang.String) ref; + updatePolicyBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00200000; + 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]; - * - * @return The bytes for ipAddress. + * .google.cloud.alloydb.v1alpha.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 mergeUpdatePolicy(com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy value) { + if (updatePolicyBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) + && updatePolicy_ != null + && updatePolicy_ + != com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.getDefaultInstance()) { + getUpdatePolicyBuilder().mergeFrom(value); + } else { + updatePolicy_ = value; + } } else { - return (com.google.protobuf.ByteString) ref; + updatePolicyBuilder_.mergeFrom(value); } + bitField0_ |= 0x00200000; + 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.v1alpha.Instance.UpdatePolicy update_policy = 22; */ - public Builder setIpAddress(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearUpdatePolicy() { + bitField0_ = (bitField0_ & ~0x00200000); + updatePolicy_ = null; + if (updatePolicyBuilder_ != null) { + updatePolicyBuilder_.dispose(); + updatePolicyBuilder_ = null; } - ipAddress_ = value; - bitField0_ |= 0x00020000; onChanged(); return this; } @@ -11486,172 +17926,211 @@ 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.v1alpha.Instance.UpdatePolicy update_policy = 22; */ - public Builder clearIpAddress() { - ipAddress_ = getDefaultInstance().getIpAddress(); - bitField0_ = (bitField0_ & ~0x00020000); + public com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder getUpdatePolicyBuilder() { + bitField0_ |= 0x00200000; onChanged(); - return this; + return getUpdatePolicyFieldBuilder().getBuilder(); } /** * * *
-     * 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.v1alpha.Instance.UpdatePolicy update_policy = 22; + */ + public com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicyOrBuilder + getUpdatePolicyOrBuilder() { + if (updatePolicyBuilder_ != null) { + return updatePolicyBuilder_.getMessageOrBuilder(); + } else { + return updatePolicy_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.getDefaultInstance() + : updatePolicy_; + } + } + /** * - * @param value The bytes for ipAddress to set. - * @return This builder for chaining. + * + *
+     * 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.v1alpha.Instance.UpdatePolicy update_policy = 22; */ - public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy, + com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder, + com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicyOrBuilder> + getUpdatePolicyFieldBuilder() { + if (updatePolicyBuilder_ == null) { + updatePolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy, + com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder, + com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicyOrBuilder>( + getUpdatePolicy(), getParentForChildren(), isClean()); + updatePolicy_ = null; } - checkByteStringIsUtf8(value); - ipAddress_ = value; - bitField0_ |= 0x00020000; - onChanged(); - return this; + return updatePolicyBuilder_; } - private boolean reconciling_; + private com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig + clientConnectionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig, + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfigOrBuilder> + clientConnectionConfigBuilder_; /** * * *
-     * 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.
+     * Optional. Client connection specific configurations
      * 
* - * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The reconciling. + * @return Whether the clientConnectionConfig field is set. */ - @java.lang.Override - public boolean getReconciling() { - return reconciling_; + public boolean hasClientConnectionConfig() { + return ((bitField0_ & 0x00400000) != 0); } /** * * *
-     * 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.
+     * Optional. Client connection specific configurations
      * 
* - * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The reconciling to set. - * @return This builder for chaining. + * @return The clientConnectionConfig. */ - public Builder setReconciling(boolean value) { - - reconciling_ = value; - bitField0_ |= 0x00040000; - onChanged(); - return this; + public com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig + getClientConnectionConfig() { + if (clientConnectionConfigBuilder_ == null) { + return clientConnectionConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.getDefaultInstance() + : clientConnectionConfig_; + } else { + return clientConnectionConfigBuilder_.getMessage(); + } } /** * * *
-     * 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.
+     * Optional. Client connection specific configurations
      * 
* - * bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. + * + * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearReconciling() { - bitField0_ = (bitField0_ & ~0x00040000); - reconciling_ = false; + public Builder setClientConnectionConfig( + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig value) { + if (clientConnectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clientConnectionConfig_ = value; + } else { + clientConnectionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; onChanged(); return this; } - - private java.lang.Object etag_ = ""; /** * * *
-     * For Resource freshness validation (https://google.aip.dev/154)
+     * Optional. Client connection specific configurations
      * 
* - * string etag = 17; - * - * @return The etag. + * + * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ - 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; + public Builder setClientConnectionConfig( + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.Builder builderForValue) { + if (clientConnectionConfigBuilder_ == null) { + clientConnectionConfig_ = builderForValue.build(); } else { - return (java.lang.String) ref; + clientConnectionConfigBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00400000; + onChanged(); + return this; } /** * * *
-     * For Resource freshness validation (https://google.aip.dev/154)
+     * Optional. Client connection specific configurations
      * 
* - * string etag = 17; - * - * @return The bytes for etag. + * + * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ - 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 Builder mergeClientConnectionConfig( + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig value) { + if (clientConnectionConfigBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) + && clientConnectionConfig_ != null + && clientConnectionConfig_ + != com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig + .getDefaultInstance()) { + getClientConnectionConfigBuilder().mergeFrom(value); + } else { + clientConnectionConfig_ = value; + } } else { - return (com.google.protobuf.ByteString) ref; + clientConnectionConfigBuilder_.mergeFrom(value); } + bitField0_ |= 0x00400000; + onChanged(); + return this; } /** * * *
-     * 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.v1alpha.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 clearClientConnectionConfig() { + bitField0_ = (bitField0_ & ~0x00400000); + clientConnectionConfig_ = null; + if (clientConnectionConfigBuilder_ != null) { + clientConnectionConfigBuilder_.dispose(); + clientConnectionConfigBuilder_ = null; } - etag_ = value; - bitField0_ |= 0x00080000; onChanged(); return this; } @@ -11659,290 +18138,243 @@ 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.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearEtag() { - etag_ = getDefaultInstance().getEtag(); - bitField0_ = (bitField0_ & ~0x00080000); + public com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.Builder + getClientConnectionConfigBuilder() { + bitField0_ |= 0x00400000; onChanged(); - return this; + return getClientConnectionConfigFieldBuilder().getBuilder(); } /** * * *
-     * 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.v1alpha.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); - } - if (!annotations_.isMutable()) { - annotations_ = annotations_.copy(); + public com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfigOrBuilder + getClientConnectionConfigOrBuilder() { + if (clientConnectionConfigBuilder_ != null) { + return clientConnectionConfigBuilder_.getMessageOrBuilder(); + } else { + return clientConnectionConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.getDefaultInstance() + : clientConnectionConfig_; } - bitField0_ |= 0x00100000; - onChanged(); - return annotations_; - } - - public int getAnnotationsCount() { - return internalGetAnnotations().getMap().size(); } /** * * *
-     * 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.v1alpha.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"); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig, + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfigOrBuilder> + getClientConnectionConfigFieldBuilder() { + if (clientConnectionConfigBuilder_ == null) { + clientConnectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig, + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfigOrBuilder>( + getClientConnectionConfig(), getParentForChildren(), isClean()); + clientConnectionConfig_ = null; } - return internalGetAnnotations().getMap().containsKey(key); - } - /** Use {@link #getAnnotationsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAnnotations() { - return getAnnotationsMap(); + return clientConnectionConfigBuilder_; } + + private boolean satisfiesPzi_; /** * * *
-     * 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_pzi = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. */ @java.lang.Override - public java.util.Map getAnnotationsMap() { - return internalGetAnnotations().getMap(); + public boolean getSatisfiesPzi() { + return satisfiesPzi_; } /** * * *
-     * 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_pzi = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzi to set. + * @return This builder for chaining. */ - @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"); - } - java.util.Map map = internalGetAnnotations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + public Builder setSatisfiesPzi(boolean value) { + + satisfiesPzi_ = value; + bitField0_ |= 0x00800000; + 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_pzi = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - @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(); - } - return map.get(key); - } - - public Builder clearAnnotations() { - bitField0_ = (bitField0_ & ~0x00100000); - internalGetMutableAnnotations().getMutableMap().clear(); + public Builder clearSatisfiesPzi() { + bitField0_ = (bitField0_ & ~0x00800000); + satisfiesPzi_ = false; + onChanged(); 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.v1alpha.Instance.UpdatePolicy updatePolicy_; + private com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig pscInstanceConfig_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy, - com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder, - com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicyOrBuilder> - updatePolicyBuilder_; + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig, + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig.Builder, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1alpha.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.v1alpha.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The updatePolicy. + * @return The pscInstanceConfig. */ - public com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy getUpdatePolicy() { - if (updatePolicyBuilder_ == null) { - return updatePolicy_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.getDefaultInstance() - : updatePolicy_; + public com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig getPscInstanceConfig() { + if (pscInstanceConfigBuilder_ == null) { + return pscInstanceConfig_ == null + ? com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setUpdatePolicy(com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy value) { - if (updatePolicyBuilder_ == null) { + public Builder setPscInstanceConfig( + com.google.cloud.alloydb.v1alpha.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; } @@ -11950,22 +18382,22 @@ public Builder setUpdatePolicy(com.google.cloud.alloydb.v1alpha.Instance.UpdateP * * *
-     * 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.v1alpha.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setUpdatePolicy( - com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder builderForValue) { - if (updatePolicyBuilder_ == null) { - updatePolicy_ = builderForValue.build(); + public Builder setPscInstanceConfig( + com.google.cloud.alloydb.v1alpha.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; } @@ -11973,28 +18405,30 @@ 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.v1alpha.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder mergeUpdatePolicy(com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy value) { - if (updatePolicyBuilder_ == null) { - if (((bitField0_ & 0x00200000) != 0) - && updatePolicy_ != null - && updatePolicy_ - != com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.getDefaultInstance()) { - getUpdatePolicyBuilder().mergeFrom(value); + public Builder mergePscInstanceConfig( + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig value) { + if (pscInstanceConfigBuilder_ == null) { + if (((bitField0_ & 0x02000000) != 0) + && pscInstanceConfig_ != null + && pscInstanceConfig_ + != com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig + .getDefaultInstance()) { + getPscInstanceConfigBuilder().mergeFrom(value); } else { - updatePolicy_ = value; + pscInstanceConfig_ = value; } } else { - updatePolicyBuilder_.mergeFrom(value); + pscInstanceConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -12002,20 +18436,20 @@ public Builder mergeUpdatePolicy(com.google.cloud.alloydb.v1alpha.Instance.Updat * * *
-     * 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.v1alpha.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1alpha.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; @@ -12024,138 +18458,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.v1alpha.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder getUpdatePolicyBuilder() { - bitField0_ |= 0x00200000; + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicyOrBuilder - getUpdatePolicyOrBuilder() { - if (updatePolicyBuilder_ != null) { - return updatePolicyBuilder_.getMessageOrBuilder(); + public com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfigOrBuilder + getPscInstanceConfigOrBuilder() { + if (pscInstanceConfigBuilder_ != null) { + return pscInstanceConfigBuilder_.getMessageOrBuilder(); } else { - return updatePolicy_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.getDefaultInstance() - : updatePolicy_; + return pscInstanceConfig_ == null + ? com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.UpdatePolicy update_policy = 22; + * + * .google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy, - com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder, - com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicyOrBuilder> - getUpdatePolicyFieldBuilder() { - if (updatePolicyBuilder_ == null) { - updatePolicyBuilder_ = + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig, + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfigOrBuilder> + getPscInstanceConfigFieldBuilder() { + if (pscInstanceConfigBuilder_ == null) { + pscInstanceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy, - com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicy.Builder, - com.google.cloud.alloydb.v1alpha.Instance.UpdatePolicyOrBuilder>( - getUpdatePolicy(), getParentForChildren(), isClean()); - updatePolicy_ = null; + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig, + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfigOrBuilder>( + getPscInstanceConfig(), getParentForChildren(), isClean()); + pscInstanceConfig_ = null; } - return updatePolicyBuilder_; + return pscInstanceConfigBuilder_; } - private com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig - clientConnectionConfig_; + private com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig networkConfig_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig, - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfigOrBuilder> - clientConnectionConfigBuilder_; + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfigOrBuilder> + networkConfigBuilder_; /** * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1alpha.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.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The clientConnectionConfig. + * @return The networkConfig. */ - public com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig - getClientConnectionConfig() { - if (clientConnectionConfigBuilder_ == null) { - return clientConnectionConfig_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.getDefaultInstance() - : clientConnectionConfig_; + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.getDefaultInstance() + : networkConfig_; } else { - return clientConnectionConfigBuilder_.getMessage(); + return networkConfigBuilder_.getMessage(); } } /** * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setClientConnectionConfig( - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig value) { - if (clientConnectionConfigBuilder_ == null) { + public Builder setNetworkConfig( + com.google.cloud.alloydb.v1alpha.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; } @@ -12163,21 +18596,21 @@ public Builder setClientConnectionConfig( * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setClientConnectionConfig( - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.Builder builderForValue) { - if (clientConnectionConfigBuilder_ == null) { - clientConnectionConfig_ = builderForValue.build(); + public Builder setNetworkConfig( + com.google.cloud.alloydb.v1alpha.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; } @@ -12185,29 +18618,29 @@ public Builder setClientConnectionConfig( * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeClientConnectionConfig( - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig value) { - if (clientConnectionConfigBuilder_ == null) { - if (((bitField0_ & 0x00400000) != 0) - && clientConnectionConfig_ != null - && clientConnectionConfig_ - != com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig + public Builder mergeNetworkConfig( + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (((bitField0_ & 0x04000000) != 0) + && networkConfig_ != null + && networkConfig_ + != com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig .getDefaultInstance()) { - getClientConnectionConfigBuilder().mergeFrom(value); + getNetworkConfigBuilder().mergeFrom(value); } else { - clientConnectionConfig_ = value; + networkConfig_ = value; } } else { - clientConnectionConfigBuilder_.mergeFrom(value); + networkConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00400000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -12215,19 +18648,19 @@ public Builder mergeClientConnectionConfig( * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1alpha.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; @@ -12236,119 +18669,66 @@ public Builder clearClientConnectionConfig() { * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.Builder - getClientConnectionConfigBuilder() { - bitField0_ |= 0x00400000; + public com.google.cloud.alloydb.v1alpha.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.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfigOrBuilder - getClientConnectionConfigOrBuilder() { - if (clientConnectionConfigBuilder_ != null) { - return clientConnectionConfigBuilder_.getMessageOrBuilder(); + public com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfigOrBuilder + getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); } else { - return clientConnectionConfig_ == null - ? com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.getDefaultInstance() - : clientConnectionConfig_; + return networkConfig_ == null + ? com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.getDefaultInstance() + : networkConfig_; } } /** * * *
-     * Optional. Client connection specific configurations
+     * Optional. Instance level network configuration.
      * 
* * - * .google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig client_connection_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig, - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfigOrBuilder> - getClientConnectionConfigFieldBuilder() { - if (clientConnectionConfigBuilder_ == null) { - clientConnectionConfigBuilder_ = + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig, - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfig.Builder, - com.google.cloud.alloydb.v1alpha.Instance.ClientConnectionConfigOrBuilder>( - getClientConnectionConfig(), getParentForChildren(), isClean()); - clientConnectionConfig_ = null; + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig.Builder, + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfigOrBuilder>( + getNetworkConfig(), getParentForChildren(), isClean()); + networkConfig_ = null; } - return clientConnectionConfigBuilder_; - } - - private boolean satisfiesPzs_; - /** - * - * - *
-     * Reserved for future use.
-     * 
- * - * bool satisfies_pzs = 24; - * - * @return The satisfiesPzs. - */ - @java.lang.Override - public boolean getSatisfiesPzs() { - return satisfiesPzs_; - } - /** - * - * - *
-     * Reserved for future use.
-     * 
- * - * bool satisfies_pzs = 24; - * - * @param value The satisfiesPzs to set. - * @return This builder for chaining. - */ - public Builder setSatisfiesPzs(boolean value) { - - satisfiesPzs_ = value; - bitField0_ |= 0x00800000; - onChanged(); - return this; - } - /** - * - * - *
-     * Reserved for future use.
-     * 
- * - * bool satisfies_pzs = 24; - * - * @return This builder for chaining. - */ - public Builder clearSatisfiesPzs() { - bitField0_ = (bitField0_ & ~0x00800000); - satisfiesPzs_ = false; - onChanged(); - return this; + return networkConfigBuilder_; } @java.lang.Override 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 ddf64aaf66ed..051d835c4a85 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 @@ -734,7 +734,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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; @@ -746,7 +747,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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; @@ -758,7 +760,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.v1alpha.Instance.ReadPoolConfig read_pool_config = 14; @@ -992,12 +995,112 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Reserved for future use.
+   * Output only. Reserved for future use.
    * 
* - * bool satisfies_pzs = 24; + * bool satisfies_pzi = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + boolean getSatisfiesPzi(); + + /** + * + * + *
+   * 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.v1alpha.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.v1alpha.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pscInstanceConfig. + */ + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig getPscInstanceConfig(); + /** + * + * + *
+   * Optional. The configuration for Private Service Connect (PSC) for the
+   * instance.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Instance.PscInstanceConfig psc_instance_config = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1alpha.Instance.PscInstanceConfigOrBuilder + getPscInstanceConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Instance level network configuration.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.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.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkConfig. + */ + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig getNetworkConfig(); + /** + * + * + *
+   * Optional. Instance level network configuration.
+   * 
+ * + * + * .google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.alloydb.v1alpha.Instance.InstanceNetworkConfigOrBuilder + getNetworkConfigOrBuilder(); } diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesRequest.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesRequest.java new file mode 100644 index 000000000000..c31b4debcf39 --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesRequest.java @@ -0,0 +1,1129 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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/v1alpha/service.proto + +package com.google.cloud.alloydb.v1alpha; + +/** + * + * + *
+ * Message for requesting list of Databases.
+ * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1alpha.ListDatabasesRequest} + */ +public final class ListDatabasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1alpha.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.v1alpha.ServiceProto + .internal_static_google_cloud_alloydb_v1alpha_ListDatabasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ServiceProto + .internal_static_google_cloud_alloydb_v1alpha_ListDatabasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.ListDatabasesRequest.class, + com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesRequest)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1alpha.ListDatabasesRequest other = + (com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.ListDatabasesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1alpha.ListDatabasesRequest) + com.google.cloud.alloydb.v1alpha.ListDatabasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1alpha.ServiceProto + .internal_static_google_cloud_alloydb_v1alpha_ListDatabasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ServiceProto + .internal_static_google_cloud_alloydb_v1alpha_ListDatabasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.ListDatabasesRequest.class, + com.google.cloud.alloydb.v1alpha.ListDatabasesRequest.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1alpha.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.v1alpha.ServiceProto + .internal_static_google_cloud_alloydb_v1alpha_ListDatabasesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.ListDatabasesRequest getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1alpha.ListDatabasesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.ListDatabasesRequest build() { + com.google.cloud.alloydb.v1alpha.ListDatabasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.ListDatabasesRequest buildPartial() { + com.google.cloud.alloydb.v1alpha.ListDatabasesRequest result = + new com.google.cloud.alloydb.v1alpha.ListDatabasesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesRequest) { + return mergeFrom((com.google.cloud.alloydb.v1alpha.ListDatabasesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.ListDatabasesRequest other) { + if (other == com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1alpha.ListDatabasesRequest) + private static final com.google.cloud.alloydb.v1alpha.ListDatabasesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1alpha.ListDatabasesRequest(); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesRequestOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesRequestOrBuilder.java new file mode 100644 index 000000000000..2385355e8166 --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesRequestOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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/v1alpha/service.proto + +package com.google.cloud.alloydb.v1alpha; + +public interface ListDatabasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1alpha.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-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesResponse.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesResponse.java new file mode 100644 index 000000000000..19f603e61c82 --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesResponse.java @@ -0,0 +1,1125 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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/v1alpha/service.proto + +package com.google.cloud.alloydb.v1alpha; + +/** + * + * + *
+ * Message for response to listing Databases.
+ * 
+ * + * Protobuf type {@code google.cloud.alloydb.v1alpha.ListDatabasesResponse} + */ +public final class ListDatabasesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1alpha.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.v1alpha.ServiceProto + .internal_static_google_cloud_alloydb_v1alpha_ListDatabasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ServiceProto + .internal_static_google_cloud_alloydb_v1alpha_ListDatabasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.ListDatabasesResponse.class, + com.google.cloud.alloydb.v1alpha.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.v1alpha.Database databases = 1; + */ + @java.lang.Override + public java.util.List getDatabasesList() { + return databases_; + } + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + @java.lang.Override + public java.util.List + getDatabasesOrBuilderList() { + return databases_; + } + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + @java.lang.Override + public int getDatabasesCount() { + return databases_.size(); + } + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.Database getDatabases(int index) { + return databases_.get(index); + } + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesResponse)) { + return super.equals(obj); + } + com.google.cloud.alloydb.v1alpha.ListDatabasesResponse other = + (com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.ListDatabasesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1alpha.ListDatabasesResponse) + com.google.cloud.alloydb.v1alpha.ListDatabasesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.alloydb.v1alpha.ServiceProto + .internal_static_google_cloud_alloydb_v1alpha_ListDatabasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.alloydb.v1alpha.ServiceProto + .internal_static_google_cloud_alloydb_v1alpha_ListDatabasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.alloydb.v1alpha.ListDatabasesResponse.class, + com.google.cloud.alloydb.v1alpha.ListDatabasesResponse.Builder.class); + } + + // Construct using com.google.cloud.alloydb.v1alpha.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.v1alpha.ServiceProto + .internal_static_google_cloud_alloydb_v1alpha_ListDatabasesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.ListDatabasesResponse getDefaultInstanceForType() { + return com.google.cloud.alloydb.v1alpha.ListDatabasesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.ListDatabasesResponse build() { + com.google.cloud.alloydb.v1alpha.ListDatabasesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.alloydb.v1alpha.ListDatabasesResponse buildPartial() { + com.google.cloud.alloydb.v1alpha.ListDatabasesResponse result = + new com.google.cloud.alloydb.v1alpha.ListDatabasesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.ListDatabasesResponse) { + return mergeFrom((com.google.cloud.alloydb.v1alpha.ListDatabasesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.alloydb.v1alpha.ListDatabasesResponse other) { + if (other == com.google.cloud.alloydb.v1alpha.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.v1alpha.Database m = + input.readMessage( + com.google.cloud.alloydb.v1alpha.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.v1alpha.Database, + com.google.cloud.alloydb.v1alpha.Database.Builder, + com.google.cloud.alloydb.v1alpha.DatabaseOrBuilder> + databasesBuilder_; + + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1alpha.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.v1alpha.Database databases = 1; + */ + public int getDatabasesCount() { + if (databasesBuilder_ == null) { + return databases_.size(); + } else { + return databasesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + public com.google.cloud.alloydb.v1alpha.Database getDatabases(int index) { + if (databasesBuilder_ == null) { + return databases_.get(index); + } else { + return databasesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + public Builder setDatabases(int index, com.google.cloud.alloydb.v1alpha.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.v1alpha.Database databases = 1; + */ + public Builder setDatabases( + int index, com.google.cloud.alloydb.v1alpha.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.v1alpha.Database databases = 1; + */ + public Builder addDatabases(com.google.cloud.alloydb.v1alpha.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.v1alpha.Database databases = 1; + */ + public Builder addDatabases(int index, com.google.cloud.alloydb.v1alpha.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.v1alpha.Database databases = 1; + */ + public Builder addDatabases(com.google.cloud.alloydb.v1alpha.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.v1alpha.Database databases = 1; + */ + public Builder addDatabases( + int index, com.google.cloud.alloydb.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.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.v1alpha.Database databases = 1; + */ + public com.google.cloud.alloydb.v1alpha.Database.Builder getDatabasesBuilder(int index) { + return getDatabasesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + public com.google.cloud.alloydb.v1alpha.DatabaseOrBuilder getDatabasesOrBuilder(int index) { + if (databasesBuilder_ == null) { + return databases_.get(index); + } else { + return databasesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1alpha.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.v1alpha.Database databases = 1; + */ + public com.google.cloud.alloydb.v1alpha.Database.Builder addDatabasesBuilder() { + return getDatabasesFieldBuilder() + .addBuilder(com.google.cloud.alloydb.v1alpha.Database.getDefaultInstance()); + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + public com.google.cloud.alloydb.v1alpha.Database.Builder addDatabasesBuilder(int index) { + return getDatabasesFieldBuilder() + .addBuilder(index, com.google.cloud.alloydb.v1alpha.Database.getDefaultInstance()); + } + /** + * + * + *
+     * The list of databases
+     * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + public java.util.List + getDatabasesBuilderList() { + return getDatabasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Database, + com.google.cloud.alloydb.v1alpha.Database.Builder, + com.google.cloud.alloydb.v1alpha.DatabaseOrBuilder> + getDatabasesFieldBuilder() { + if (databasesBuilder_ == null) { + databasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.alloydb.v1alpha.Database, + com.google.cloud.alloydb.v1alpha.Database.Builder, + com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1alpha.ListDatabasesResponse) + private static final com.google.cloud.alloydb.v1alpha.ListDatabasesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1alpha.ListDatabasesResponse(); + } + + public static com.google.cloud.alloydb.v1alpha.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.v1alpha.ListDatabasesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesResponseOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesResponseOrBuilder.java new file mode 100644 index 000000000000..e674cda1ac7b --- /dev/null +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ListDatabasesResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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/v1alpha/service.proto + +package com.google.cloud.alloydb.v1alpha; + +public interface ListDatabasesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1alpha.ListDatabasesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + java.util.List getDatabasesList(); + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + com.google.cloud.alloydb.v1alpha.Database getDatabases(int index); + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + int getDatabasesCount(); + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + java.util.List + getDatabasesOrBuilderList(); + /** + * + * + *
+   * The list of databases
+   * 
+ * + * repeated .google.cloud.alloydb.v1alpha.Database databases = 1; + */ + com.google.cloud.alloydb.v1alpha.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-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 928a78555334..651b2d0efbd8 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 @@ -99,6 +99,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_alloydb_v1alpha_Cluster_PrimaryConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_alloydb_v1alpha_Cluster_PrimaryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1alpha_Cluster_PscConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1alpha_Cluster_PscConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_alloydb_v1alpha_Cluster_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -135,6 +139,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_alloydb_v1alpha_Instance_ClientConnectionConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_alloydb_v1alpha_Instance_ClientConnectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1alpha_Instance_PscInterfaceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1alpha_Instance_PscInterfaceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1alpha_Instance_PscInstanceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1alpha_Instance_PscInstanceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_AuthorizedNetwork_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_alloydb_v1alpha_Instance_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -183,6 +203,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_alloydb_v1alpha_User_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_alloydb_v1alpha_User_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1alpha_Database_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1alpha_Database_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -193,308 +217,342 @@ 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\037go" - + "ogle/api/field_behavior.proto\032\031google/ap" - + "i/resource.proto\032\036google/protobuf/durati" - + "on.proto\032\037google/protobuf/timestamp.prot" - + "o\032\036google/protobuf/wrappers.proto\032\033googl" - + "e/type/dayofweek.proto\032\033google/type/time" - + "ofday.proto\".\n\014UserPassword\022\014\n\004user\030\001 \001(" - + "\t\022\020\n\010password\030\002 \001(\t\"\353\001\n\017MigrationSource\022" - + "\027\n\thost_port\030\001 \001(\tB\004\342A\001\003\022\032\n\014reference_id" - + "\030\002 \001(\tB\004\342A\001\003\022\\\n\013source_type\030\003 \001(\0162A.goog" - + "le.cloud.alloydb.v1alpha.MigrationSource" - + ".MigrationSourceTypeB\004\342A\001\003\"E\n\023MigrationS" - + "ourceType\022%\n!MIGRATION_SOURCE_TYPE_UNSPE" - + "CIFIED\020\000\022\007\n\003DMS\020\001\"(\n\020EncryptionConfig\022\024\n" - + "\014kms_key_name\030\001 \001(\t\"\215\002\n\016EncryptionInfo\022P" - + "\n\017encryption_type\030\001 \001(\01621.google.cloud.a" - + "lloydb.v1alpha.EncryptionInfo.TypeB\004\342A\001\003" - + "\022K\n\020kms_key_versions\030\002 \003(\tB1\342A\001\003\372A*\n(clo" - + "udkms.googleapis.com/CryptoKeyVersion\"\\\n" - + "\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\035\n\031GOOGLE_DE" - + "FAULT_ENCRYPTION\020\001\022\037\n\033CUSTOMER_MANAGED_E" - + "NCRYPTION\020\002\"\212\003\n\tSslConfig\022G\n\010ssl_mode\030\001 " - + "\001(\0162/.google.cloud.alloydb.v1alpha.SslCo" - + "nfig.SslModeB\004\342A\001\001\022I\n\tca_source\030\002 \001(\01620." - + "google.cloud.alloydb.v1alpha.SslConfig.C" - + "aSourceB\004\342A\001\001\"\252\001\n\007SslMode\022\030\n\024SSL_MODE_UN" - + "SPECIFIED\020\000\022\026\n\016SSL_MODE_ALLOW\020\001\032\002\010\001\022\030\n\020S" - + "SL_MODE_REQUIRE\020\002\032\002\010\001\022\032\n\022SSL_MODE_VERIFY" - + "_CA\020\003\032\002\010\001\022#\n\037ALLOW_UNENCRYPTED_AND_ENCRY" - + "PTED\020\004\022\022\n\016ENCRYPTED_ONLY\020\005\"<\n\010CaSource\022\031" - + "\n\025CA_SOURCE_UNSPECIFIED\020\000\022\025\n\021CA_SOURCE_M" - + "ANAGED\020\001\"\377\006\n\025AutomatedBackupPolicy\022]\n\017we" - + "ekly_schedule\030\002 \001(\0132B.google.cloud.alloy" - + "db.v1alpha.AutomatedBackupPolicy.WeeklyS" - + "cheduleH\000\022f\n\024time_based_retention\030\004 \001(\0132" - + "F.google.cloud.alloydb.v1alpha.Automated" - + "BackupPolicy.TimeBasedRetentionH\001\022n\n\030qua" - + "ntity_based_retention\030\005 \001(\0132J.google.clo" - + "ud.alloydb.v1alpha.AutomatedBackupPolicy" - + ".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\022O\n\021encryption_config\030\010" - + " \001(\0132..google.cloud.alloydb.v1alpha.Encr" - + "yptionConfigB\004\342A\001\001\022\020\n\010location\030\006 \001(\t\022O\n\006" - + "labels\030\007 \003(\0132?.google.cloud.alloydb.v1al" - + "pha.AutomatedBackupPolicy.LabelsEntry\032k\n" - + "\016WeeklySchedule\022+\n\013start_times\030\001 \003(\0132\026.g" - + "oogle.type.TimeOfDay\022,\n\014days_of_week\030\002 \003" - + "(\0162\026.google.type.DayOfWeek\032I\n\022TimeBasedR" - + "etention\0223\n\020retention_period\030\001 \001(\0132\031.goo" - + "gle.protobuf.Duration\032\'\n\026QuantityBasedRe" - + "tention\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\010schedul" - + "eB\013\n\tretentionB\n\n\010_enabled\"\243\001\n\026Continuou" - + "sBackupConfig\022\024\n\007enabled\030\001 \001(\010H\000\210\001\001\022\034\n\024r" - + "ecovery_window_days\030\004 \001(\005\022I\n\021encryption_" - + "config\030\003 \001(\0132..google.cloud.alloydb.v1al" - + "pha.EncryptionConfigB\n\n\010_enabled\"\217\002\n\024Con" - + "tinuousBackupInfo\022K\n\017encryption_info\030\001 \001" - + "(\0132,.google.cloud.alloydb.v1alpha.Encryp" - + "tionInfoB\004\342A\001\003\0226\n\014enabled_time\030\002 \001(\0132\032.g" - + "oogle.protobuf.TimestampB\004\342A\001\003\022.\n\010schedu" - + "le\030\003 \003(\0162\026.google.type.DayOfWeekB\004\342A\001\003\022B" - + "\n\030earliest_restorable_time\030\004 \001(\0132\032.googl" - + "e.protobuf.TimestampB\004\342A\001\003\"e\n\014BackupSour" - + "ce\022\030\n\nbackup_uid\030\002 \001(\tB\004\342A\001\003\022;\n\013backup_n" - + "ame\030\001 \001(\tB&\342A\001\002\372A\037\n\035alloydb.googleapis.c" - + "om/Backup\"h\n\026ContinuousBackupSource\022\025\n\007c" - + "luster\030\001 \001(\tB\004\342A\001\002\0227\n\rpoint_in_time\030\002 \001(" - + "\0132\032.google.protobuf.TimestampB\004\342A\001\002\"\256\022\n\007" - + "Cluster\022I\n\rbackup_source\030\017 \001(\0132*.google." - + "cloud.alloydb.v1alpha.BackupSourceB\004\342A\001\003" - + "H\000\022O\n\020migration_source\030\020 \001(\0132-.google.cl" - + "oud.alloydb.v1alpha.MigrationSourceB\004\342A\001" - + "\003H\000\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\024\n\014display_name\030" - + "\002 \001(\t\022\021\n\003uid\030\003 \001(\tB\004\342A\001\003\0225\n\013create_time\030" - + "\004 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022" - + "5\n\013update_time\030\005 \001(\0132\032.google.protobuf.T" - + "imestampB\004\342A\001\003\0225\n\013delete_time\030\006 \001(\0132\032.go" - + "ogle.protobuf.TimestampB\004\342A\001\003\022A\n\006labels\030" - + "\007 \003(\01321.google.cloud.alloydb.v1alpha.Clu" - + "ster.LabelsEntry\022@\n\005state\030\010 \001(\0162+.google" - + ".cloud.alloydb.v1alpha.Cluster.StateB\004\342A" - + "\001\003\022M\n\014cluster_type\030\030 \001(\01621.google.cloud." - + "alloydb.v1alpha.Cluster.ClusterTypeB\004\342A\001" - + "\003\022M\n\020database_version\030\t \001(\0162-.google.clo" - + "ud.alloydb.v1alpha.DatabaseVersionB\004\342A\001\001" - + "\022Q\n\016network_config\030\035 \001(\01323.google.cloud." - + "alloydb.v1alpha.Cluster.NetworkConfigB\004\342" - + "A\001\001\022:\n\007network\030\n \001(\tB)\030\001\342A\001\002\372A \n\036compute" - + ".googleapis.com/Network\022\014\n\004etag\030\013 \001(\t\022K\n" - + "\013annotations\030\014 \003(\01326.google.cloud.alloyd" - + "b.v1alpha.Cluster.AnnotationsEntry\022\031\n\013re" - + "conciling\030\r \001(\010B\004\342A\001\003\022F\n\014initial_user\030\016 " - + "\001(\0132*.google.cloud.alloydb.v1alpha.UserP" - + "asswordB\004\342A\001\004\022T\n\027automated_backup_policy" - + "\030\021 \001(\01323.google.cloud.alloydb.v1alpha.Au" - + "tomatedBackupPolicy\022?\n\nssl_config\030\022 \001(\0132" - + "\'.google.cloud.alloydb.v1alpha.SslConfig" - + "B\002\030\001\022O\n\021encryption_config\030\023 \001(\0132..google" - + ".cloud.alloydb.v1alpha.EncryptionConfigB" - + "\004\342A\001\001\022K\n\017encryption_info\030\024 \001(\0132,.google." - + "cloud.alloydb.v1alpha.EncryptionInfoB\004\342A" - + "\001\003\022\\\n\030continuous_backup_config\030\033 \001(\01324.g" - + "oogle.cloud.alloydb.v1alpha.ContinuousBa" - + "ckupConfigB\004\342A\001\001\022X\n\026continuous_backup_in" - + "fo\030\034 \001(\01322.google.cloud.alloydb.v1alpha." - + "ContinuousBackupInfoB\004\342A\001\003\022O\n\020secondary_" - + "config\030\026 \001(\01325.google.cloud.alloydb.v1al" - + "pha.Cluster.SecondaryConfig\022Q\n\016primary_c" - + "onfig\030\027 \001(\01323.google.cloud.alloydb.v1alp" - + "ha.Cluster.PrimaryConfigB\004\342A\001\003\022\025\n\rsatisf" - + "ies_pzs\030\036 \001(\010\032k\n\rNetworkConfig\0228\n\007networ" - + "k\030\001 \001(\tB\'\342A\001\002\372A \n\036compute.googleapis.com" - + "/Network\022 \n\022allocated_ip_range\030\002 \001(\tB\004\342A" - + "\001\001\032/\n\017SecondaryConfig\022\034\n\024primary_cluster" - + "_name\030\001 \001(\t\0326\n\rPrimaryConfig\022%\n\027secondar" - + "y_cluster_names\030\001 \003(\tB\004\342A\001\003\032-\n\013LabelsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020An" - + "notationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001\"\234\001\n\005State\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\010CR" - + "EATING\020\004\022\014\n\010DELETING\020\005\022\n\n\006FAILED\020\006\022\021\n\rBO" - + "OTSTRAPPING\020\007\022\017\n\013MAINTENANCE\020\010\022\r\n\tPROMOT" - + "ING\020\t\"G\n\013ClusterType\022\034\n\030CLUSTER_TYPE_UNS" - + "PECIFIED\020\000\022\013\n\007PRIMARY\020\001\022\r\n\tSECONDARY\020\002:b" - + "\352A_\n\036alloydb.googleapis.com/Cluster\022:pro" - + "jects/{project}/locations/{location}/clu" - + "sters/{cluster}R\001\001B\010\n\006source\"\323\024\n\010Instanc" - + "e\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\024\n\014display_name\030\002 " - + "\001(\t\022\021\n\003uid\030\003 \001(\tB\004\342A\001\003\0225\n\013create_time\030\004 " - + "\001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n" - + "\013update_time\030\005 \001(\0132\032.google.protobuf.Tim" - + "estampB\004\342A\001\003\0225\n\013delete_time\030\006 \001(\0132\032.goog" - + "le.protobuf.TimestampB\004\342A\001\003\022B\n\006labels\030\007 " - + "\003(\01322.google.cloud.alloydb.v1alpha.Insta" - + "nce.LabelsEntry\022A\n\005state\030\010 \001(\0162,.google." - + "cloud.alloydb.v1alpha.Instance.StateB\004\342A" - + "\001\003\022P\n\rinstance_type\030\t \001(\01623.google.cloud" - + ".alloydb.v1alpha.Instance.InstanceTypeB\004" - + "\342A\001\002\022L\n\016machine_config\030\n \001(\01324.google.cl" - + "oud.alloydb.v1alpha.Instance.MachineConf" - + "ig\022R\n\021availability_type\030\013 \001(\01627.google.c" - + "loud.alloydb.v1alpha.Instance.Availabili" - + "tyType\022\020\n\010gce_zone\030\014 \001(\t\022Q\n\016database_fla" - + "gs\030\r \003(\01329.google.cloud.alloydb.v1alpha." - + "Instance.DatabaseFlagsEntry\022H\n\rwritable_" - + "node\030\023 \001(\0132+.google.cloud.alloydb.v1alph" - + "a.Instance.NodeB\004\342A\001\003\022@\n\005nodes\030\024 \003(\0132+.g" - + "oogle.cloud.alloydb.v1alpha.Instance.Nod" - + "eB\004\342A\001\003\022a\n\025query_insights_config\030\025 \001(\0132B" - + ".google.cloud.alloydb.v1alpha.Instance.Q" - + "ueryInsightsInstanceConfig\022O\n\020read_pool_" - + "config\030\016 \001(\01325.google.cloud.alloydb.v1al" - + "pha.Instance.ReadPoolConfig\022\030\n\nip_addres" - + "s\030\017 \001(\tB\004\342A\001\003\022\031\n\013reconciling\030\020 \001(\010B\004\342A\001\003" - + "\022\014\n\004etag\030\021 \001(\t\022L\n\013annotations\030\022 \003(\01327.go" - + "ogle.cloud.alloydb.v1alpha.Instance.Anno" - + "tationsEntry\022J\n\rupdate_policy\030\026 \001(\01323.go" + + ".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" + + "\".\n\014UserPassword\022\014\n\004user\030\001 \001(\t\022\020\n\010passwo" + + "rd\030\002 \001(\t\"\353\001\n\017MigrationSource\022\027\n\thost_por" + + "t\030\001 \001(\tB\004\342A\001\003\022\032\n\014reference_id\030\002 \001(\tB\004\342A\001" + + "\003\022\\\n\013source_type\030\003 \001(\0162A.google.cloud.al" + + "loydb.v1alpha.MigrationSource.MigrationS" + + "ourceTypeB\004\342A\001\003\"E\n\023MigrationSourceType\022%" + + "\n!MIGRATION_SOURCE_TYPE_UNSPECIFIED\020\000\022\007\n" + + "\003DMS\020\001\"(\n\020EncryptionConfig\022\024\n\014kms_key_na" + + "me\030\001 \001(\t\"\215\002\n\016EncryptionInfo\022P\n\017encryptio" + + "n_type\030\001 \001(\01621.google.cloud.alloydb.v1al" + + "pha.EncryptionInfo.TypeB\004\342A\001\003\022K\n\020kms_key" + + "_versions\030\002 \003(\tB1\342A\001\003\372A*\n(cloudkms.googl" + + "eapis.com/CryptoKeyVersion\"\\\n\004Type\022\024\n\020TY" + + "PE_UNSPECIFIED\020\000\022\035\n\031GOOGLE_DEFAULT_ENCRY" + + "PTION\020\001\022\037\n\033CUSTOMER_MANAGED_ENCRYPTION\020\002" + + "\"\212\003\n\tSslConfig\022G\n\010ssl_mode\030\001 \001(\0162/.googl" + + "e.cloud.alloydb.v1alpha.SslConfig.SslMod" + + "eB\004\342A\001\001\022I\n\tca_source\030\002 \001(\01620.google.clou" + + "d.alloydb.v1alpha.SslConfig.CaSourceB\004\342A" + + "\001\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_REQ" + + "UIRE\020\002\032\002\010\001\022\032\n\022SSL_MODE_VERIFY_CA\020\003\032\002\010\001\022#" + + "\n\037ALLOW_UNENCRYPTED_AND_ENCRYPTED\020\004\022\022\n\016E" + + "NCRYPTED_ONLY\020\005\"<\n\010CaSource\022\031\n\025CA_SOURCE" + + "_UNSPECIFIED\020\000\022\025\n\021CA_SOURCE_MANAGED\020\001\"\377\006" + + "\n\025AutomatedBackupPolicy\022]\n\017weekly_schedu" + + "le\030\002 \001(\0132B.google.cloud.alloydb.v1alpha." + + "AutomatedBackupPolicy.WeeklyScheduleH\000\022f" + + "\n\024time_based_retention\030\004 \001(\0132F.google.cl" + + "oud.alloydb.v1alpha.AutomatedBackupPolic" + + "y.TimeBasedRetentionH\001\022n\n\030quantity_based" + + "_retention\030\005 \001(\0132J.google.cloud.alloydb." + + "v1alpha.AutomatedBackupPolicy.QuantityBa" + + "sedRetentionH\001\022\024\n\007enabled\030\001 \001(\010H\002\210\001\001\0220\n\r" + + "backup_window\030\003 \001(\0132\031.google.protobuf.Du" + + "ration\022O\n\021encryption_config\030\010 \001(\0132..goog" + + "le.cloud.alloydb.v1alpha.EncryptionConfi" + + "gB\004\342A\001\001\022\020\n\010location\030\006 \001(\t\022O\n\006labels\030\007 \003(" + + "\0132?.google.cloud.alloydb.v1alpha.Automat" + + "edBackupPolicy.LabelsEntry\032k\n\016WeeklySche" + + "dule\022+\n\013start_times\030\001 \003(\0132\026.google.type." + + "TimeOfDay\022,\n\014days_of_week\030\002 \003(\0162\026.google" + + ".type.DayOfWeek\032I\n\022TimeBasedRetention\0223\n" + + "\020retention_period\030\001 \001(\0132\031.google.protobu" + + "f.Duration\032\'\n\026QuantityBasedRetention\022\r\n\005" + + "count\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\tretent" + + "ionB\n\n\010_enabled\"\243\001\n\026ContinuousBackupConf" + + "ig\022\024\n\007enabled\030\001 \001(\010H\000\210\001\001\022\034\n\024recovery_win" + + "dow_days\030\004 \001(\005\022I\n\021encryption_config\030\003 \001(" + + "\0132..google.cloud.alloydb.v1alpha.Encrypt" + + "ionConfigB\n\n\010_enabled\"\217\002\n\024ContinuousBack" + + "upInfo\022K\n\017encryption_info\030\001 \001(\0132,.google" + + ".cloud.alloydb.v1alpha.EncryptionInfoB\004\342" + + "A\001\003\0226\n\014enabled_time\030\002 \001(\0132\032.google.proto" + + "buf.TimestampB\004\342A\001\003\022.\n\010schedule\030\003 \003(\0162\026." + + "google.type.DayOfWeekB\004\342A\001\003\022B\n\030earliest_" + + "restorable_time\030\004 \001(\0132\032.google.protobuf." + + "TimestampB\004\342A\001\003\"e\n\014BackupSource\022\030\n\nbacku" + + "p_uid\030\002 \001(\tB\004\342A\001\003\022;\n\013backup_name\030\001 \001(\tB&" + + "\342A\001\002\372A\037\n\035alloydb.googleapis.com/Backup\"h" + + "\n\026ContinuousBackupSource\022\025\n\007cluster\030\001 \001(" + + "\tB\004\342A\001\002\0227\n\rpoint_in_time\030\002 \001(\0132\032.google." + + "protobuf.TimestampB\004\342A\001\002\"\304\023\n\007Cluster\022I\n\r" + + "backup_source\030\017 \001(\0132*.google.cloud.alloy" + + "db.v1alpha.BackupSourceB\004\342A\001\003H\000\022O\n\020migra" + + "tion_source\030\020 \001(\0132-.google.cloud.alloydb" + + ".v1alpha.MigrationSourceB\004\342A\001\003H\000\022\022\n\004name" + + "\030\001 \001(\tB\004\342A\001\003\022\024\n\014display_name\030\002 \001(\t\022\021\n\003ui" + + "d\030\003 \001(\tB\004\342A\001\003\0225\n\013create_time\030\004 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\004\342A\001\003\0225\n\013update_t" + + "ime\030\005 \001(\0132\032.google.protobuf.TimestampB\004\342" + + "A\001\003\0225\n\013delete_time\030\006 \001(\0132\032.google.protob" + + "uf.TimestampB\004\342A\001\003\022A\n\006labels\030\007 \003(\01321.goo" + + "gle.cloud.alloydb.v1alpha.Cluster.Labels" + + "Entry\022@\n\005state\030\010 \001(\0162+.google.cloud.allo" + + "ydb.v1alpha.Cluster.StateB\004\342A\001\003\022M\n\014clust" + + "er_type\030\030 \001(\01621.google.cloud.alloydb.v1a" + + "lpha.Cluster.ClusterTypeB\004\342A\001\003\022M\n\020databa" + + "se_version\030\t \001(\0162-.google.cloud.alloydb." + + "v1alpha.DatabaseVersionB\004\342A\001\001\022Q\n\016network" + + "_config\030\035 \001(\01323.google.cloud.alloydb.v1a" + + "lpha.Cluster.NetworkConfigB\004\342A\001\001\022:\n\007netw" + + "ork\030\n \001(\tB)\030\001\342A\001\002\372A \n\036compute.googleapis" + + ".com/Network\022\014\n\004etag\030\013 \001(\t\022K\n\013annotation" + + "s\030\014 \003(\01326.google.cloud.alloydb.v1alpha.C" + + "luster.AnnotationsEntry\022\031\n\013reconciling\030\r" + + " \001(\010B\004\342A\001\003\022F\n\014initial_user\030\016 \001(\0132*.googl" + + "e.cloud.alloydb.v1alpha.UserPasswordB\004\342A" + + "\001\004\022T\n\027automated_backup_policy\030\021 \001(\01323.go" + + "ogle.cloud.alloydb.v1alpha.AutomatedBack" + + "upPolicy\022?\n\nssl_config\030\022 \001(\0132\'.google.cl" + + "oud.alloydb.v1alpha.SslConfigB\002\030\001\022O\n\021enc" + + "ryption_config\030\023 \001(\0132..google.cloud.allo" + + "ydb.v1alpha.EncryptionConfigB\004\342A\001\001\022K\n\017en" + + "cryption_info\030\024 \001(\0132,.google.cloud.alloy" + + "db.v1alpha.EncryptionInfoB\004\342A\001\003\022\\\n\030conti" + + "nuous_backup_config\030\033 \001(\01324.google.cloud" + + ".alloydb.v1alpha.ContinuousBackupConfigB" + + "\004\342A\001\001\022X\n\026continuous_backup_info\030\034 \001(\01322." + + "google.cloud.alloydb.v1alpha.ContinuousB" + + "ackupInfoB\004\342A\001\003\022O\n\020secondary_config\030\026 \001(" + + "\01325.google.cloud.alloydb.v1alpha.Cluster" + + ".SecondaryConfig\022Q\n\016primary_config\030\027 \001(\013" + + "23.google.cloud.alloydb.v1alpha.Cluster." + + "PrimaryConfigB\004\342A\001\003\022\033\n\rsatisfies_pzi\030! \001" + + "(\010B\004\342A\001\003\022\033\n\rsatisfies_pzs\030\036 \001(\010B\004\342A\001\003\022I\n" + + "\npsc_config\030\037 \001(\0132/.google.cloud.alloydb" + + ".v1alpha.Cluster.PscConfigB\004\342A\001\001\032k\n\rNetw" + + "orkConfig\0228\n\007network\030\001 \001(\tB\'\342A\001\001\372A \n\036com" + + "pute.googleapis.com/Network\022 \n\022allocated" + + "_ip_range\030\002 \001(\tB\004\342A\001\001\032/\n\017SecondaryConfig" + + "\022\034\n\024primary_cluster_name\030\001 \001(\t\0326\n\rPrimar" + + "yConfig\022%\n\027secondary_cluster_names\030\001 \003(\t" + + "B\004\342A\001\003\032&\n\tPscConfig\022\031\n\013psc_enabled\030\001 \001(\010" + + "B\004\342A\001\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\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\"\234\001\n\005State\022\025\n\021S" + + "TATE_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\013MAIN" + + "TENANCE\020\010\022\r\n\tPROMOTING\020\t\"G\n\013ClusterType\022" + + "\034\n\030CLUSTER_TYPE_UNSPECIFIED\020\000\022\013\n\007PRIMARY" + + "\020\001\022\r\n\tSECONDARY\020\002:b\352A_\n\036alloydb.googleap" + + "is.com/Cluster\022:projects/{project}/locat" + + "ions/{location}/clusters/{cluster}R\001\001B\010\n" + + "\006source\"\244\033\n\010Instance\022\022\n\004name\030\001 \001(\tB\004\342A\001\003" + + "\022\024\n\014display_name\030\002 \001(\t\022\021\n\003uid\030\003 \001(\tB\004\342A\001" + + "\003\0225\n\013create_time\030\004 \001(\0132\032.google.protobuf" + + ".TimestampB\004\342A\001\003\0225\n\013update_time\030\005 \001(\0132\032." + + "google.protobuf.TimestampB\004\342A\001\003\0225\n\013delet" + + "e_time\030\006 \001(\0132\032.google.protobuf.Timestamp" + + "B\004\342A\001\003\022B\n\006labels\030\007 \003(\01322.google.cloud.al" + + "loydb.v1alpha.Instance.LabelsEntry\022A\n\005st" + + "ate\030\010 \001(\0162,.google.cloud.alloydb.v1alpha" + + ".Instance.StateB\004\342A\001\003\022P\n\rinstance_type\030\t" + + " \001(\01623.google.cloud.alloydb.v1alpha.Inst" + + "ance.InstanceTypeB\004\342A\001\002\022L\n\016machine_confi" + + "g\030\n \001(\01324.google.cloud.alloydb.v1alpha.I" + + "nstance.MachineConfig\022R\n\021availability_ty" + + "pe\030\013 \001(\01627.google.cloud.alloydb.v1alpha." + + "Instance.AvailabilityType\022\020\n\010gce_zone\030\014 " + + "\001(\t\022Q\n\016database_flags\030\r \003(\01329.google.clo" + + "ud.alloydb.v1alpha.Instance.DatabaseFlag" + + "sEntry\022H\n\rwritable_node\030\023 \001(\0132+.google.c" + + "loud.alloydb.v1alpha.Instance.NodeB\004\342A\001\003" + + "\022@\n\005nodes\030\024 \003(\0132+.google.cloud.alloydb.v" + + "1alpha.Instance.NodeB\004\342A\001\003\022a\n\025query_insi" + + "ghts_config\030\025 \001(\0132B.google.cloud.alloydb" + + ".v1alpha.Instance.QueryInsightsInstanceC" + + "onfig\022O\n\020read_pool_config\030\016 \001(\01325.google" + + ".cloud.alloydb.v1alpha.Instance.ReadPool" + + "Config\022\030\n\nip_address\030\017 \001(\tB\004\342A\001\003\022\031\n\013reco" + + "nciling\030\020 \001(\010B\004\342A\001\003\022\014\n\004etag\030\021 \001(\t\022L\n\013ann" + + "otations\030\022 \003(\01327.google.cloud.alloydb.v1" + + "alpha.Instance.AnnotationsEntry\022J\n\rupdat" + + "e_policy\030\026 \001(\01323.google.cloud.alloydb.v1" + + "alpha.Instance.UpdatePolicy\022e\n\030client_co" + + "nnection_config\030\027 \001(\0132=.google.cloud.all" + + "oydb.v1alpha.Instance.ClientConnectionCo" + + "nfigB\004\342A\001\001\022\033\n\rsatisfies_pzi\030\036 \001(\010B\004\342A\001\003\022" + + "\033\n\rsatisfies_pzs\030\030 \001(\010B\004\342A\001\003\022[\n\023psc_inst" + + "ance_config\030\034 \001(\01328.google.cloud.alloydb" + + ".v1alpha.Instance.PscInstanceConfigB\004\342A\001" + + "\001\022Z\n\016network_config\030\035 \001(\0132<.google.cloud" + + ".alloydb.v1alpha.Instance.InstanceNetwor" + + "kConfigB\004\342A\001\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\222\001\n\014UpdatePolicy\022F\n\004mode\030\001 \001(\01628.go" + "ogle.cloud.alloydb.v1alpha.Instance.Upda" - + "tePolicy\022e\n\030client_connection_config\030\027 \001" - + "(\0132=.google.cloud.alloydb.v1alpha.Instan" - + "ce.ClientConnectionConfigB\004\342A\001\001\022\025\n\rsatis" - + "fies_pzs\030\030 \001(\010\032\"\n\rMachineConfig\022\021\n\tcpu_c" - + "ount\030\001 \001(\005\032>\n\004Node\022\017\n\007zone_id\030\001 \001(\t\022\n\n\002i" - + "d\030\002 \001(\t\022\n\n\002ip\030\003 \001(\t\022\r\n\005state\030\004 \001(\t\032\372\001\n\033Q" - + "ueryInsightsInstanceConfig\022$\n\027record_app" - + "lication_tags\030\002 \001(\010H\000\210\001\001\022\"\n\025record_clien" - + "t_address\030\003 \001(\010H\001\210\001\001\022\033\n\023query_string_len" - + "gth\030\004 \001(\r\022#\n\026query_plans_per_minute\030\005 \001(" - + "\rH\002\210\001\001B\032\n\030_record_application_tagsB\030\n\026_r" - + "ecord_client_addressB\031\n\027_query_plans_per" - + "_minute\032$\n\016ReadPoolConfig\022\022\n\nnode_count\030" - + "\001 \001(\005\032\222\001\n\014UpdatePolicy\022F\n\004mode\030\001 \001(\01628.g" - + "oogle.cloud.alloydb.v1alpha.Instance.Upd" - + "atePolicy.Mode\":\n\004Mode\022\024\n\020MODE_UNSPECIFI" - + "ED\020\000\022\013\n\007DEFAULT\020\001\022\017\n\013FORCE_APPLY\020\002\032}\n\026Cl" - + "ientConnectionConfig\022 \n\022require_connecto" - + "rs\030\001 \001(\010B\004\342A\001\001\022A\n\nssl_config\030\002 \001(\0132\'.goo" - + "gle.cloud.alloydb.v1alpha.SslConfigB\004\342A\001" - + "\001\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\"\211\002\n\016C" - + "onnectionInfo\022\014\n\004name\030\001 \001(\t\022\030\n\nip_addres" - + "s\030\002 \001(\tB\004\342A\001\003\022%\n\025pem_certificate_chain\030\003" - + " \003(\tB\006\030\001\342A\001\003\022\032\n\014instance_uid\030\004 \001(\tB\004\342A\001\003" - + ":\213\001\352A\207\001\n%alloydb.googleapis.com/Connecti" - + "onInfo\022^projects/{project}/locations/{lo" - + "cation}/clusters/{cluster}/instances/{in" - + "stance}/connectionInfo\"\366\013\n\006Backup\022\022\n\004nam" - + "e\030\001 \001(\tB\004\342A\001\003\022\024\n\014display_name\030\002 \001(\t\022\021\n\003u" - + "id\030\003 \001(\tB\004\342A\001\003\0225\n\013create_time\030\004 \001(\0132\032.go" - + "ogle.protobuf.TimestampB\004\342A\001\003\0225\n\013update_" - + "time\030\005 \001(\0132\032.google.protobuf.TimestampB\004" - + "\342A\001\003\0225\n\013delete_time\030\017 \001(\0132\032.google.proto" - + "buf.TimestampB\004\342A\001\003\022@\n\006labels\030\006 \003(\01320.go" - + "ogle.cloud.alloydb.v1alpha.Backup.Labels" - + "Entry\022?\n\005state\030\007 \001(\0162*.google.cloud.allo" - + "ydb.v1alpha.Backup.StateB\004\342A\001\003\0227\n\004type\030\010" - + " \001(\0162).google.cloud.alloydb.v1alpha.Back" - + "up.Type\022\023\n\013description\030\t \001(\t\022\031\n\013cluster_" - + "uid\030\022 \001(\tB\004\342A\001\003\022=\n\014cluster_name\030\n \001(\tB\'\342" - + "A\001\002\372A \n\036alloydb.googleapis.com/Cluster\022\031" - + "\n\013reconciling\030\013 \001(\010B\004\342A\001\003\022O\n\021encryption_" - + "config\030\014 \001(\0132..google.cloud.alloydb.v1al" - + "pha.EncryptionConfigB\004\342A\001\001\022K\n\017encryption" - + "_info\030\r \001(\0132,.google.cloud.alloydb.v1alp" - + "ha.EncryptionInfoB\004\342A\001\003\022\014\n\004etag\030\016 \001(\t\022J\n" - + "\013annotations\030\020 \003(\01325.google.cloud.alloyd" - + "b.v1alpha.Backup.AnnotationsEntry\022\030\n\nsiz" - + "e_bytes\030\021 \001(\003B\004\342A\001\003\0225\n\013expiry_time\030\023 \001(\013" - + "2\032.google.protobuf.TimestampB\004\342A\001\003\022W\n\017ex" - + "piry_quantity\030\024 \001(\01328.google.cloud.alloy" - + "db.v1alpha.Backup.QuantityBasedExpiryB\004\342" - + "A\001\003\022\025\n\rsatisfies_pzs\030\025 \001(\010\022M\n\020database_v" - + "ersion\030\026 \001(\0162-.google.cloud.alloydb.v1al" - + "pha.DatabaseVersionB\004\342A\001\003\032Y\n\023QuantityBas" - + "edExpiry\022\035\n\017retention_count\030\001 \001(\005B\004\342A\001\003\022" - + "#\n\025total_retention_count\030\002 \001(\005B\004\342A\001\003\032-\n\013" - + "LabelsEntry\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\005" - + "value\030\002 \001(\t:\0028\001\"Q\n\005State\022\025\n\021STATE_UNSPEC" - + "IFIED\020\000\022\t\n\005READY\020\001\022\014\n\010CREATING\020\002\022\n\n\006FAIL" - + "ED\020\003\022\014\n\010DELETING\020\004\"J\n\004Type\022\024\n\020TYPE_UNSPE" - + "CIFIED\020\000\022\r\n\tON_DEMAND\020\001\022\r\n\tAUTOMATED\020\002\022\016" - + "\n\nCONTINUOUS\020\003:_\352A\\\n\035alloydb.googleapis." - + "com/Backup\0228projects/{project}/locations" - + "/{location}/backups/{backup}R\001\001\"\334\006\n\025Supp" - + "ortedDatabaseFlag\022e\n\023string_restrictions" - + "\030\007 \001(\0132F.google.cloud.alloydb.v1alpha.Su" - + "pportedDatabaseFlag.StringRestrictionsH\000" - + "\022g\n\024integer_restrictions\030\010 \001(\0132G.google." + + "tePolicy.Mode\":\n\004Mode\022\024\n\020MODE_UNSPECIFIE" + + "D\020\000\022\013\n\007DEFAULT\020\001\022\017\n\013FORCE_APPLY\020\002\032}\n\026Cli" + + "entConnectionConfig\022 \n\022require_connector" + + "s\030\001 \001(\010B\004\342A\001\001\022A\n\nssl_config\030\002 \001(\0132\'.goog" + + "le.cloud.alloydb.v1alpha.SslConfigB\004\342A\001\001" + + "\032O\n\022PscInterfaceConfig\022\035\n\025consumer_endpo" + + "int_ips\030\001 \003(\t\022\032\n\022network_attachment\030\002 \001(" + + "\t\032\270\002\n\021PscInstanceConfig\022%\n\027service_attac" + + "hment_link\030\001 \001(\tB\004\342A\001\003\022\'\n\031allowed_consum" + + "er_projects\030\002 \003(\tB\004\342A\001\001\022\'\n\031allowed_consu" + + "mer_networks\030\003 \003(\tB\004\342A\001\001\022^\n\025psc_interfac" + + "e_configs\030\004 \003(\01329.google.cloud.alloydb.v" + + "1alpha.Instance.PscInterfaceConfigB\004\342A\001\001" + + "\022/\n!outgoing_service_attachment_links\030\005 " + + "\003(\tB\004\342A\001\001\022\031\n\013psc_enabled\030\006 \001(\010B\004\342A\001\001\032\346\001\n" + + "\025InstanceNetworkConfig\022z\n\034authorized_ext" + + "ernal_networks\030\001 \003(\0132N.google.cloud.allo" + + "ydb.v1alpha.Instance.InstanceNetworkConf" + + "ig.AuthorizedNetworkB\004\342A\001\001\022\036\n\020enable_pub" + + "lic_ip\030\002 \001(\010B\004\342A\001\001\0321\n\021AuthorizedNetwork\022" + + "\034\n\ncidr_range\030\001 \001(\tB\010\342\214\317\327\010\002\010\002\032-\n\013LabelsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0324\n\022" + + "DatabaseFlagsEntry\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\"\221\001\n\005State\022\025\n\021STAT" + + "E_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\013MAINTENAN" + + "CE\020\005\022\n\n\006FAILED\020\006\022\021\n\rBOOTSTRAPPING\020\010\022\r\n\tP" + + "ROMOTING\020\t\"X\n\014InstanceType\022\035\n\031INSTANCE_T" + + "YPE_UNSPECIFIED\020\000\022\013\n\007PRIMARY\020\001\022\r\n\tREAD_P" + + "OOL\020\002\022\r\n\tSECONDARY\020\003\"N\n\020AvailabilityType" + + "\022!\n\035AVAILABILITY_TYPE_UNSPECIFIED\020\000\022\t\n\005Z" + + "ONAL\020\001\022\014\n\010REGIONAL\020\002:x\352Au\n\037alloydb.googl" + + "eapis.com/Instance\022Oprojects/{project}/l" + + "ocations/{location}/clusters/{cluster}/i" + + "nstances/{instance}R\001\001\"\262\002\n\016ConnectionInf" + + "o\022\014\n\004name\030\001 \001(\t\022\030\n\nip_address\030\002 \001(\tB\004\342A\001" + + "\003\022\'\n\021public_ip_address\030\005 \001(\tB\014\342A\001\003\342\214\317\327\010\002" + + "\010\002\022%\n\025pem_certificate_chain\030\003 \003(\tB\006\030\001\342A\001" + + "\003\022\032\n\014instance_uid\030\004 \001(\tB\004\342A\001\003:\213\001\352A\207\001\n%al" + + "loydb.googleapis.com/ConnectionInfo\022^pro" + + "jects/{project}/locations/{location}/clu" + + "sters/{cluster}/instances/{instance}/con" + + "nectionInfo\"\231\014\n\006Backup\022\022\n\004name\030\001 \001(\tB\004\342A" + + "\001\003\022\024\n\014display_name\030\002 \001(\t\022\021\n\003uid\030\003 \001(\tB\004\342" + + "A\001\003\0225\n\013create_time\030\004 \001(\0132\032.google.protob" + + "uf.TimestampB\004\342A\001\003\0225\n\013update_time\030\005 \001(\0132" + + "\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013del" + + "ete_time\030\017 \001(\0132\032.google.protobuf.Timesta" + + "mpB\004\342A\001\003\022@\n\006labels\030\006 \003(\01320.google.cloud." + + "alloydb.v1alpha.Backup.LabelsEntry\022?\n\005st" + + "ate\030\007 \001(\0162*.google.cloud.alloydb.v1alpha" + + ".Backup.StateB\004\342A\001\003\0227\n\004type\030\010 \001(\0162).goog" + + "le.cloud.alloydb.v1alpha.Backup.Type\022\023\n\013" + + "description\030\t \001(\t\022\031\n\013cluster_uid\030\022 \001(\tB\004" + + "\342A\001\003\022=\n\014cluster_name\030\n \001(\tB\'\342A\001\002\372A \n\036all" + + "oydb.googleapis.com/Cluster\022\031\n\013reconcili" + + "ng\030\013 \001(\010B\004\342A\001\003\022O\n\021encryption_config\030\014 \001(" + + "\0132..google.cloud.alloydb.v1alpha.Encrypt" + + "ionConfigB\004\342A\001\001\022K\n\017encryption_info\030\r \001(\013" + + "2,.google.cloud.alloydb.v1alpha.Encrypti" + + "onInfoB\004\342A\001\003\022\014\n\004etag\030\016 \001(\t\022J\n\013annotation" + + "s\030\020 \003(\01325.google.cloud.alloydb.v1alpha.B" + + "ackup.AnnotationsEntry\022\030\n\nsize_bytes\030\021 \001" + + "(\003B\004\342A\001\003\0225\n\013expiry_time\030\023 \001(\0132\032.google.p" + + "rotobuf.TimestampB\004\342A\001\003\022W\n\017expiry_quanti" + + "ty\030\024 \001(\01328.google.cloud.alloydb.v1alpha." + + "Backup.QuantityBasedExpiryB\004\342A\001\003\022\033\n\rsati" + + "sfies_pzi\030\027 \001(\010B\004\342A\001\003\022\033\n\rsatisfies_pzs\030\025" + + " \001(\010B\004\342A\001\003\022M\n\020database_version\030\026 \001(\0162-.g" + + "oogle.cloud.alloydb.v1alpha.DatabaseVers" + + "ionB\004\342A\001\003\032Y\n\023QuantityBasedExpiry\022\035\n\017rete" + + "ntion_count\030\001 \001(\005B\004\342A\001\003\022#\n\025total_retenti" + + "on_count\030\002 \001(\005B\004\342A\001\003\032-\n\013LabelsEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020Annotatio" + + "nsEntry\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_D" + + "EMAND\020\001\022\r\n\tAUTOMATED\020\002\022\016\n\nCONTINUOUS\020\003:_" + + "\352A\\\n\035alloydb.googleapis.com/Backup\0228proj" + + "ects/{project}/locations/{location}/back" + + "ups/{backup}R\001\001\"\334\006\n\025SupportedDatabaseFla" + + "g\022e\n\023string_restrictions\030\007 \001(\0132F.google." + "cloud.alloydb.v1alpha.SupportedDatabaseF" - + "lag.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.v1alpha.SupportedD" - + "atabaseFlag.ValueType\022\037\n\027accepts_multipl" - + "e_values\030\004 \001(\010\022L\n\025supported_db_versions\030" - + "\005 \003(\0162-.google.cloud.alloydb.v1alpha.Dat" - + "abaseVersion\022\033\n\023requires_db_restart\030\006 \001(" - + "\010\032,\n\022StringRestrictions\022\026\n\016allowed_value" - + "s\030\001 \003(\t\032u\n\023IntegerRestrictions\022.\n\tmin_va" - + "lue\030\001 \001(\0132\033.google.protobuf.Int64Value\022." - + "\n\tmax_value\030\002 \001(\0132\033.google.protobuf.Int6" - + "4Value\"U\n\tValueType\022\032\n\026VALUE_TYPE_UNSPEC" - + "IFIED\020\000\022\n\n\006STRING\020\001\022\013\n\007INTEGER\020\002\022\t\n\005FLOA" - + "T\020\003\022\010\n\004NONE\020\004:g\352Ad\n,alloydb.googleapis.c" - + "om/SupportedDatabaseFlag\0224projects/{proj" - + "ect}/locations/{location}/flags/{flag}B\016" - + "\n\014restrictions\"\327\002\n\004User\022\022\n\004name\030\001 \001(\tB\004\342" - + "A\001\003\022\026\n\010password\030\002 \001(\tB\004\342A\001\004\022\034\n\016database_" - + "roles\030\004 \003(\tB\004\342A\001\001\022D\n\tuser_type\030\005 \001(\0162+.g" - + "oogle.cloud.alloydb.v1alpha.User.UserTyp" - + "eB\004\342A\001\001\"Q\n\010UserType\022\031\n\025USER_TYPE_UNSPECI" - + "FIED\020\000\022\024\n\020ALLOYDB_BUILT_IN\020\001\022\024\n\020ALLOYDB_" - + "IAM_USER\020\002:l\352Ai\n\033alloydb.googleapis.com/" - + "User\022Gprojects/{project}/locations/{loca" - + "tion}/clusters/{cluster}/users/{user}R\001\001" - + "*^\n\014InstanceView\022\035\n\031INSTANCE_VIEW_UNSPEC" - + "IFIED\020\000\022\027\n\023INSTANCE_VIEW_BASIC\020\001\022\026\n\022INST" - + "ANCE_VIEW_FULL\020\002*g\n\013ClusterView\022\034\n\030CLUST" - + "ER_VIEW_UNSPECIFIED\020\000\022\026\n\022CLUSTER_VIEW_BA" - + "SIC\020\001\022\"\n\036CLUSTER_VIEW_CONTINUOUS_BACKUP\020" - + "\002*j\n\017DatabaseVersion\022 \n\034DATABASE_VERSION" - + "_UNSPECIFIED\020\000\022\023\n\013POSTGRES_13\020\001\032\002\010\001\022\017\n\013P" - + "OSTGRES_14\020\002\022\017\n\013POSTGRES_15\020\003B\313\003\n com.go" - + "ogle.cloud.alloydb.v1alphaB\016ResourcesPro" - + "toP\001Z:cloud.google.com/go/alloydb/apiv1a" - + "lpha/alloydbpb;alloydbpb\252\002\034Google.Cloud." - + "AlloyDb.V1Alpha\312\002\034Google\\Cloud\\AlloyDb\\V" - + "1alpha\352\002\037Google::Cloud::AlloyDB::V1alpha" - + "\352A\246\001\n(cloudkms.googleapis.com/CryptoKeyV" - + "ersion\022zprojects/{project}/locations/{lo" - + "cation}/keyRings/{key_ring}/cryptoKeys/{" - + "crypto_key}/cryptoKeyVersions/{crypto_ke" - + "y_version}\352AN\n\036compute.googleapis.com/Ne" - + "twork\022,projects/{project}/global/network" - + "s/{network}b\006proto3" + + "lag.StringRestrictionsH\000\022g\n\024integer_rest" + + "rictions\030\010 \001(\0132G.google.cloud.alloydb.v1" + + "alpha.SupportedDatabaseFlag.IntegerRestr" + + "ictionsH\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.al" + + "loydb.v1alpha.SupportedDatabaseFlag.Valu" + + "eType\022\037\n\027accepts_multiple_values\030\004 \001(\010\022L" + + "\n\025supported_db_versions\030\005 \003(\0162-.google.c" + + "loud.alloydb.v1alpha.DatabaseVersion\022\033\n\023" + + "requires_db_restart\030\006 \001(\010\032,\n\022StringRestr" + + "ictions\022\026\n\016allowed_values\030\001 \003(\t\032u\n\023Integ" + + "erRestrictions\022.\n\tmin_value\030\001 \001(\0132\033.goog" + + "le.protobuf.Int64Value\022.\n\tmax_value\030\002 \001(" + + "\0132\033.google.protobuf.Int64Value\"U\n\tValueT" + + "ype\022\032\n\026VALUE_TYPE_UNSPECIFIED\020\000\022\n\n\006STRIN" + + "G\020\001\022\013\n\007INTEGER\020\002\022\t\n\005FLOAT\020\003\022\010\n\004NONE\020\004:g\352" + + "Ad\n,alloydb.googleapis.com/SupportedData" + + "baseFlag\0224projects/{project}/locations/{" + + "location}/flags/{flag}B\016\n\014restrictions\"\327" + + "\002\n\004User\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\026\n\010password\030" + + "\002 \001(\tB\004\342A\001\004\022\034\n\016database_roles\030\004 \003(\tB\004\342A\001" + + "\001\022D\n\tuser_type\030\005 \001(\0162+.google.cloud.allo" + + "ydb.v1alpha.User.UserTypeB\004\342A\001\001\"Q\n\010UserT" + + "ype\022\031\n\025USER_TYPE_UNSPECIFIED\020\000\022\024\n\020ALLOYD" + + "B_BUILT_IN\020\001\022\024\n\020ALLOYDB_IAM_USER\020\002:l\352Ai\n" + + "\033alloydb.googleapis.com/User\022Gprojects/{" + + "project}/locations/{location}/clusters/{" + + "cluster}/users/{user}R\001\001\"\337\001\n\010Database\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\010\022\025\n\007charset\030\002 \001(\tB\004\342A\001\001" + + "\022\027\n\tcollation\030\003 \001(\tB\004\342A\001\001:\216\001\352A\212\001\n\037alloyd" + + "b.googleapis.com/Database\022Oprojects/{pro" + + "ject}/locations/{location}/clusters/{clu" + + "ster}/databases/{database}*\tdatabases2\010d" + + "atabaseR\001\001*^\n\014InstanceView\022\035\n\031INSTANCE_V" + + "IEW_UNSPECIFIED\020\000\022\027\n\023INSTANCE_VIEW_BASIC" + + "\020\001\022\026\n\022INSTANCE_VIEW_FULL\020\002*g\n\013ClusterVie" + + "w\022\034\n\030CLUSTER_VIEW_UNSPECIFIED\020\000\022\026\n\022CLUST" + + "ER_VIEW_BASIC\020\001\022\"\n\036CLUSTER_VIEW_CONTINUO" + + "US_BACKUP\020\002*j\n\017DatabaseVersion\022 \n\034DATABA" + + "SE_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\003B" + + "\313\003\n com.google.cloud.alloydb.v1alphaB\016Re" + + "sourcesProtoP\001Z:cloud.google.com/go/allo" + + "ydb/apiv1alpha/alloydbpb;alloydbpb\252\002\034Goo" + + "gle.Cloud.AlloyDb.V1Alpha\312\002\034Google\\Cloud" + + "\\AlloyDb\\V1alpha\352\002\037Google::Cloud::AlloyD" + + "B::V1alpha\352A\246\001\n(cloudkms.googleapis.com/" + + "CryptoKeyVersion\022zprojects/{project}/loc" + + "ations/{location}/keyRings/{key_ring}/cr" + + "yptoKeys/{crypto_key}/cryptoKeyVersions/" + + "{crypto_key_version}\352AN\n\036compute.googlea" + + "pis.com/Network\022,projects/{project}/glob" + + "al/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.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); @@ -658,7 +716,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ContinuousBackupInfo", "SecondaryConfig", "PrimaryConfig", + "SatisfiesPzi", "SatisfiesPzs", + "PscConfig", "Source", }); internal_static_google_cloud_alloydb_v1alpha_Cluster_NetworkConfig_descriptor = @@ -685,8 +745,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "SecondaryClusterNames", }); - internal_static_google_cloud_alloydb_v1alpha_Cluster_LabelsEntry_descriptor = + internal_static_google_cloud_alloydb_v1alpha_Cluster_PscConfig_descriptor = internal_static_google_cloud_alloydb_v1alpha_Cluster_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_alloydb_v1alpha_Cluster_PscConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1alpha_Cluster_PscConfig_descriptor, + new java.lang.String[] { + "PscEnabled", + }); + internal_static_google_cloud_alloydb_v1alpha_Cluster_LabelsEntry_descriptor = + internal_static_google_cloud_alloydb_v1alpha_Cluster_descriptor.getNestedTypes().get(4); internal_static_google_cloud_alloydb_v1alpha_Cluster_LabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_alloydb_v1alpha_Cluster_LabelsEntry_descriptor, @@ -694,7 +762,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_alloydb_v1alpha_Cluster_AnnotationsEntry_descriptor = - internal_static_google_cloud_alloydb_v1alpha_Cluster_descriptor.getNestedTypes().get(4); + internal_static_google_cloud_alloydb_v1alpha_Cluster_descriptor.getNestedTypes().get(5); internal_static_google_cloud_alloydb_v1alpha_Cluster_AnnotationsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_alloydb_v1alpha_Cluster_AnnotationsEntry_descriptor, @@ -730,7 +798,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Annotations", "UpdatePolicy", "ClientConnectionConfig", + "SatisfiesPzi", "SatisfiesPzs", + "PscInstanceConfig", + "NetworkConfig", }); internal_static_google_cloud_alloydb_v1alpha_Instance_MachineConfig_descriptor = internal_static_google_cloud_alloydb_v1alpha_Instance_descriptor.getNestedTypes().get(0); @@ -786,8 +857,47 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "RequireConnectors", "SslConfig", }); - internal_static_google_cloud_alloydb_v1alpha_Instance_LabelsEntry_descriptor = + internal_static_google_cloud_alloydb_v1alpha_Instance_PscInterfaceConfig_descriptor = internal_static_google_cloud_alloydb_v1alpha_Instance_descriptor.getNestedTypes().get(6); + internal_static_google_cloud_alloydb_v1alpha_Instance_PscInterfaceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1alpha_Instance_PscInterfaceConfig_descriptor, + new java.lang.String[] { + "ConsumerEndpointIps", "NetworkAttachment", + }); + internal_static_google_cloud_alloydb_v1alpha_Instance_PscInstanceConfig_descriptor = + internal_static_google_cloud_alloydb_v1alpha_Instance_descriptor.getNestedTypes().get(7); + internal_static_google_cloud_alloydb_v1alpha_Instance_PscInstanceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1alpha_Instance_PscInstanceConfig_descriptor, + new java.lang.String[] { + "ServiceAttachmentLink", + "AllowedConsumerProjects", + "AllowedConsumerNetworks", + "PscInterfaceConfigs", + "OutgoingServiceAttachmentLinks", + "PscEnabled", + }); + internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_descriptor = + internal_static_google_cloud_alloydb_v1alpha_Instance_descriptor.getNestedTypes().get(8); + internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_descriptor, + new java.lang.String[] { + "AuthorizedExternalNetworks", "EnablePublicIp", + }); + internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor = + internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_AuthorizedNetwork_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1alpha_Instance_InstanceNetworkConfig_AuthorizedNetwork_descriptor, + new java.lang.String[] { + "CidrRange", + }); + internal_static_google_cloud_alloydb_v1alpha_Instance_LabelsEntry_descriptor = + internal_static_google_cloud_alloydb_v1alpha_Instance_descriptor.getNestedTypes().get(9); internal_static_google_cloud_alloydb_v1alpha_Instance_LabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_alloydb_v1alpha_Instance_LabelsEntry_descriptor, @@ -795,7 +905,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_alloydb_v1alpha_Instance_DatabaseFlagsEntry_descriptor = - internal_static_google_cloud_alloydb_v1alpha_Instance_descriptor.getNestedTypes().get(7); + internal_static_google_cloud_alloydb_v1alpha_Instance_descriptor.getNestedTypes().get(10); internal_static_google_cloud_alloydb_v1alpha_Instance_DatabaseFlagsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_alloydb_v1alpha_Instance_DatabaseFlagsEntry_descriptor, @@ -803,7 +913,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_alloydb_v1alpha_Instance_AnnotationsEntry_descriptor = - internal_static_google_cloud_alloydb_v1alpha_Instance_descriptor.getNestedTypes().get(8); + internal_static_google_cloud_alloydb_v1alpha_Instance_descriptor.getNestedTypes().get(11); internal_static_google_cloud_alloydb_v1alpha_Instance_AnnotationsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_alloydb_v1alpha_Instance_AnnotationsEntry_descriptor, @@ -816,7 +926,7 @@ 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", "PemCertificateChain", "InstanceUid", + "Name", "IpAddress", "PublicIpAddress", "PemCertificateChain", "InstanceUid", }); internal_static_google_cloud_alloydb_v1alpha_Backup_descriptor = getDescriptor().getMessageTypes().get(13); @@ -844,6 +954,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SizeBytes", "ExpiryTime", "ExpiryQuantity", + "SatisfiesPzi", "SatisfiesPzs", "DatabaseVersion", }); @@ -915,21 +1026,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Password", "DatabaseRoles", "UserType", }); + internal_static_google_cloud_alloydb_v1alpha_Database_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_alloydb_v1alpha_Database_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1alpha_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.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/java/com/google/cloud/alloydb/v1alpha/ServiceProto.java b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ServiceProto.java index 3dad463d7709..35141dc88488 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ServiceProto.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/java/com/google/cloud/alloydb/v1alpha/ServiceProto.java @@ -199,6 +199,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_alloydb_v1alpha_DeleteUserRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_alloydb_v1alpha_DeleteUserRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1alpha_ListDatabasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1alpha_ListDatabasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_alloydb_v1alpha_ListDatabasesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_alloydb_v1alpha_ListDatabasesResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -374,221 +382,232 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\342A\001\001\022\027\n\007pem_csr\030\003 \001(\tB\006\030\001\342A\001\001\0226\n\rcert_du" + "ration\030\004 \001(\0132\031.google.protobuf.DurationB" + "\004\342A\001\001\022\030\n\npublic_key\030\005 \001(\tB\004\342A\001\001\022#\n\025use_m" - + "etadata_exchange\030\006 \001(\010B\004\342A\001\001\"~\n!Generate" - + "ClientCertificateResponse\022\035\n\017pem_certifi" - + "cate\030\001 \001(\tB\004\342A\001\003\022#\n\025pem_certificate_chai" - + "n\030\002 \003(\tB\004\342A\001\003\022\025\n\007ca_cert\030\003 \001(\tB\004\342A\001\001\"n\n\030" - + "GetConnectionInfoRequest\0228\n\006parent\030\001 \001(\t" - + "B(\342A\001\002\372A!\n\037alloydb.googleapis.com/Instan" - + "ce\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\"\210\003\n\021Operati" - + "onMetadata\022k\n\037batch_create_instances_met" - + "adata\030\010 \001(\0132:.google.cloud.alloydb.v1alp" - + "ha.BatchCreateInstancesMetadataB\004\342A\001\003H\000\022" - + "5\n\013create_time\030\001 \001(\0132\032.google.protobuf.T" - + "imestampB\004\342A\001\003\0222\n\010end_time\030\002 \001(\0132\032.googl" - + "e.protobuf.TimestampB\004\342A\001\003\022\024\n\006target\030\003 \001" - + "(\tB\004\342A\001\003\022\022\n\004verb\030\004 \001(\tB\004\342A\001\003\022\034\n\016status_m" - + "essage\030\005 \001(\tB\004\342A\001\003\022$\n\026requested_cancella" - + "tion\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_version\030\007 \001(\tB\004\342" - + "A\001\003B\022\n\020request_specific\"\251\001\n\020ListUsersReq" - + "uest\0224\n\006parent\030\001 \001(\tB$\342A\001\002\372A\035\022\033alloydb.g" - + "oogleapis.com/User\022\027\n\tpage_size\030\002 \001(\005B\004\342" - + "A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030" - + "\004 \001(\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001(\tB\004\342A\001\001\"t\n\021L" - + "istUsersResponse\0221\n\005users\030\001 \003(\0132\".google" - + ".cloud.alloydb.v1alpha.User\022\027\n\017next_page" - + "_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"D\n\016Get" - + "UserRequest\0222\n\004name\030\001 \001(\tB$\342A\001\002\372A\035\n\033allo" - + "ydb.googleapis.com/User\"\317\001\n\021CreateUserRe" - + "quest\0224\n\006parent\030\001 \001(\tB$\342A\001\002\372A\035\022\033alloydb." - + "googleapis.com/User\022\025\n\007user_id\030\002 \001(\tB\004\342A" - + "\001\002\0226\n\004user\030\003 \001(\0132\".google.cloud.alloydb." - + "v1alpha.UserB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004" - + "\342A\001\001\022\033\n\rvalidate_only\030\005 \001(\010B\004\342A\001\001\"\326\001\n\021Up" - + "dateUserRequest\0225\n\013update_mask\030\001 \001(\0132\032.g" - + "oogle.protobuf.FieldMaskB\004\342A\001\001\0226\n\004user\030\002" - + " \001(\0132\".google.cloud.alloydb.v1alpha.User" - + "B\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\022\033\n\rvali" - + "date_only\030\004 \001(\010B\004\342A\001\001\022\033\n\rallow_missing\030\005" - + " \001(\010B\004\342A\001\001\"~\n\021DeleteUserRequest\0222\n\004name\030" - + "\001 \001(\tB$\342A\001\002\372A\035\n\033alloydb.googleapis.com/U" - + "ser\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\022\033\n\rvalidat" - + "e_only\030\003 \001(\010B\004\342A\001\0012\3614\n\014AlloyDBAdmin\022\271\001\n\014" - + "ListClusters\0221.google.cloud.alloydb.v1al" - + "pha.ListClustersRequest\0322.google.cloud.a" - + "lloydb.v1alpha.ListClustersResponse\"B\332A\006" - + "parent\202\323\344\223\0023\0221/v1alpha/{parent=projects/" - + "*/locations/*}/clusters\022\246\001\n\nGetCluster\022/" - + ".google.cloud.alloydb.v1alpha.GetCluster" - + "Request\032%.google.cloud.alloydb.v1alpha.C" - + "luster\"@\332A\004name\202\323\344\223\0023\0221/v1alpha/{name=pr" - + "ojects/*/locations/*/clusters/*}\022\341\001\n\rCre" - + "ateCluster\0222.google.cloud.alloydb.v1alph" - + "a.CreateClusterRequest\032\035.google.longrunn" - + "ing.Operation\"}\312A\034\n\007Cluster\022\021OperationMe" - + "tadata\332A\031parent,cluster,cluster_id\202\323\344\223\002<" - + "\"1/v1alpha/{parent=projects/*/locations/" - + "*}/clusters:\007cluster\022\343\001\n\rUpdateCluster\0222" - + ".google.cloud.alloydb.v1alpha.UpdateClus" + + "etadata_exchange\030\006 \001(\010B\004\342A\001\001\"\200\001\n!Generat" + + "eClientCertificateResponse\022\037\n\017pem_certif" + + "icate\030\001 \001(\tB\006\030\001\342A\001\003\022#\n\025pem_certificate_c" + + "hain\030\002 \003(\tB\004\342A\001\003\022\025\n\007ca_cert\030\003 \001(\tB\004\342A\001\001\"" + + "n\n\030GetConnectionInfoRequest\0228\n\006parent\030\001 " + + "\001(\tB(\342A\001\002\372A!\n\037alloydb.googleapis.com/Ins" + + "tance\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\"\210\003\n\021Oper" + + "ationMetadata\022k\n\037batch_create_instances_" + + "metadata\030\010 \001(\0132:.google.cloud.alloydb.v1" + + "alpha.BatchCreateInstancesMetadataB\004\342A\001\003" + + "H\000\0225\n\013create_time\030\001 \001(\0132\032.google.protobu" + + "f.TimestampB\004\342A\001\003\0222\n\010end_time\030\002 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\004\342A\001\003\022\024\n\006target\030" + + "\003 \001(\tB\004\342A\001\003\022\022\n\004verb\030\004 \001(\tB\004\342A\001\003\022\034\n\016statu" + + "s_message\030\005 \001(\tB\004\342A\001\003\022$\n\026requested_cance" + + "llation\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_version\030\007 \001(\t" + + "B\004\342A\001\003B\022\n\020request_specific\"\251\001\n\020ListUsers" + + "Request\0224\n\006parent\030\001 \001(\tB$\342A\001\002\372A\035\022\033alloyd" + + "b.googleapis.com/User\022\027\n\tpage_size\030\002 \001(\005" + + "B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006filt" + + "er\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001(\tB\004\342A\001\001\"t" + + "\n\021ListUsersResponse\0221\n\005users\030\001 \003(\0132\".goo" + + "gle.cloud.alloydb.v1alpha.User\022\027\n\017next_p" + + "age_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"D\n\016" + + "GetUserRequest\0222\n\004name\030\001 \001(\tB$\342A\001\002\372A\035\n\033a" + + "lloydb.googleapis.com/User\"\317\001\n\021CreateUse" + + "rRequest\0224\n\006parent\030\001 \001(\tB$\342A\001\002\372A\035\022\033alloy" + + "db.googleapis.com/User\022\025\n\007user_id\030\002 \001(\tB" + + "\004\342A\001\002\0226\n\004user\030\003 \001(\0132\".google.cloud.alloy" + + "db.v1alpha.UserB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(" + + "\tB\004\342A\001\001\022\033\n\rvalidate_only\030\005 \001(\010B\004\342A\001\001\"\326\001\n" + + "\021UpdateUserRequest\0225\n\013update_mask\030\001 \001(\0132" + + "\032.google.protobuf.FieldMaskB\004\342A\001\001\0226\n\004use" + + "r\030\002 \001(\0132\".google.cloud.alloydb.v1alpha.U" + + "serB\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\022\033\n\rv" + + "alidate_only\030\004 \001(\010B\004\342A\001\001\022\033\n\rallow_missin" + + "g\030\005 \001(\010B\004\342A\001\001\"~\n\021DeleteUserRequest\0222\n\004na" + + "me\030\001 \001(\tB$\342A\001\002\372A\035\n\033alloydb.googleapis.co" + + "m/User\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\022\033\n\rvali" + + "date_only\030\003 \001(\010B\004\342A\001\001\"\231\001\n\024ListDatabasesR" + + "equest\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372A!\022\037alloydb" + + ".googleapis.com/Database\022\027\n\tpage_size\030\002 " + + "\001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006f" + + "ilter\030\004 \001(\tB\004\342A\001\001\"k\n\025ListDatabasesRespon" + + "se\0229\n\tdatabases\030\001 \003(\0132&.google.cloud.all" + + "oydb.v1alpha.Database\022\027\n\017next_page_token" + + "\030\002 \001(\t2\2746\n\014AlloyDBAdmin\022\271\001\n\014ListClusters" + + "\0221.google.cloud.alloydb.v1alpha.ListClus" + + "tersRequest\0322.google.cloud.alloydb.v1alp" + + "ha.ListClustersResponse\"B\332A\006parent\202\323\344\223\0023" + + "\0221/v1alpha/{parent=projects/*/locations/" + + "*}/clusters\022\246\001\n\nGetCluster\022/.google.clou" + + "d.alloydb.v1alpha.GetClusterRequest\032%.go" + + "ogle.cloud.alloydb.v1alpha.Cluster\"@\332A\004n" + + "ame\202\323\344\223\0023\0221/v1alpha/{name=projects/*/loc" + + "ations/*/clusters/*}\022\341\001\n\rCreateCluster\0222" + + ".google.cloud.alloydb.v1alpha.CreateClus" + "terRequest\032\035.google.longrunning.Operatio" - + "n\"\177\312A\034\n\007Cluster\022\021OperationMetadata\332A\023clu" - + "ster,update_mask\202\323\344\223\002D29/v1alpha/{cluste" - + "r.name=projects/*/locations/*/clusters/*" - + "}:\007cluster\022\321\001\n\rDeleteCluster\0222.google.cl" - + "oud.alloydb.v1alpha.DeleteClusterRequest" - + "\032\035.google.longrunning.Operation\"m\312A*\n\025go" - + "ogle.protobuf.Empty\022\021OperationMetadata\332A" - + "\004name\202\323\344\223\0023*1/v1alpha/{name=projects/*/l" - + "ocations/*/clusters/*}\022\320\001\n\016PromoteCluste" - + "r\0223.google.cloud.alloydb.v1alpha.Promote" - + "ClusterRequest\032\035.google.longrunning.Oper" - + "ation\"j\312A\034\n\007Cluster\022\021OperationMetadata\332A" - + "\004name\202\323\344\223\002>\"9/v1alpha/{name=projects/*/l" - + "ocations/*/clusters/*}:promote:\001*\022\311\001\n\016Re" - + "storeCluster\0223.google.cloud.alloydb.v1al" - + "pha.RestoreClusterRequest\032\035.google.longr" - + "unning.Operation\"c\312A\034\n\007Cluster\022\021Operatio" - + "nMetadata\202\323\344\223\002>\"9/v1alpha/{parent=projec" - + "ts/*/locations/*}/clusters:restore:\001*\022\204\002" - + "\n\026CreateSecondaryCluster\022;.google.cloud." - + "alloydb.v1alpha.CreateSecondaryClusterRe" - + "quest\032\035.google.longrunning.Operation\"\215\001\312" - + "A\034\n\007Cluster\022\021OperationMetadata\332A\031parent," - + "cluster,cluster_id\202\323\344\223\002L\"A/v1alpha/{pare" - + "nt=projects/*/locations/*}/clusters:crea" - + "tesecondary:\007cluster\022\310\001\n\rListInstances\0222" + + "n\"}\312A\034\n\007Cluster\022\021OperationMetadata\332A\031par" + + "ent,cluster,cluster_id\202\323\344\223\002<\"1/v1alpha/{" + + "parent=projects/*/locations/*}/clusters:" + + "\007cluster\022\343\001\n\rUpdateCluster\0222.google.clou" + + "d.alloydb.v1alpha.UpdateClusterRequest\032\035" + + ".google.longrunning.Operation\"\177\312A\034\n\007Clus" + + "ter\022\021OperationMetadata\332A\023cluster,update_" + + "mask\202\323\344\223\002D29/v1alpha/{cluster.name=proje" + + "cts/*/locations/*/clusters/*}:\007cluster\022\321" + + "\001\n\rDeleteCluster\0222.google.cloud.alloydb." + + "v1alpha.DeleteClusterRequest\032\035.google.lo" + + "ngrunning.Operation\"m\312A*\n\025google.protobu" + + "f.Empty\022\021OperationMetadata\332A\004name\202\323\344\223\0023*" + + "1/v1alpha/{name=projects/*/locations/*/c" + + "lusters/*}\022\320\001\n\016PromoteCluster\0223.google.c" + + "loud.alloydb.v1alpha.PromoteClusterReque" + + "st\032\035.google.longrunning.Operation\"j\312A\034\n\007" + + "Cluster\022\021OperationMetadata\332A\004name\202\323\344\223\002>\"" + + "9/v1alpha/{name=projects/*/locations/*/c" + + "lusters/*}:promote:\001*\022\311\001\n\016RestoreCluster" + + "\0223.google.cloud.alloydb.v1alpha.RestoreC" + + "lusterRequest\032\035.google.longrunning.Opera" + + "tion\"c\312A\034\n\007Cluster\022\021OperationMetadata\202\323\344" + + "\223\002>\"9/v1alpha/{parent=projects/*/locatio" + + "ns/*}/clusters:restore:\001*\022\204\002\n\026CreateSeco" + + "ndaryCluster\022;.google.cloud.alloydb.v1al" + + "pha.CreateSecondaryClusterRequest\032\035.goog" + + "le.longrunning.Operation\"\215\001\312A\034\n\007Cluster\022" + + "\021OperationMetadata\332A\031parent,cluster,clus" + + "ter_id\202\323\344\223\002L\"A/v1alpha/{parent=projects/" + + "*/locations/*}/clusters:createsecondary:" + + "\007cluster\022\310\001\n\rListInstances\0222.google.clou" + + "d.alloydb.v1alpha.ListInstancesRequest\0323" + ".google.cloud.alloydb.v1alpha.ListInstan" - + "cesRequest\0323.google.cloud.alloydb.v1alph" - + "a.ListInstancesResponse\"N\332A\006parent\202\323\344\223\002?" - + "\022=/v1alpha/{parent=projects/*/locations/" - + "*/clusters/*}/instances\022\265\001\n\013GetInstance\022" - + "0.google.cloud.alloydb.v1alpha.GetInstan" - + "ceRequest\032&.google.cloud.alloydb.v1alpha" - + ".Instance\"L\332A\004name\202\323\344\223\002?\022=/v1alpha/{name" - + "=projects/*/locations/*/clusters/*/insta" - + "nces/*}\022\364\001\n\016CreateInstance\0223.google.clou" - + "d.alloydb.v1alpha.CreateInstanceRequest\032" - + "\035.google.longrunning.Operation\"\215\001\312A\035\n\010In" - + "stance\022\021OperationMetadata\332A\033parent,insta" - + "nce,instance_id\202\323\344\223\002I\"=/v1alpha/{parent=" - + "projects/*/locations/*/clusters/*}/insta" - + "nces:\010instance\022\226\002\n\027CreateSecondaryInstan" - + "ce\022<.google.cloud.alloydb.v1alpha.Create" - + "SecondaryInstanceRequest\032\035.google.longru" - + "nning.Operation\"\235\001\312A\035\n\010Instance\022\021Operati" - + "onMetadata\332A\033parent,instance,instance_id" - + "\202\323\344\223\002Y\"M/v1alpha/{parent=projects/*/loca" - + "tions/*/clusters/*}/instances:createseco" - + "ndary:\010instance\022\202\002\n\024BatchCreateInstances" - + "\0229.google.cloud.alloydb.v1alpha.BatchCre" - + "ateInstancesRequest\032\035.google.longrunning" - + ".Operation\"\217\001\312A1\n\034BatchCreateInstancesRe" - + "sponse\022\021OperationMetadata\202\323\344\223\002U\"I/v1alph" - + "a/{parent=projects/*/locations/*/cluster" - + "s/*}/instances:batchCreate:\010requests\022\366\001\n" - + "\016UpdateInstance\0223.google.cloud.alloydb.v" - + "1alpha.UpdateInstanceRequest\032\035.google.lo" - + "ngrunning.Operation\"\217\001\312A\035\n\010Instance\022\021Ope" - + "rationMetadata\332A\024instance,update_mask\202\323\344" - + "\223\002R2F/v1alpha/{instance.name=projects/*/" - + "locations/*/clusters/*/instances/*}:\010ins" - + "tance\022\337\001\n\016DeleteInstance\0223.google.cloud." - + "alloydb.v1alpha.DeleteInstanceRequest\032\035." - + "google.longrunning.Operation\"y\312A*\n\025googl" - + "e.protobuf.Empty\022\021OperationMetadata\332A\004na" - + "me\202\323\344\223\002?*=/v1alpha/{name=projects/*/loca" - + "tions/*/clusters/*/instances/*}\022\342\001\n\020Fail" - + "overInstance\0225.google.cloud.alloydb.v1al" - + "pha.FailoverInstanceRequest\032\035.google.lon" - + "grunning.Operation\"x\312A\035\n\010Instance\022\021Opera" - + "tionMetadata\332A\004name\202\323\344\223\002K\"F/v1alpha/{nam" - + "e=projects/*/locations/*/clusters/*/inst" - + "ances/*}:failover:\001*\022\347\001\n\013InjectFault\0220.g" - + "oogle.cloud.alloydb.v1alpha.InjectFaultR" - + "equest\032\035.google.longrunning.Operation\"\206\001" - + "\312A\035\n\010Instance\022\021OperationMetadata\332A\017fault" - + "_type,name\202\323\344\223\002N\"I/v1alpha/{name=project" - + "s/*/locations/*/clusters/*/instances/*}:" - + "injectFault:\001*\022\337\001\n\017RestartInstance\0224.goo" - + "gle.cloud.alloydb.v1alpha.RestartInstanc" - + "eRequest\032\035.google.longrunning.Operation\"" - + "w\312A\035\n\010Instance\022\021OperationMetadata\332A\004name" - + "\202\323\344\223\002J\"E/v1alpha/{name=projects/*/locati" - + "ons/*/clusters/*/instances/*}:restart:\001*" - + "\022\265\001\n\013ListBackups\0220.google.cloud.alloydb." - + "v1alpha.ListBackupsRequest\0321.google.clou" - + "d.alloydb.v1alpha.ListBackupsResponse\"A\332" - + "A\006parent\202\323\344\223\0022\0220/v1alpha/{parent=project" - + "s/*/locations/*}/backups\022\242\001\n\tGetBackup\022." - + ".google.cloud.alloydb.v1alpha.GetBackupR" - + "equest\032$.google.cloud.alloydb.v1alpha.Ba" - + "ckup\"?\332A\004name\202\323\344\223\0022\0220/v1alpha/{name=proj" - + "ects/*/locations/*/backups/*}\022\332\001\n\014Create" - + "Backup\0221.google.cloud.alloydb.v1alpha.Cr" - + "eateBackupRequest\032\035.google.longrunning.O" - + "peration\"x\312A\033\n\006Backup\022\021OperationMetadata" - + "\332A\027parent,backup,backup_id\202\323\344\223\002:\"0/v1alp" - + "ha/{parent=projects/*/locations/*}/backu" - + "ps:\006backup\022\334\001\n\014UpdateBackup\0221.google.clo" - + "ud.alloydb.v1alpha.UpdateBackupRequest\032\035" - + ".google.longrunning.Operation\"z\312A\033\n\006Back" - + "up\022\021OperationMetadata\332A\022backup,update_ma" - + "sk\202\323\344\223\002A27/v1alpha/{backup.name=projects" - + "/*/locations/*/backups/*}:\006backup\022\316\001\n\014De" - + "leteBackup\0221.google.cloud.alloydb.v1alph" - + "a.DeleteBackupRequest\032\035.google.longrunni" - + "ng.Operation\"l\312A*\n\025google.protobuf.Empty" - + "\022\021OperationMetadata\332A\004name\202\323\344\223\0022*0/v1alp" - + "ha/{name=projects/*/locations/*/backups/" - + "*}\022\361\001\n\032ListSupportedDatabaseFlags\022?.goog" - + "le.cloud.alloydb.v1alpha.ListSupportedDa" - + "tabaseFlagsRequest\032@.google.cloud.alloyd" - + "b.v1alpha.ListSupportedDatabaseFlagsResp" - + "onse\"P\332A\006parent\202\323\344\223\002A\022?/v1alpha/{parent=" - + "projects/*/locations/*}/supportedDatabas" - + "eFlags\022\377\001\n\031GenerateClientCertificate\022>.g" - + "oogle.cloud.alloydb.v1alpha.GenerateClie" - + "ntCertificateRequest\032?.google.cloud.allo" - + "ydb.v1alpha.GenerateClientCertificateRes" - + "ponse\"a\332A\006parent\202\323\344\223\002R\"M/v1alpha/{parent" - + "=projects/*/locations/*/clusters/*}:gene" - + "rateClientCertificate:\001*\022\332\001\n\021GetConnecti" - + "onInfo\0226.google.cloud.alloydb.v1alpha.Ge" - + "tConnectionInfoRequest\032,.google.cloud.al" - + "loydb.v1alpha.ConnectionInfo\"_\332A\006parent\202" - + "\323\344\223\002P\022N/v1alpha/{parent=projects/*/locat" - + "ions/*/clusters/*/instances/*}/connectio" - + "nInfo\022\270\001\n\tListUsers\022..google.cloud.alloy" - + "db.v1alpha.ListUsersRequest\032/.google.clo" - + "ud.alloydb.v1alpha.ListUsersResponse\"J\332A" - + "\006parent\202\323\344\223\002;\0229/v1alpha/{parent=projects" - + "/*/locations/*/clusters/*}/users\022\245\001\n\007Get" - + "User\022,.google.cloud.alloydb.v1alpha.GetU" - + "serRequest\032\".google.cloud.alloydb.v1alph" - + "a.User\"H\332A\004name\202\323\344\223\002;\0229/v1alpha/{name=pr" - + "ojects/*/locations/*/clusters/*/users/*}" - + "\022\300\001\n\nCreateUser\022/.google.cloud.alloydb.v" - + "1alpha.CreateUserRequest\032\".google.cloud." - + "alloydb.v1alpha.User\"]\332A\023parent,user,use" - + "r_id\202\323\344\223\002A\"9/v1alpha/{parent=projects/*/" - + "locations/*/clusters/*}/users:\004user\022\302\001\n\n" - + "UpdateUser\022/.google.cloud.alloydb.v1alph" - + "a.UpdateUserRequest\032\".google.cloud.alloy" - + "db.v1alpha.User\"_\332A\020user,update_mask\202\323\344\223" - + "\002F2>/v1alpha/{user.name=projects/*/locat" - + "ions/*/clusters/*/users/*}:\004user\022\237\001\n\nDel" - + "eteUser\022/.google.cloud.alloydb.v1alpha.D" - + "eleteUserRequest\032\026.google.protobuf.Empty" - + "\"H\332A\004name\202\323\344\223\002;*9/v1alpha/{name=projects" - + "/*/locations/*/clusters/*/users/*}\032J\312A\026a" - + "lloydb.googleapis.com\322A.https://www.goog" - + "leapis.com/auth/cloud-platformB\316\001\n com.g" - + "oogle.cloud.alloydb.v1alphaB\014ServiceProt" - + "oP\001Z:cloud.google.com/go/alloydb/apiv1al" - + "pha/alloydbpb;alloydbpb\252\002\034Google.Cloud.A" - + "lloyDb.V1Alpha\312\002\034Google\\Cloud\\AlloyDb\\V1" - + "alpha\352\002\037Google::Cloud::AlloyDB::V1alphab" - + "\006proto3" + + "cesResponse\"N\332A\006parent\202\323\344\223\002?\022=/v1alpha/{" + + "parent=projects/*/locations/*/clusters/*" + + "}/instances\022\265\001\n\013GetInstance\0220.google.clo" + + "ud.alloydb.v1alpha.GetInstanceRequest\032&." + + "google.cloud.alloydb.v1alpha.Instance\"L\332" + + "A\004name\202\323\344\223\002?\022=/v1alpha/{name=projects/*/" + + "locations/*/clusters/*/instances/*}\022\364\001\n\016" + + "CreateInstance\0223.google.cloud.alloydb.v1" + + "alpha.CreateInstanceRequest\032\035.google.lon" + + "grunning.Operation\"\215\001\312A\035\n\010Instance\022\021Oper" + + "ationMetadata\332A\033parent,instance,instance" + + "_id\202\323\344\223\002I\"=/v1alpha/{parent=projects/*/l" + + "ocations/*/clusters/*}/instances:\010instan" + + "ce\022\226\002\n\027CreateSecondaryInstance\022<.google." + + "cloud.alloydb.v1alpha.CreateSecondaryIns" + + "tanceRequest\032\035.google.longrunning.Operat" + + "ion\"\235\001\312A\035\n\010Instance\022\021OperationMetadata\332A" + + "\033parent,instance,instance_id\202\323\344\223\002Y\"M/v1a" + + "lpha/{parent=projects/*/locations/*/clus" + + "ters/*}/instances:createsecondary:\010insta" + + "nce\022\202\002\n\024BatchCreateInstances\0229.google.cl" + + "oud.alloydb.v1alpha.BatchCreateInstances" + + "Request\032\035.google.longrunning.Operation\"\217" + + "\001\312A1\n\034BatchCreateInstancesResponse\022\021Oper" + + "ationMetadata\202\323\344\223\002U\"I/v1alpha/{parent=pr" + + "ojects/*/locations/*/clusters/*}/instanc" + + "es:batchCreate:\010requests\022\366\001\n\016UpdateInsta" + + "nce\0223.google.cloud.alloydb.v1alpha.Updat" + + "eInstanceRequest\032\035.google.longrunning.Op" + + "eration\"\217\001\312A\035\n\010Instance\022\021OperationMetada" + + "ta\332A\024instance,update_mask\202\323\344\223\002R2F/v1alph" + + "a/{instance.name=projects/*/locations/*/" + + "clusters/*/instances/*}:\010instance\022\337\001\n\016De" + + "leteInstance\0223.google.cloud.alloydb.v1al" + + "pha.DeleteInstanceRequest\032\035.google.longr" + + "unning.Operation\"y\312A*\n\025google.protobuf.E" + + "mpty\022\021OperationMetadata\332A\004name\202\323\344\223\002?*=/v" + + "1alpha/{name=projects/*/locations/*/clus" + + "ters/*/instances/*}\022\342\001\n\020FailoverInstance" + + "\0225.google.cloud.alloydb.v1alpha.Failover" + + "InstanceRequest\032\035.google.longrunning.Ope" + + "ration\"x\312A\035\n\010Instance\022\021OperationMetadata" + + "\332A\004name\202\323\344\223\002K\"F/v1alpha/{name=projects/*" + + "/locations/*/clusters/*/instances/*}:fai" + + "lover:\001*\022\347\001\n\013InjectFault\0220.google.cloud." + + "alloydb.v1alpha.InjectFaultRequest\032\035.goo" + + "gle.longrunning.Operation\"\206\001\312A\035\n\010Instanc" + + "e\022\021OperationMetadata\332A\017fault_type,name\202\323" + + "\344\223\002N\"I/v1alpha/{name=projects/*/location" + + "s/*/clusters/*/instances/*}:injectFault:" + + "\001*\022\337\001\n\017RestartInstance\0224.google.cloud.al" + + "loydb.v1alpha.RestartInstanceRequest\032\035.g" + + "oogle.longrunning.Operation\"w\312A\035\n\010Instan" + + "ce\022\021OperationMetadata\332A\004name\202\323\344\223\002J\"E/v1a" + + "lpha/{name=projects/*/locations/*/cluste" + + "rs/*/instances/*}:restart:\001*\022\265\001\n\013ListBac" + + "kups\0220.google.cloud.alloydb.v1alpha.List" + + "BackupsRequest\0321.google.cloud.alloydb.v1" + + "alpha.ListBackupsResponse\"A\332A\006parent\202\323\344\223" + + "\0022\0220/v1alpha/{parent=projects/*/location" + + "s/*}/backups\022\242\001\n\tGetBackup\022..google.clou" + + "d.alloydb.v1alpha.GetBackupRequest\032$.goo" + + "gle.cloud.alloydb.v1alpha.Backup\"?\332A\004nam" + + "e\202\323\344\223\0022\0220/v1alpha/{name=projects/*/locat" + + "ions/*/backups/*}\022\332\001\n\014CreateBackup\0221.goo" + + "gle.cloud.alloydb.v1alpha.CreateBackupRe" + + "quest\032\035.google.longrunning.Operation\"x\312A" + + "\033\n\006Backup\022\021OperationMetadata\332A\027parent,ba" + + "ckup,backup_id\202\323\344\223\002:\"0/v1alpha/{parent=p" + + "rojects/*/locations/*}/backups:\006backup\022\334" + + "\001\n\014UpdateBackup\0221.google.cloud.alloydb.v" + + "1alpha.UpdateBackupRequest\032\035.google.long" + + "running.Operation\"z\312A\033\n\006Backup\022\021Operatio" + + "nMetadata\332A\022backup,update_mask\202\323\344\223\002A27/v" + + "1alpha/{backup.name=projects/*/locations" + + "/*/backups/*}:\006backup\022\316\001\n\014DeleteBackup\0221" + + ".google.cloud.alloydb.v1alpha.DeleteBack" + + "upRequest\032\035.google.longrunning.Operation" + + "\"l\312A*\n\025google.protobuf.Empty\022\021OperationM" + + "etadata\332A\004name\202\323\344\223\0022*0/v1alpha/{name=pro" + + "jects/*/locations/*/backups/*}\022\361\001\n\032ListS" + + "upportedDatabaseFlags\022?.google.cloud.all" + + "oydb.v1alpha.ListSupportedDatabaseFlagsR" + + "equest\032@.google.cloud.alloydb.v1alpha.Li" + + "stSupportedDatabaseFlagsResponse\"P\332A\006par" + + "ent\202\323\344\223\002A\022?/v1alpha/{parent=projects/*/l" + + "ocations/*}/supportedDatabaseFlags\022\377\001\n\031G" + + "enerateClientCertificate\022>.google.cloud." + + "alloydb.v1alpha.GenerateClientCertificat" + + "eRequest\032?.google.cloud.alloydb.v1alpha." + + "GenerateClientCertificateResponse\"a\332A\006pa" + + "rent\202\323\344\223\002R\"M/v1alpha/{parent=projects/*/" + + "locations/*/clusters/*}:generateClientCe" + + "rtificate:\001*\022\332\001\n\021GetConnectionInfo\0226.goo" + + "gle.cloud.alloydb.v1alpha.GetConnectionI" + + "nfoRequest\032,.google.cloud.alloydb.v1alph" + + "a.ConnectionInfo\"_\332A\006parent\202\323\344\223\002P\022N/v1al" + + "pha/{parent=projects/*/locations/*/clust" + + "ers/*/instances/*}/connectionInfo\022\270\001\n\tLi" + + "stUsers\022..google.cloud.alloydb.v1alpha.L" + + "istUsersRequest\032/.google.cloud.alloydb.v" + + "1alpha.ListUsersResponse\"J\332A\006parent\202\323\344\223\002" + + ";\0229/v1alpha/{parent=projects/*/locations" + + "/*/clusters/*}/users\022\245\001\n\007GetUser\022,.googl" + + "e.cloud.alloydb.v1alpha.GetUserRequest\032\"" + + ".google.cloud.alloydb.v1alpha.User\"H\332A\004n" + + "ame\202\323\344\223\002;\0229/v1alpha/{name=projects/*/loc" + + "ations/*/clusters/*/users/*}\022\300\001\n\nCreateU" + + "ser\022/.google.cloud.alloydb.v1alpha.Creat" + + "eUserRequest\032\".google.cloud.alloydb.v1al" + + "pha.User\"]\332A\023parent,user,user_id\202\323\344\223\002A\"9" + + "/v1alpha/{parent=projects/*/locations/*/" + + "clusters/*}/users:\004user\022\302\001\n\nUpdateUser\022/" + + ".google.cloud.alloydb.v1alpha.UpdateUser" + + "Request\032\".google.cloud.alloydb.v1alpha.U" + + "ser\"_\332A\020user,update_mask\202\323\344\223\002F2>/v1alpha" + + "/{user.name=projects/*/locations/*/clust" + + "ers/*/users/*}:\004user\022\237\001\n\nDeleteUser\022/.go" + + "ogle.cloud.alloydb.v1alpha.DeleteUserReq" + + "uest\032\026.google.protobuf.Empty\"H\332A\004name\202\323\344" + + "\223\002;*9/v1alpha/{name=projects/*/locations" + + "/*/clusters/*/users/*}\022\310\001\n\rListDatabases" + + "\0222.google.cloud.alloydb.v1alpha.ListData" + + "basesRequest\0323.google.cloud.alloydb.v1al" + + "pha.ListDatabasesResponse\"N\332A\006parent\202\323\344\223" + + "\002?\022=/v1alpha/{parent=projects/*/location" + + "s/*/clusters/*}/databases\032J\312A\026alloydb.go" + + "ogleapis.com\322A.https://www.googleapis.co" + + "m/auth/cloud-platformB\316\001\n com.google.clo" + + "ud.alloydb.v1alphaB\014ServiceProtoP\001Z:clou" + + "d.google.com/go/alloydb/apiv1alpha/alloy" + + "dbpb;alloydbpb\252\002\034Google.Cloud.AlloyDb.V1" + + "Alpha\312\002\034Google\\Cloud\\AlloyDb\\V1alpha\352\002\037G" + + "oogle::Cloud::AlloyDB::V1alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -967,6 +986,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "RequestId", "ValidateOnly", }); + internal_static_google_cloud_alloydb_v1alpha_ListDatabasesRequest_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_cloud_alloydb_v1alpha_ListDatabasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1alpha_ListDatabasesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_alloydb_v1alpha_ListDatabasesResponse_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_google_cloud_alloydb_v1alpha_ListDatabasesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_alloydb_v1alpha_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-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 30b9e7ab9c09..eb213a55c215 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,13 +16,14 @@ syntax = "proto3"; package google.cloud.alloydb.v1alpha; -import "google/api/field_behavior.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"; @@ -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]; } @@ -427,6 +428,13 @@ message Cluster { [(google.api.field_behavior) = OUTPUT_ONLY]; } + // PscConfig contains PSC related configuration at a cluster level. + message PscConfig { + // Optional. Create an instance that allows connections from Private Service + // Connect endpoints to the instance. + bool psc_enabled = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // Cluster State enum State { // The state of the cluster is unknown. @@ -607,8 +615,15 @@ message Cluster { // Output only. Cross Region replication config specific to PRIMARY cluster. PrimaryConfig primary_config = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Reserved for future use. - bool satisfies_pzs = 30; + // Output only. Reserved for future use. + bool satisfies_pzi = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzs = 30 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The configuration for Private Service Connect (PSC) for the + // cluster. + PscConfig psc_config = 31 [(google.api.field_behavior) = OPTIONAL]; } // An Instance is a computing unit that an end customer can connect to. @@ -701,6 +716,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. @@ -860,7 +948,8 @@ 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. @@ -892,8 +981,20 @@ message Instance { ClientConnectionConfig client_connection_config = 23 [(google.api.field_behavior) = OPTIONAL]; - // Reserved for future use. - bool satisfies_pzs = 24; + // Output only. Reserved for future use. + bool satisfies_pzi = 30 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // 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. @@ -914,6 +1015,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 @@ -1083,8 +1192,11 @@ message Backup { QuantityBasedExpiry expiry_quantity = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Reserved for future use. - bool satisfies_pzs = 21; + // Output only. Reserved for future use. + bool satisfies_pzi = 23 [(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 @@ -1209,3 +1321,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-v1alpha/src/main/proto/google/cloud/alloydb/v1alpha/service.proto b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/proto/google/cloud/alloydb/v1alpha/service.proto index 554419c0e758..8ffe3d046399 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/proto/google/cloud/alloydb/v1alpha/service.proto +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/src/main/proto/google/cloud/alloydb/v1alpha/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: "/v1alpha/{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/v1alpha/alloydbadmin/listdatabases/AsyncListDatabases.java b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/AsyncListDatabases.java new file mode 100644 index 000000000000..b3b66ee638ae --- /dev/null +++ b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/AsyncListDatabases.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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.v1alpha.samples; + +// [START alloydb_v1alpha_generated_AlloyDBAdmin_ListDatabases_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient; +import com.google.cloud.alloydb.v1alpha.ClusterName; +import com.google.cloud.alloydb.v1alpha.Database; +import com.google.cloud.alloydb.v1alpha.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_v1alpha_generated_AlloyDBAdmin_ListDatabases_async] diff --git a/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/AsyncListDatabasesPaged.java b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/AsyncListDatabasesPaged.java new file mode 100644 index 000000000000..033eb499a878 --- /dev/null +++ b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/AsyncListDatabasesPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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.v1alpha.samples; + +// [START alloydb_v1alpha_generated_AlloyDBAdmin_ListDatabases_Paged_async] +import com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient; +import com.google.cloud.alloydb.v1alpha.ClusterName; +import com.google.cloud.alloydb.v1alpha.Database; +import com.google.cloud.alloydb.v1alpha.ListDatabasesRequest; +import com.google.cloud.alloydb.v1alpha.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_v1alpha_generated_AlloyDBAdmin_ListDatabases_Paged_async] diff --git a/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/SyncListDatabases.java b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/SyncListDatabases.java new file mode 100644 index 000000000000..1e752b48b72b --- /dev/null +++ b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/SyncListDatabases.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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.v1alpha.samples; + +// [START alloydb_v1alpha_generated_AlloyDBAdmin_ListDatabases_sync] +import com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient; +import com.google.cloud.alloydb.v1alpha.ClusterName; +import com.google.cloud.alloydb.v1alpha.Database; +import com.google.cloud.alloydb.v1alpha.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_v1alpha_generated_AlloyDBAdmin_ListDatabases_sync] diff --git a/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/SyncListDatabasesClustername.java b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/SyncListDatabasesClustername.java new file mode 100644 index 000000000000..a527c52a2f54 --- /dev/null +++ b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/SyncListDatabasesClustername.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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.v1alpha.samples; + +// [START alloydb_v1alpha_generated_AlloyDBAdmin_ListDatabases_Clustername_sync] +import com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient; +import com.google.cloud.alloydb.v1alpha.ClusterName; +import com.google.cloud.alloydb.v1alpha.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_v1alpha_generated_AlloyDBAdmin_ListDatabases_Clustername_sync] diff --git a/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/SyncListDatabasesString.java b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/SyncListDatabasesString.java new file mode 100644 index 000000000000..0d78eb3c6fdb --- /dev/null +++ b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1alpha/alloydbadmin/listdatabases/SyncListDatabasesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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.v1alpha.samples; + +// [START alloydb_v1alpha_generated_AlloyDBAdmin_ListDatabases_String_sync] +import com.google.cloud.alloydb.v1alpha.AlloyDBAdminClient; +import com.google.cloud.alloydb.v1alpha.ClusterName; +import com.google.cloud.alloydb.v1alpha.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_v1alpha_generated_AlloyDBAdmin_ListDatabases_String_sync]