From bc8bbd0794170806bb059fc12b21068ad4b7688f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 19:52:36 -0400 Subject: [PATCH] feat: [alloydb] Add new field in `GenerateClientCertificate` v1 API to allow AlloyDB connectors request client certs with metadata exchange support (#10024) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add new field in `GenerateClientCertificate` v1 API to allow AlloyDB connectors request client certs with metadata exchange support docs: Clarify that `readPoolConfig` is required under certain circumstances, and fix doc formatting on `allocatedIpRange`. PiperOrigin-RevId: 578577028 Source-Link: https://github.com/googleapis/googleapis/commit/c0a2b5427f7f5f5f2b4e7ff3e792936a470384a7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4791ced8186e658805f2f75243da29c5dabb1f76 Copy-Tag: eyJwIjoiamF2YS1hbGxveWRiLy5Pd2xCb3QueWFtbCIsImgiOiI0NzkxY2VkODE4NmU2NTg4MDVmMmY3NTI0M2RhMjljNWRhYmIxZjc2In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- java-alloydb/README.md | 4 +- .../cloud/alloydb/v1/AlloyDBAdminClient.java | 2 + .../com/google/cloud/alloydb/v1/Cluster.java | 36 +- .../v1/GenerateClientCertificateRequest.java | 101 +++++ ...rateClientCertificateRequestOrBuilder.java | 15 + .../com/google/cloud/alloydb/v1/Instance.java | 36 +- .../cloud/alloydb/v1/InstanceOrBuilder.java | 9 +- .../google/cloud/alloydb/v1/ServiceProto.java | 409 +++++++++--------- .../google/cloud/alloydb/v1/resources.proto | 7 +- .../google/cloud/alloydb/v1/service.proto | 5 + .../AsyncGenerateClientCertificate.java | 1 + .../SyncGenerateClientCertificate.java | 1 + 12 files changed, 384 insertions(+), 242 deletions(-) diff --git a/java-alloydb/README.md b/java-alloydb/README.md index a6ce42513877..4e017d24d338 100644 --- a/java-alloydb/README.md +++ b/java-alloydb/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.26.0 pom import @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-alloydb/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-alloydb.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb/0.13.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb/0.18.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/v1/AlloyDBAdminClient.java b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1/AlloyDBAdminClient.java index 9060e3c2fa21..9c1d52d96cbe 100644 --- a/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1/AlloyDBAdminClient.java +++ b/java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1/AlloyDBAdminClient.java @@ -3872,6 +3872,7 @@ public final GenerateClientCertificateResponse generateClientCertificate(String * .setRequestId("requestId693933066") * .setCertDuration(Duration.newBuilder().build()) * .setPublicKey("publicKey1446899510") + * .setUseMetadataExchange(true) * .build(); * GenerateClientCertificateResponse response = * alloyDBAdminClient.generateClientCertificate(request); @@ -3908,6 +3909,7 @@ public final GenerateClientCertificateResponse generateClientCertificate( * .setRequestId("requestId693933066") * .setCertDuration(Duration.newBuilder().build()) * .setPublicKey("publicKey1446899510") + * .setUseMetadataExchange(true) * .build(); * ApiFuture future = * alloyDBAdminClient.generateClientCertificateCallable().futureCall(request); diff --git a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/Cluster.java b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/Cluster.java index 05f128e62e15..b74673ce29b9 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/Cluster.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/Cluster.java @@ -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]; @@ -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]; @@ -1345,8 +1345,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]; @@ -1373,8 +1373,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]; @@ -1401,8 +1401,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]; @@ -1428,8 +1428,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]; @@ -1451,8 +1451,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]; diff --git a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/GenerateClientCertificateRequest.java b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/GenerateClientCertificateRequest.java index a6eae5037949..b0eac239aef3 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/GenerateClientCertificateRequest.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/GenerateClientCertificateRequest.java @@ -314,6 +314,26 @@ public com.google.protobuf.ByteString getPublicKeyBytes() { } } + public static final int USE_METADATA_EXCHANGE_FIELD_NUMBER = 6; + private boolean useMetadataExchange_ = false; + /** + * + * + *
+   * Optional. An optional hint to the endpoint to generate a client
+   * ceritificate that can be used by AlloyDB connectors to exchange additional
+   * metadata with the server after TLS handshake.
+   * 
+ * + * bool use_metadata_exchange = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useMetadataExchange. + */ + @java.lang.Override + public boolean getUseMetadataExchange() { + return useMetadataExchange_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -340,6 +360,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, publicKey_); } + if (useMetadataExchange_ != false) { + output.writeBool(6, useMetadataExchange_); + } getUnknownFields().writeTo(output); } @@ -361,6 +384,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, publicKey_); } + if (useMetadataExchange_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, useMetadataExchange_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -384,6 +410,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCertDuration().equals(other.getCertDuration())) return false; } if (!getPublicKey().equals(other.getPublicKey())) return false; + if (getUseMetadataExchange() != other.getUseMetadataExchange()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -405,6 +432,8 @@ public int hashCode() { } hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; hash = (53 * hash) + getPublicKey().hashCode(); + hash = (37 * hash) + USE_METADATA_EXCHANGE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseMetadataExchange()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -554,6 +583,7 @@ public Builder clear() { certDurationBuilder_ = null; } publicKey_ = ""; + useMetadataExchange_ = false; return this; } @@ -605,6 +635,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000008) != 0)) { result.publicKey_ = publicKey_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.useMetadataExchange_ = useMetadataExchange_; + } } @java.lang.Override @@ -672,6 +705,9 @@ public Builder mergeFrom(com.google.cloud.alloydb.v1.GenerateClientCertificateRe bitField0_ |= 0x00000008; onChanged(); } + if (other.getUseMetadataExchange() != false) { + setUseMetadataExchange(other.getUseMetadataExchange()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -722,6 +758,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 42 + case 48: + { + useMetadataExchange_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 48 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1362,6 +1404,65 @@ public Builder setPublicKeyBytes(com.google.protobuf.ByteString value) { return this; } + private boolean useMetadataExchange_; + /** + * + * + *
+     * Optional. An optional hint to the endpoint to generate a client
+     * ceritificate that can be used by AlloyDB connectors to exchange additional
+     * metadata with the server after TLS handshake.
+     * 
+ * + * bool use_metadata_exchange = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useMetadataExchange. + */ + @java.lang.Override + public boolean getUseMetadataExchange() { + return useMetadataExchange_; + } + /** + * + * + *
+     * Optional. An optional hint to the endpoint to generate a client
+     * ceritificate that can be used by AlloyDB connectors to exchange additional
+     * metadata with the server after TLS handshake.
+     * 
+ * + * bool use_metadata_exchange = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The useMetadataExchange to set. + * @return This builder for chaining. + */ + public Builder setUseMetadataExchange(boolean value) { + + useMetadataExchange_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional hint to the endpoint to generate a client
+     * ceritificate that can be used by AlloyDB connectors to exchange additional
+     * metadata with the server after TLS handshake.
+     * 
+ * + * bool use_metadata_exchange = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearUseMetadataExchange() { + bitField0_ = (bitField0_ & ~0x00000010); + useMetadataExchange_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/GenerateClientCertificateRequestOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/GenerateClientCertificateRequestOrBuilder.java index 3762eb492b68..2e4ceba13d92 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/GenerateClientCertificateRequestOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/GenerateClientCertificateRequestOrBuilder.java @@ -177,4 +177,19 @@ public interface GenerateClientCertificateRequestOrBuilder * @return The bytes for publicKey. */ com.google.protobuf.ByteString getPublicKeyBytes(); + + /** + * + * + *
+   * Optional. An optional hint to the endpoint to generate a client
+   * ceritificate that can be used by AlloyDB connectors to exchange additional
+   * metadata with the server after TLS handshake.
+   * 
+ * + * bool use_metadata_exchange = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useMetadataExchange. + */ + boolean getUseMetadataExchange(); } diff --git a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/Instance.java b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/Instance.java index a2453b0154d8..59494203cf80 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/Instance.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/Instance.java @@ -6064,7 +6064,8 @@ public com.google.cloud.alloydb.v1.Instance.QueryInsightsInstanceConfig getQuery * * *
-   * Read pool specific config.
+   * Read pool instance configuration.
+   * This is required if the value of instanceType is READ_POOL.
    * 
* * .google.cloud.alloydb.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -6079,7 +6080,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.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -6096,7 +6098,8 @@ public com.google.cloud.alloydb.v1.Instance.ReadPoolConfig getReadPoolConfig() { * * *
-   * Read pool specific config.
+   * Read pool instance configuration.
+   * This is required if the value of instanceType is READ_POOL.
    * 
* * .google.cloud.alloydb.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -10288,7 +10291,8 @@ public Builder clearQueryInsightsConfig() { * * *
-     * Read pool specific config.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* * .google.cloud.alloydb.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -10302,7 +10306,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.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -10322,7 +10327,8 @@ public com.google.cloud.alloydb.v1.Instance.ReadPoolConfig getReadPoolConfig() { * * *
-     * Read pool specific config.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* * .google.cloud.alloydb.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -10344,7 +10350,8 @@ public Builder setReadPoolConfig(com.google.cloud.alloydb.v1.Instance.ReadPoolCo * * *
-     * Read pool specific config.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* * .google.cloud.alloydb.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -10364,7 +10371,8 @@ public Builder setReadPoolConfig( * * *
-     * Read pool specific config.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* * .google.cloud.alloydb.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -10390,7 +10398,8 @@ public Builder mergeReadPoolConfig(com.google.cloud.alloydb.v1.Instance.ReadPool * * *
-     * Read pool specific config.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* * .google.cloud.alloydb.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -10409,7 +10418,8 @@ public Builder clearReadPoolConfig() { * * *
-     * Read pool specific config.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* * .google.cloud.alloydb.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -10423,7 +10433,8 @@ public com.google.cloud.alloydb.v1.Instance.ReadPoolConfig.Builder getReadPoolCo * * *
-     * Read pool specific config.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* * .google.cloud.alloydb.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -10442,7 +10453,8 @@ public com.google.cloud.alloydb.v1.Instance.ReadPoolConfig.Builder getReadPoolCo * * *
-     * Read pool specific config.
+     * Read pool instance configuration.
+     * This is required if the value of instanceType is READ_POOL.
      * 
* * .google.cloud.alloydb.v1.Instance.ReadPoolConfig read_pool_config = 14; diff --git a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/InstanceOrBuilder.java b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/InstanceOrBuilder.java index aaec563890ea..f5c76c7d23e9 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/InstanceOrBuilder.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/InstanceOrBuilder.java @@ -731,7 +731,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.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -743,7 +744,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.v1.Instance.ReadPoolConfig read_pool_config = 14; @@ -755,7 +757,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.v1.Instance.ReadPoolConfig read_pool_config = 14; diff --git a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/ServiceProto.java b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/ServiceProto.java index 5868ae7cf1d9..aecd3593233c 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/ServiceProto.java +++ b/java-alloydb/proto-google-cloud-alloydb-v1/src/main/java/com/google/cloud/alloydb/v1/ServiceProto.java @@ -364,214 +364,215 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\"ListSupportedDatabaseFlagsResponse\022P\n\030" + "supported_database_flags\030\001 \003(\0132..google." + "cloud.alloydb.v1.SupportedDatabaseFlag\022\027" - + "\n\017next_page_token\030\002 \001(\t\"\307\001\n GenerateClie" + + "\n\017next_page_token\030\002 \001(\t\"\354\001\n GenerateClie" + "ntCertificateRequest\0227\n\006parent\030\001 \001(\tB\'\342A" + "\001\002\372A \n\036alloydb.googleapis.com/Cluster\022\030\n" + "\nrequest_id\030\002 \001(\tB\004\342A\001\001\0226\n\rcert_duration" + "\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\"_\n!GenerateCli" - + "entCertificateResponse\022#\n\025pem_certificat" - + "e_chain\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/" - + "Instance\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\"\203\003\n\021O" - + "perationMetadata\022f\n\037batch_create_instanc" - + "es_metadata\030\010 \001(\01325.google.cloud.alloydb" - + ".v1.BatchCreateInstancesMetadataB\004\342A\001\003H\000" - + "\0225\n\013create_time\030\001 \001(\0132\032.google.protobuf." - + "TimestampB\004\342A\001\003\0222\n\010end_time\030\002 \001(\0132\032.goog" - + "le.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_" - + "message\030\005 \001(\tB\004\342A\001\003\022$\n\026requested_cancell" - + "ation\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_version\030\007 \001(\tB\004" - + "\342A\001\003B\022\n\020request_specific\"\251\001\n\020ListUsersRe" - + "quest\0224\n\006parent\030\001 \001(\tB$\342A\001\002\372A\035\022\033alloydb." - + "googleapis.com/User\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\006filter" - + "\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001(\tB\004\342A\001\001\"o\n\021" - + "ListUsersResponse\022,\n\005users\030\001 \003(\0132\035.googl" - + "e.cloud.alloydb.v1.User\022\027\n\017next_page_tok" - + "en\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"D\n\016GetUser" - + "Request\0222\n\004name\030\001 \001(\tB$\342A\001\002\372A\035\n\033alloydb." - + "googleapis.com/User\"\312\001\n\021CreateUserReques" - + "t\0224\n\006parent\030\001 \001(\tB$\342A\001\002\372A\035\022\033alloydb.goog" - + "leapis.com/User\022\025\n\007user_id\030\002 \001(\tB\004\342A\001\002\0221" - + "\n\004user\030\003 \001(\0132\035.google.cloud.alloydb.v1.U" - + "serB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\022\033\n\rv" - + "alidate_only\030\005 \001(\010B\004\342A\001\001\"\321\001\n\021UpdateUserR" - + "equest\0225\n\013update_mask\030\001 \001(\0132\032.google.pro" - + "tobuf.FieldMaskB\004\342A\001\001\0221\n\004user\030\002 \001(\0132\035.go" - + "ogle.cloud.alloydb.v1.UserB\004\342A\001\002\022\030\n\nrequ" - + "est_id\030\003 \001(\tB\004\342A\001\001\022\033\n\rvalidate_only\030\004 \001(" - + "\010B\004\342A\001\001\022\033\n\rallow_missing\030\005 \001(\010B\004\342A\001\001\"~\n\021" - + "DeleteUserRequest\0222\n\004name\030\001 \001(\tB$\342A\001\002\372A\035" - + "\n\033alloydb.googleapis.com/User\022\030\n\nrequest" - + "_id\030\002 \001(\tB\004\342A\001\001\022\033\n\rvalidate_only\030\003 \001(\010B\004" - + "\342A\001\0012\3721\n\014AlloyDBAdmin\022\252\001\n\014ListClusters\022," - + ".google.cloud.alloydb.v1.ListClustersReq" - + "uest\032-.google.cloud.alloydb.v1.ListClust" - + "ersResponse\"=\332A\006parent\202\323\344\223\002.\022,/v1/{paren" - + "t=projects/*/locations/*}/clusters\022\227\001\n\nG" - + "etCluster\022*.google.cloud.alloydb.v1.GetC" - + "lusterRequest\032 .google.cloud.alloydb.v1." - + "Cluster\";\332A\004name\202\323\344\223\002.\022,/v1/{name=projec" - + "ts/*/locations/*/clusters/*}\022\327\001\n\rCreateC" - + "luster\022-.google.cloud.alloydb.v1.CreateC" + + "\030\n\npublic_key\030\005 \001(\tB\004\342A\001\001\022#\n\025use_metadat" + + "a_exchange\030\006 \001(\010B\004\342A\001\001\"_\n!GenerateClient" + + "CertificateResponse\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\"\203\003\n\021Oper" + + "ationMetadata\022f\n\037batch_create_instances_" + + "metadata\030\010 \001(\01325.google.cloud.alloydb.v1" + + ".BatchCreateInstancesMetadataB\004\342A\001\003H\000\0225\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.Tim" + + "estampB\004\342A\001\003\0222\n\010end_time\030\002 \001(\0132\032.google." + + "protobuf.TimestampB\004\342A\001\003\022\024\n\006target\030\003 \001(\t" + + "B\004\342A\001\003\022\022\n\004verb\030\004 \001(\tB\004\342A\001\003\022\034\n\016status_mes" + + "sage\030\005 \001(\tB\004\342A\001\003\022$\n\026requested_cancellati" + + "on\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_version\030\007 \001(\tB\004\342A\001" + + "\003B\022\n\020request_specific\"\251\001\n\020ListUsersReque" + + "st\0224\n\006parent\030\001 \001(\tB$\342A\001\002\372A\035\022\033alloydb.goo" + + "gleapis.com/User\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\006filter\030\004 " + + "\001(\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001(\tB\004\342A\001\001\"o\n\021Lis" + + "tUsersResponse\022,\n\005users\030\001 \003(\0132\035.google.c" + + "loud.alloydb.v1.User\022\027\n\017next_page_token\030" + + "\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"D\n\016GetUserReq" + + "uest\0222\n\004name\030\001 \001(\tB$\342A\001\002\372A\035\n\033alloydb.goo" + + "gleapis.com/User\"\312\001\n\021CreateUserRequest\0224" + + "\n\006parent\030\001 \001(\tB$\342A\001\002\372A\035\022\033alloydb.googlea" + + "pis.com/User\022\025\n\007user_id\030\002 \001(\tB\004\342A\001\002\0221\n\004u" + + "ser\030\003 \001(\0132\035.google.cloud.alloydb.v1.User" + + "B\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\022\033\n\rvali" + + "date_only\030\005 \001(\010B\004\342A\001\001\"\321\001\n\021UpdateUserRequ" + + "est\0225\n\013update_mask\030\001 \001(\0132\032.google.protob" + + "uf.FieldMaskB\004\342A\001\001\0221\n\004user\030\002 \001(\0132\035.googl" + + "e.cloud.alloydb.v1.UserB\004\342A\001\002\022\030\n\nrequest" + + "_id\030\003 \001(\tB\004\342A\001\001\022\033\n\rvalidate_only\030\004 \001(\010B\004" + + "\342A\001\001\022\033\n\rallow_missing\030\005 \001(\010B\004\342A\001\001\"~\n\021Del" + + "eteUserRequest\0222\n\004name\030\001 \001(\tB$\342A\001\002\372A\035\n\033a" + + "lloydb.googleapis.com/User\022\030\n\nrequest_id" + + "\030\002 \001(\tB\004\342A\001\001\022\033\n\rvalidate_only\030\003 \001(\010B\004\342A\001" + + "\0012\3721\n\014AlloyDBAdmin\022\252\001\n\014ListClusters\022,.go" + + "ogle.cloud.alloydb.v1.ListClustersReques" + + "t\032-.google.cloud.alloydb.v1.ListClusters" + + "Response\"=\332A\006parent\202\323\344\223\002.\022,/v1/{parent=p" + + "rojects/*/locations/*}/clusters\022\227\001\n\nGetC" + + "luster\022*.google.cloud.alloydb.v1.GetClus" + + "terRequest\032 .google.cloud.alloydb.v1.Clu" + + "ster\";\332A\004name\202\323\344\223\002.\022,/v1/{name=projects/" + + "*/locations/*/clusters/*}\022\327\001\n\rCreateClus" + + "ter\022-.google.cloud.alloydb.v1.CreateClus" + + "terRequest\032\035.google.longrunning.Operatio" + + "n\"x\312A\034\n\007Cluster\022\021OperationMetadata\332A\031par" + + "ent,cluster,cluster_id\202\323\344\223\0027\",/v1/{paren" + + "t=projects/*/locations/*}/clusters:\007clus" + + "ter\022\331\001\n\rUpdateCluster\022-.google.cloud.all" + + "oydb.v1.UpdateClusterRequest\032\035.google.lo" + + "ngrunning.Operation\"z\312A\034\n\007Cluster\022\021Opera" + + "tionMetadata\332A\023cluster,update_mask\202\323\344\223\002?" + + "24/v1/{cluster.name=projects/*/locations" + + "/*/clusters/*}:\007cluster\022\307\001\n\rDeleteCluste" + + "r\022-.google.cloud.alloydb.v1.DeleteCluste" + + "rRequest\032\035.google.longrunning.Operation\"" + + "h\312A*\n\025google.protobuf.Empty\022\021OperationMe" + + "tadata\332A\004name\202\323\344\223\002.*,/v1/{name=projects/" + + "*/locations/*/clusters/*}\022\306\001\n\016PromoteClu" + + "ster\022..google.cloud.alloydb.v1.PromoteCl" + + "usterRequest\032\035.google.longrunning.Operat" + + "ion\"e\312A\034\n\007Cluster\022\021OperationMetadata\332A\004n" + + "ame\202\323\344\223\0029\"4/v1/{name=projects/*/location" + + "s/*/clusters/*}:promote:\001*\022\277\001\n\016RestoreCl" + + "uster\022..google.cloud.alloydb.v1.RestoreC" + "lusterRequest\032\035.google.longrunning.Opera" - + "tion\"x\312A\034\n\007Cluster\022\021OperationMetadata\332A\031" - + "parent,cluster,cluster_id\202\323\344\223\0027\",/v1/{pa" - + "rent=projects/*/locations/*}/clusters:\007c" - + "luster\022\331\001\n\rUpdateCluster\022-.google.cloud." - + "alloydb.v1.UpdateClusterRequest\032\035.google" - + ".longrunning.Operation\"z\312A\034\n\007Cluster\022\021Op" - + "erationMetadata\332A\023cluster,update_mask\202\323\344" - + "\223\002?24/v1/{cluster.name=projects/*/locati" - + "ons/*/clusters/*}:\007cluster\022\307\001\n\rDeleteClu" - + "ster\022-.google.cloud.alloydb.v1.DeleteClu" - + "sterRequest\032\035.google.longrunning.Operati" - + "on\"h\312A*\n\025google.protobuf.Empty\022\021Operatio" - + "nMetadata\332A\004name\202\323\344\223\002.*,/v1/{name=projec" - + "ts/*/locations/*/clusters/*}\022\306\001\n\016Promote" - + "Cluster\022..google.cloud.alloydb.v1.Promot" - + "eClusterRequest\032\035.google.longrunning.Ope" - + "ration\"e\312A\034\n\007Cluster\022\021OperationMetadata\332" - + "A\004name\202\323\344\223\0029\"4/v1/{name=projects/*/locat" - + "ions/*/clusters/*}:promote:\001*\022\277\001\n\016Restor" - + "eCluster\022..google.cloud.alloydb.v1.Resto" - + "reClusterRequest\032\035.google.longrunning.Op" - + "eration\"^\312A\034\n\007Cluster\022\021OperationMetadata" - + "\202\323\344\223\0029\"4/v1/{parent=projects/*/locations" - + "/*}/clusters:restore:\001*\022\372\001\n\026CreateSecond" - + "aryCluster\0226.google.cloud.alloydb.v1.Cre" - + "ateSecondaryClusterRequest\032\035.google.long" - + "running.Operation\"\210\001\312A\034\n\007Cluster\022\021Operat" - + "ionMetadata\332A\031parent,cluster,cluster_id\202" - + "\323\344\223\002G\" future = alloyDBAdminClient.generateClientCertificateCallable().futureCall(request); diff --git a/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1/alloydbadmin/generateclientcertificate/SyncGenerateClientCertificate.java b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1/alloydbadmin/generateclientcertificate/SyncGenerateClientCertificate.java index fc3e3ebe58c0..f925a5014f6f 100644 --- a/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1/alloydbadmin/generateclientcertificate/SyncGenerateClientCertificate.java +++ b/java-alloydb/samples/snippets/generated/com/google/cloud/alloydb/v1/alloydbadmin/generateclientcertificate/SyncGenerateClientCertificate.java @@ -42,6 +42,7 @@ public static void syncGenerateClientCertificate() throws Exception { .setRequestId("requestId693933066") .setCertDuration(Duration.newBuilder().build()) .setPublicKey("publicKey1446899510") + .setUseMetadataExchange(true) .build(); GenerateClientCertificateResponse response = alloyDBAdminClient.generateClientCertificate(request);