Skip to content

Commit

Permalink
feat: [secretmanager] update public API to include annotation support (
Browse files Browse the repository at this point in the history
…#8921)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 496410329

Source-Link: https://togithub.com/googleapis/googleapis/commit/cc3837ae30818a91caf893b70244b5245d089f49

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/fc0d1d212432583a11cd56c3b5c3e06252caf4ec
Copy-Tag: eyJwIjoiamF2YS1zZWNyZXRtYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiJmYzBkMWQyMTI0MzI1ODNhMTFjZDU2YzNiNWMzZTA2MjUyY2FmNGVjIn0=
  • Loading branch information
gcf-owl-bot[bot] committed Dec 20, 2022
1 parent 1591535 commit 262aeee
Show file tree
Hide file tree
Showing 23 changed files with 2,510 additions and 1,171 deletions.
6 changes: 3 additions & 3 deletions java-secretmanager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-secretmanager</artifactId>
<version>2.6.0</version>
<version>2.7.0</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-secretmanager:2.6.0'
implementation 'com.google.cloud:google-cloud-secretmanager:2.7.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-secretmanager" % "2.6.0"
libraryDependencies += "com.google.cloud" % "google-cloud-secretmanager" % "2.7.0"
```

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public void createSecretTest() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -257,6 +258,7 @@ public void createSecretTest2() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -414,6 +416,7 @@ public void getSecretTest() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -465,6 +468,7 @@ public void getSecretTest2() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -516,6 +520,7 @@ public void updateSecretTest() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
mockService.addResponse(expectedResponse);

Expand All @@ -529,6 +534,7 @@ public void updateSecretTest() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
FieldMask updateMask = FieldMask.newBuilder().build();

Expand Down Expand Up @@ -568,6 +574,7 @@ public void updateSecretExceptionTest() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
FieldMask updateMask = FieldMask.newBuilder().build();
client.updateSecret(secret, updateMask);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ public void createSecretTest() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
mockSecretManagerService.addResponse(expectedResponse);

Expand Down Expand Up @@ -244,6 +245,7 @@ public void createSecretTest2() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
mockSecretManagerService.addResponse(expectedResponse);

Expand Down Expand Up @@ -387,6 +389,7 @@ public void getSecretTest() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
mockSecretManagerService.addResponse(expectedResponse);

Expand Down Expand Up @@ -432,6 +435,7 @@ public void getSecretTest2() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
mockSecretManagerService.addResponse(expectedResponse);

Expand Down Expand Up @@ -477,6 +481,7 @@ public void updateSecretTest() throws Exception {
.setEtag("etag3123477")
.setRotation(Rotation.newBuilder().build())
.putAllVersionAliases(new HashMap<String, Long>())
.putAllAnnotations(new HashMap<String, String>())
.build();
mockSecretManagerService.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* <pre>
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret
* payloads.
* For secrets using the [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged] replication
* policy type, Cloud KMS CryptoKeys must reside in the same location as the
* [replica location][Secret.UserManaged.Replica.location].
* For secrets using the [Automatic][google.cloud.secretmanager.v1.Replication.Automatic] replication policy
* type, Cloud KMS CryptoKeys must reside in `global`.
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt
* secret payloads.
* For secrets using the
* [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged]
* replication policy type, Cloud KMS CryptoKeys must reside in the same
* location as the [replica location][Secret.UserManaged.Replica.location].
* For secrets using the
* [Automatic][google.cloud.secretmanager.v1.Replication.Automatic]
* replication policy type, Cloud KMS CryptoKeys must reside in `global`.
* The expected format is `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;`.
* </pre>
*
Expand All @@ -104,13 +106,15 @@ public java.lang.String getKmsKeyName() {
*
*
* <pre>
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret
* payloads.
* For secrets using the [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged] replication
* policy type, Cloud KMS CryptoKeys must reside in the same location as the
* [replica location][Secret.UserManaged.Replica.location].
* For secrets using the [Automatic][google.cloud.secretmanager.v1.Replication.Automatic] replication policy
* type, Cloud KMS CryptoKeys must reside in `global`.
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt
* secret payloads.
* For secrets using the
* [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged]
* replication policy type, Cloud KMS CryptoKeys must reside in the same
* location as the [replica location][Secret.UserManaged.Replica.location].
* For secrets using the
* [Automatic][google.cloud.secretmanager.v1.Replication.Automatic]
* replication policy type, Cloud KMS CryptoKeys must reside in `global`.
* The expected format is `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;`.
* </pre>
*
Expand Down Expand Up @@ -468,13 +472,15 @@ public Builder mergeFrom(
*
*
* <pre>
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret
* payloads.
* For secrets using the [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged] replication
* policy type, Cloud KMS CryptoKeys must reside in the same location as the
* [replica location][Secret.UserManaged.Replica.location].
* For secrets using the [Automatic][google.cloud.secretmanager.v1.Replication.Automatic] replication policy
* type, Cloud KMS CryptoKeys must reside in `global`.
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt
* secret payloads.
* For secrets using the
* [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged]
* replication policy type, Cloud KMS CryptoKeys must reside in the same
* location as the [replica location][Secret.UserManaged.Replica.location].
* For secrets using the
* [Automatic][google.cloud.secretmanager.v1.Replication.Automatic]
* replication policy type, Cloud KMS CryptoKeys must reside in `global`.
* The expected format is `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;`.
* </pre>
*
Expand All @@ -497,13 +503,15 @@ public java.lang.String getKmsKeyName() {
*
*
* <pre>
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret
* payloads.
* For secrets using the [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged] replication
* policy type, Cloud KMS CryptoKeys must reside in the same location as the
* [replica location][Secret.UserManaged.Replica.location].
* For secrets using the [Automatic][google.cloud.secretmanager.v1.Replication.Automatic] replication policy
* type, Cloud KMS CryptoKeys must reside in `global`.
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt
* secret payloads.
* For secrets using the
* [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged]
* replication policy type, Cloud KMS CryptoKeys must reside in the same
* location as the [replica location][Secret.UserManaged.Replica.location].
* For secrets using the
* [Automatic][google.cloud.secretmanager.v1.Replication.Automatic]
* replication policy type, Cloud KMS CryptoKeys must reside in `global`.
* The expected format is `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;`.
* </pre>
*
Expand All @@ -526,13 +534,15 @@ public com.google.protobuf.ByteString getKmsKeyNameBytes() {
*
*
* <pre>
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret
* payloads.
* For secrets using the [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged] replication
* policy type, Cloud KMS CryptoKeys must reside in the same location as the
* [replica location][Secret.UserManaged.Replica.location].
* For secrets using the [Automatic][google.cloud.secretmanager.v1.Replication.Automatic] replication policy
* type, Cloud KMS CryptoKeys must reside in `global`.
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt
* secret payloads.
* For secrets using the
* [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged]
* replication policy type, Cloud KMS CryptoKeys must reside in the same
* location as the [replica location][Secret.UserManaged.Replica.location].
* For secrets using the
* [Automatic][google.cloud.secretmanager.v1.Replication.Automatic]
* replication policy type, Cloud KMS CryptoKeys must reside in `global`.
* The expected format is `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;`.
* </pre>
*
Expand All @@ -554,13 +564,15 @@ public Builder setKmsKeyName(java.lang.String value) {
*
*
* <pre>
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret
* payloads.
* For secrets using the [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged] replication
* policy type, Cloud KMS CryptoKeys must reside in the same location as the
* [replica location][Secret.UserManaged.Replica.location].
* For secrets using the [Automatic][google.cloud.secretmanager.v1.Replication.Automatic] replication policy
* type, Cloud KMS CryptoKeys must reside in `global`.
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt
* secret payloads.
* For secrets using the
* [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged]
* replication policy type, Cloud KMS CryptoKeys must reside in the same
* location as the [replica location][Secret.UserManaged.Replica.location].
* For secrets using the
* [Automatic][google.cloud.secretmanager.v1.Replication.Automatic]
* replication policy type, Cloud KMS CryptoKeys must reside in `global`.
* The expected format is `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;`.
* </pre>
*
Expand All @@ -578,13 +590,15 @@ public Builder clearKmsKeyName() {
*
*
* <pre>
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret
* payloads.
* For secrets using the [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged] replication
* policy type, Cloud KMS CryptoKeys must reside in the same location as the
* [replica location][Secret.UserManaged.Replica.location].
* For secrets using the [Automatic][google.cloud.secretmanager.v1.Replication.Automatic] replication policy
* type, Cloud KMS CryptoKeys must reside in `global`.
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt
* secret payloads.
* For secrets using the
* [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged]
* replication policy type, Cloud KMS CryptoKeys must reside in the same
* location as the [replica location][Secret.UserManaged.Replica.location].
* For secrets using the
* [Automatic][google.cloud.secretmanager.v1.Replication.Automatic]
* replication policy type, Cloud KMS CryptoKeys must reside in `global`.
* The expected format is `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;`.
* </pre>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ public interface CustomerManagedEncryptionOrBuilder
*
*
* <pre>
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret
* payloads.
* For secrets using the [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged] replication
* policy type, Cloud KMS CryptoKeys must reside in the same location as the
* [replica location][Secret.UserManaged.Replica.location].
* For secrets using the [Automatic][google.cloud.secretmanager.v1.Replication.Automatic] replication policy
* type, Cloud KMS CryptoKeys must reside in `global`.
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt
* secret payloads.
* For secrets using the
* [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged]
* replication policy type, Cloud KMS CryptoKeys must reside in the same
* location as the [replica location][Secret.UserManaged.Replica.location].
* For secrets using the
* [Automatic][google.cloud.secretmanager.v1.Replication.Automatic]
* replication policy type, Cloud KMS CryptoKeys must reside in `global`.
* The expected format is `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;`.
* </pre>
*
Expand All @@ -46,13 +48,15 @@ public interface CustomerManagedEncryptionOrBuilder
*
*
* <pre>
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret
* payloads.
* For secrets using the [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged] replication
* policy type, Cloud KMS CryptoKeys must reside in the same location as the
* [replica location][Secret.UserManaged.Replica.location].
* For secrets using the [Automatic][google.cloud.secretmanager.v1.Replication.Automatic] replication policy
* type, Cloud KMS CryptoKeys must reside in `global`.
* Required. The resource name of the Cloud KMS CryptoKey used to encrypt
* secret payloads.
* For secrets using the
* [UserManaged][google.cloud.secretmanager.v1.Replication.UserManaged]
* replication policy type, Cloud KMS CryptoKeys must reside in the same
* location as the [replica location][Secret.UserManaged.Replica.location].
* For secrets using the
* [Automatic][google.cloud.secretmanager.v1.Replication.Automatic]
* replication policy type, Cloud KMS CryptoKeys must reside in `global`.
* The expected format is `projects/&#42;&#47;locations/&#42;&#47;keyRings/&#42;&#47;cryptoKeys/&#42;`.
* </pre>
*
Expand Down
Loading

0 comments on commit 262aeee

Please sign in to comment.