From 02dee349d8d531650c82341937f1029d619319df Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Fri, 14 May 2021 14:53:27 -0700 Subject: [PATCH] feat: Etags in Secret Manager Users can now use etags for optimistic concurrency control when modifying Secret or SecretVersion. PiperOrigin-RevId: 373836373 Source-Author: Google APIs Source-Date: Fri May 14 11:59:47 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: bff807490f09712527b1af607160a4f7ae48702e Source-Link: https://github.com/googleapis/googleapis/commit/bff807490f09712527b1af607160a4f7ae48702e --- .../v1/SecretManagerServiceClient.java | 32 ++- .../v1/SecretManagerServiceClientTest.java | 15 ++ .../v1/SecretManagerServiceGrpc.java | 32 +-- .../v1/AccessSecretVersionRequest.java | 14 ++ .../AccessSecretVersionRequestOrBuilder.java | 4 + .../secretmanager/v1/DeleteSecretRequest.java | 193 ++++++++++++++++++ .../v1/DeleteSecretRequestOrBuilder.java | 29 +++ .../v1/DestroySecretVersionRequest.java | 193 ++++++++++++++++++ .../DestroySecretVersionRequestOrBuilder.java | 29 +++ .../v1/DisableSecretVersionRequest.java | 193 ++++++++++++++++++ .../DisableSecretVersionRequestOrBuilder.java | 29 +++ .../v1/EnableSecretVersionRequest.java | 193 ++++++++++++++++++ .../EnableSecretVersionRequestOrBuilder.java | 29 +++ .../v1/GetSecretVersionRequest.java | 28 +-- .../v1/GetSecretVersionRequestOrBuilder.java | 8 +- .../secretmanager/v1/ResourcesProto.java | 132 ++++++------ .../cloud/secretmanager/v1/Rotation.java | 48 +++-- .../secretmanager/v1/RotationOrBuilder.java | 12 +- .../google/cloud/secretmanager/v1/Secret.java | 179 ++++++++++++++++ .../secretmanager/v1/SecretOrBuilder.java | 25 +++ .../cloud/secretmanager/v1/SecretVersion.java | 179 ++++++++++++++++ .../v1/SecretVersionOrBuilder.java | 25 +++ .../cloud/secretmanager/v1/ServiceProto.java | 174 ++++++++-------- .../cloud/secretmanager/v1/resources.proto | 10 +- .../cloud/secretmanager/v1/service.proto | 36 +++- synth.metadata | 6 +- 26 files changed, 1627 insertions(+), 220 deletions(-) diff --git a/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java b/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java index a6fe6c89..50a2e34c 100644 --- a/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java +++ b/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java @@ -783,6 +783,7 @@ public final void deleteSecret(String name) { * DeleteSecretRequest request = * DeleteSecretRequest.newBuilder() * .setName(SecretName.of("[PROJECT]", "[SECRET]").toString()) + * .setEtag("etag3123477") * .build(); * secretManagerServiceClient.deleteSecret(request); * } @@ -807,6 +808,7 @@ public final void deleteSecret(DeleteSecretRequest request) { * DeleteSecretRequest request = * DeleteSecretRequest.newBuilder() * .setName(SecretName.of("[PROJECT]", "[SECRET]").toString()) + * .setEtag("etag3123477") * .build(); * ApiFuture future = * secretManagerServiceClient.deleteSecretCallable().futureCall(request); @@ -981,7 +983,7 @@ public final ListSecretVersionsPagedResponse listSecretVersions( /** * Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - *

`projects/*/secrets/*/versions/latest` is an alias to the `latest` + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * *

Sample code: @@ -997,7 +999,7 @@ public final ListSecretVersionsPagedResponse listSecretVersions( * @param name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the `latest` + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1011,7 +1013,7 @@ public final SecretVersion getSecretVersion(SecretVersionName name) { /** * Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - *

`projects/*/secrets/*/versions/latest` is an alias to the `latest` + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * *

Sample code: @@ -1027,7 +1029,7 @@ public final SecretVersion getSecretVersion(SecretVersionName name) { * @param name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the `latest` + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1040,7 +1042,7 @@ public final SecretVersion getSecretVersion(String name) { /** * Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - *

`projects/*/secrets/*/versions/latest` is an alias to the `latest` + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * *

Sample code: @@ -1067,7 +1069,7 @@ public final SecretVersion getSecretVersion(GetSecretVersionRequest request) { /** * Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - *

`projects/*/secrets/*/versions/latest` is an alias to the `latest` + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * *

Sample code: @@ -1095,7 +1097,7 @@ public final UnaryCallable getSecretVers * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the * secret data. * - *

`projects/*/secrets/*/versions/latest` is an alias to the `latest` + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * *

Sample code: @@ -1111,6 +1113,8 @@ public final UnaryCallable getSecretVers * @param name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AccessSecretVersionResponse accessSecretVersion(SecretVersionName name) { @@ -1126,7 +1130,7 @@ public final AccessSecretVersionResponse accessSecretVersion(SecretVersionName n * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the * secret data. * - *

`projects/*/secrets/*/versions/latest` is an alias to the `latest` + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * *

Sample code: @@ -1142,6 +1146,8 @@ public final AccessSecretVersionResponse accessSecretVersion(SecretVersionName n * @param name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AccessSecretVersionResponse accessSecretVersion(String name) { @@ -1155,7 +1161,7 @@ public final AccessSecretVersionResponse accessSecretVersion(String name) { * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the * secret data. * - *

`projects/*/secrets/*/versions/latest` is an alias to the `latest` + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * *

Sample code: @@ -1184,7 +1190,7 @@ public final AccessSecretVersionResponse accessSecretVersion(AccessSecretVersion * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the * secret data. * - *

`projects/*/secrets/*/versions/latest` is an alias to the `latest` + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * *

Sample code: @@ -1284,6 +1290,7 @@ public final SecretVersion disableSecretVersion(String name) { * DisableSecretVersionRequest request = * DisableSecretVersionRequest.newBuilder() * .setName(SecretVersionName.of("[PROJECT]", "[SECRET]", "[SECRET_VERSION]").toString()) + * .setEtag("etag3123477") * .build(); * SecretVersion response = secretManagerServiceClient.disableSecretVersion(request); * } @@ -1312,6 +1319,7 @@ public final SecretVersion disableSecretVersion(DisableSecretVersionRequest requ * DisableSecretVersionRequest request = * DisableSecretVersionRequest.newBuilder() * .setName(SecretVersionName.of("[PROJECT]", "[SECRET]", "[SECRET_VERSION]").toString()) + * .setEtag("etag3123477") * .build(); * ApiFuture future = * secretManagerServiceClient.disableSecretVersionCallable().futureCall(request); @@ -1401,6 +1409,7 @@ public final SecretVersion enableSecretVersion(String name) { * EnableSecretVersionRequest request = * EnableSecretVersionRequest.newBuilder() * .setName(SecretVersionName.of("[PROJECT]", "[SECRET]", "[SECRET_VERSION]").toString()) + * .setEtag("etag3123477") * .build(); * SecretVersion response = secretManagerServiceClient.enableSecretVersion(request); * } @@ -1429,6 +1438,7 @@ public final SecretVersion enableSecretVersion(EnableSecretVersionRequest reques * EnableSecretVersionRequest request = * EnableSecretVersionRequest.newBuilder() * .setName(SecretVersionName.of("[PROJECT]", "[SECRET]", "[SECRET_VERSION]").toString()) + * .setEtag("etag3123477") * .build(); * ApiFuture future = * secretManagerServiceClient.enableSecretVersionCallable().futureCall(request); @@ -1521,6 +1531,7 @@ public final SecretVersion destroySecretVersion(String name) { * DestroySecretVersionRequest request = * DestroySecretVersionRequest.newBuilder() * .setName(SecretVersionName.of("[PROJECT]", "[SECRET]", "[SECRET_VERSION]").toString()) + * .setEtag("etag3123477") * .build(); * SecretVersion response = secretManagerServiceClient.destroySecretVersion(request); * } @@ -1550,6 +1561,7 @@ public final SecretVersion destroySecretVersion(DestroySecretVersionRequest requ * DestroySecretVersionRequest request = * DestroySecretVersionRequest.newBuilder() * .setName(SecretVersionName.of("[PROJECT]", "[SECRET]", "[SECRET_VERSION]").toString()) + * .setEtag("etag3123477") * .build(); * ApiFuture future = * secretManagerServiceClient.destroySecretVersionCallable().futureCall(request); diff --git a/google-cloud-secretmanager/src/test/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClientTest.java b/google-cloud-secretmanager/src/test/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClientTest.java index 98ef47ba..340db60d 100644 --- a/google-cloud-secretmanager/src/test/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClientTest.java +++ b/google-cloud-secretmanager/src/test/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClientTest.java @@ -189,6 +189,7 @@ public void createSecretTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .putAllLabels(new HashMap()) .addAllTopics(new ArrayList()) + .setEtag("etag3123477") .setRotation(Rotation.newBuilder().build()) .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -238,6 +239,7 @@ public void createSecretTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .putAllLabels(new HashMap()) .addAllTopics(new ArrayList()) + .setEtag("etag3123477") .setRotation(Rotation.newBuilder().build()) .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -286,6 +288,7 @@ public void addSecretVersionTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setDestroyTime(Timestamp.newBuilder().build()) .setReplicationStatus(ReplicationStatus.newBuilder().build()) + .setEtag("etag3123477") .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -330,6 +333,7 @@ public void addSecretVersionTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setDestroyTime(Timestamp.newBuilder().build()) .setReplicationStatus(ReplicationStatus.newBuilder().build()) + .setEtag("etag3123477") .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -375,6 +379,7 @@ public void getSecretTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .putAllLabels(new HashMap()) .addAllTopics(new ArrayList()) + .setEtag("etag3123477") .setRotation(Rotation.newBuilder().build()) .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -418,6 +423,7 @@ public void getSecretTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .putAllLabels(new HashMap()) .addAllTopics(new ArrayList()) + .setEtag("etag3123477") .setRotation(Rotation.newBuilder().build()) .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -461,6 +467,7 @@ public void updateSecretTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .putAllLabels(new HashMap()) .addAllTopics(new ArrayList()) + .setEtag("etag3123477") .setRotation(Rotation.newBuilder().build()) .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -662,6 +669,7 @@ public void getSecretVersionTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setDestroyTime(Timestamp.newBuilder().build()) .setReplicationStatus(ReplicationStatus.newBuilder().build()) + .setEtag("etag3123477") .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -703,6 +711,7 @@ public void getSecretVersionTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setDestroyTime(Timestamp.newBuilder().build()) .setReplicationStatus(ReplicationStatus.newBuilder().build()) + .setEtag("etag3123477") .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -822,6 +831,7 @@ public void disableSecretVersionTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setDestroyTime(Timestamp.newBuilder().build()) .setReplicationStatus(ReplicationStatus.newBuilder().build()) + .setEtag("etag3123477") .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -864,6 +874,7 @@ public void disableSecretVersionTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setDestroyTime(Timestamp.newBuilder().build()) .setReplicationStatus(ReplicationStatus.newBuilder().build()) + .setEtag("etag3123477") .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -906,6 +917,7 @@ public void enableSecretVersionTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setDestroyTime(Timestamp.newBuilder().build()) .setReplicationStatus(ReplicationStatus.newBuilder().build()) + .setEtag("etag3123477") .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -947,6 +959,7 @@ public void enableSecretVersionTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setDestroyTime(Timestamp.newBuilder().build()) .setReplicationStatus(ReplicationStatus.newBuilder().build()) + .setEtag("etag3123477") .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -988,6 +1001,7 @@ public void destroySecretVersionTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setDestroyTime(Timestamp.newBuilder().build()) .setReplicationStatus(ReplicationStatus.newBuilder().build()) + .setEtag("etag3123477") .build(); mockSecretManagerService.addResponse(expectedResponse); @@ -1030,6 +1044,7 @@ public void destroySecretVersionTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setDestroyTime(Timestamp.newBuilder().build()) .setReplicationStatus(ReplicationStatus.newBuilder().build()) + .setEtag("etag3123477") .build(); mockSecretManagerService.addResponse(expectedResponse); diff --git a/grpc-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceGrpc.java b/grpc-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceGrpc.java index 5d8aa93a..ca914ddc 100644 --- a/grpc-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceGrpc.java +++ b/grpc-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceGrpc.java @@ -890,8 +890,8 @@ public void listSecretVersions( * *

      * Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
*/ public void getSecretVersion( @@ -907,8 +907,8 @@ public void getSecretVersion( * *
      * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data.
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
*/ public void accessSecretVersion( @@ -1272,8 +1272,8 @@ public void listSecretVersions( * *
      * Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
*/ public void getSecretVersion( @@ -1291,8 +1291,8 @@ public void getSecretVersion( * *
      * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data.
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
*/ public void accessSecretVersion( @@ -1544,8 +1544,8 @@ public com.google.cloud.secretmanager.v1.ListSecretVersionsResponse listSecretVe * *
      * Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
*/ public com.google.cloud.secretmanager.v1.SecretVersion getSecretVersion( @@ -1559,8 +1559,8 @@ public com.google.cloud.secretmanager.v1.SecretVersion getSecretVersion( * *
      * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data.
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
*/ public com.google.cloud.secretmanager.v1.AccessSecretVersionResponse accessSecretVersion( @@ -1790,8 +1790,8 @@ protected SecretManagerServiceFutureStub build( * *
      * Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -1806,8 +1806,8 @@ protected SecretManagerServiceFutureStub build( * *
      * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data.
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/AccessSecretVersionRequest.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/AccessSecretVersionRequest.java index 5c9d4f46..417426a1 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/AccessSecretVersionRequest.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/AccessSecretVersionRequest.java @@ -119,6 +119,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
    * `projects/*/secrets/*/versions/*`.
+   * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+   * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
    * 
* * @@ -145,6 +147,8 @@ public java.lang.String getName() { *
    * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
    * `projects/*/secrets/*/versions/*`.
+   * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+   * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
    * 
* * @@ -494,6 +498,8 @@ public Builder mergeFrom( *
      * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
      * `projects/*/secrets/*/versions/*`.
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
* * @@ -519,6 +525,8 @@ public java.lang.String getName() { *
      * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
      * `projects/*/secrets/*/versions/*`.
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
* * @@ -544,6 +552,8 @@ public com.google.protobuf.ByteString getNameBytes() { *
      * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
      * `projects/*/secrets/*/versions/*`.
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
* * @@ -568,6 +578,8 @@ public Builder setName(java.lang.String value) { *
      * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
      * `projects/*/secrets/*/versions/*`.
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
* * @@ -588,6 +600,8 @@ public Builder clearName() { *
      * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
      * `projects/*/secrets/*/versions/*`.
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
* * diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/AccessSecretVersionRequestOrBuilder.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/AccessSecretVersionRequestOrBuilder.java index f0bb00ae..21674fa3 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/AccessSecretVersionRequestOrBuilder.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/AccessSecretVersionRequestOrBuilder.java @@ -29,6 +29,8 @@ public interface AccessSecretVersionRequestOrBuilder *
    * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
    * `projects/*/secrets/*/versions/*`.
+   * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+   * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
    * 
* * @@ -44,6 +46,8 @@ public interface AccessSecretVersionRequestOrBuilder *
    * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
    * `projects/*/secrets/*/versions/*`.
+   * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+   * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
    * 
* * diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DeleteSecretRequest.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DeleteSecretRequest.java index a22567bd..ea841856 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DeleteSecretRequest.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DeleteSecretRequest.java @@ -39,6 +39,7 @@ private DeleteSecretRequest(com.google.protobuf.GeneratedMessageV3.Builder bu private DeleteSecretRequest() { name_ = ""; + etag_ = ""; } @java.lang.Override @@ -77,6 +78,13 @@ private DeleteSecretRequest( name_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -166,6 +174,59 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int ETAG_FIELD_NUMBER = 2; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches
+   * the etag of the currently stored secret object. If the etag is omitted,
+   * the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches
+   * the etag of the currently stored secret object. If the etag is omitted,
+   * the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -183,6 +244,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + } unknownFields.writeTo(output); } @@ -195,6 +259,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -212,6 +279,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.secretmanager.v1.DeleteSecretRequest) obj; if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -225,6 +293,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -373,6 +443,8 @@ public Builder clear() { super.clear(); name_ = ""; + etag_ = ""; + return this; } @@ -401,6 +473,7 @@ public com.google.cloud.secretmanager.v1.DeleteSecretRequest buildPartial() { com.google.cloud.secretmanager.v1.DeleteSecretRequest result = new com.google.cloud.secretmanager.v1.DeleteSecretRequest(this); result.name_ = name_; + result.etag_ = etag_; onBuilt(); return result; } @@ -455,6 +528,10 @@ public Builder mergeFrom(com.google.cloud.secretmanager.v1.DeleteSecretRequest o name_ = other.name_; onChanged(); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -606,6 +683,122 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches
+     * the etag of the currently stored secret object. If the etag is omitted,
+     * the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches
+     * the etag of the currently stored secret object. If the etag is omitted,
+     * the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches
+     * the etag of the currently stored secret object. If the etag is omitted,
+     * the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches
+     * the etag of the currently stored secret object. If the etag is omitted,
+     * the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches
+     * the etag of the currently stored secret object. If the etag is omitted,
+     * the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DeleteSecretRequestOrBuilder.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DeleteSecretRequestOrBuilder.java index dd70fa3e..77626ced 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DeleteSecretRequestOrBuilder.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DeleteSecretRequestOrBuilder.java @@ -53,4 +53,33 @@ public interface DeleteSecretRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches
+   * the etag of the currently stored secret object. If the etag is omitted,
+   * the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches
+   * the etag of the currently stored secret object. If the etag is omitted,
+   * the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); } diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DestroySecretVersionRequest.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DestroySecretVersionRequest.java index 5b468ec3..502442bd 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DestroySecretVersionRequest.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DestroySecretVersionRequest.java @@ -39,6 +39,7 @@ private DestroySecretVersionRequest(com.google.protobuf.GeneratedMessageV3.Build private DestroySecretVersionRequest() { name_ = ""; + etag_ = ""; } @java.lang.Override @@ -77,6 +78,13 @@ private DestroySecretVersionRequest( name_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -166,6 +174,59 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int ETAG_FIELD_NUMBER = 2; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -183,6 +244,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + } unknownFields.writeTo(output); } @@ -195,6 +259,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -212,6 +279,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.secretmanager.v1.DestroySecretVersionRequest) obj; if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -225,6 +293,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -373,6 +443,8 @@ public Builder clear() { super.clear(); name_ = ""; + etag_ = ""; + return this; } @@ -402,6 +474,7 @@ public com.google.cloud.secretmanager.v1.DestroySecretVersionRequest buildPartia com.google.cloud.secretmanager.v1.DestroySecretVersionRequest result = new com.google.cloud.secretmanager.v1.DestroySecretVersionRequest(this); result.name_ = name_; + result.etag_ = etag_; onBuilt(); return result; } @@ -457,6 +530,10 @@ public Builder mergeFrom(com.google.cloud.secretmanager.v1.DestroySecretVersionR name_ = other.name_; onChanged(); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -609,6 +686,122 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DestroySecretVersionRequestOrBuilder.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DestroySecretVersionRequestOrBuilder.java index 8434d806..cd241994 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DestroySecretVersionRequestOrBuilder.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DestroySecretVersionRequestOrBuilder.java @@ -53,4 +53,33 @@ public interface DestroySecretVersionRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); } diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DisableSecretVersionRequest.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DisableSecretVersionRequest.java index 68ec6635..8928b467 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DisableSecretVersionRequest.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DisableSecretVersionRequest.java @@ -39,6 +39,7 @@ private DisableSecretVersionRequest(com.google.protobuf.GeneratedMessageV3.Build private DisableSecretVersionRequest() { name_ = ""; + etag_ = ""; } @java.lang.Override @@ -77,6 +78,13 @@ private DisableSecretVersionRequest( name_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -166,6 +174,59 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int ETAG_FIELD_NUMBER = 2; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -183,6 +244,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + } unknownFields.writeTo(output); } @@ -195,6 +259,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -212,6 +279,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.secretmanager.v1.DisableSecretVersionRequest) obj; if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -225,6 +293,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -373,6 +443,8 @@ public Builder clear() { super.clear(); name_ = ""; + etag_ = ""; + return this; } @@ -402,6 +474,7 @@ public com.google.cloud.secretmanager.v1.DisableSecretVersionRequest buildPartia com.google.cloud.secretmanager.v1.DisableSecretVersionRequest result = new com.google.cloud.secretmanager.v1.DisableSecretVersionRequest(this); result.name_ = name_; + result.etag_ = etag_; onBuilt(); return result; } @@ -457,6 +530,10 @@ public Builder mergeFrom(com.google.cloud.secretmanager.v1.DisableSecretVersionR name_ = other.name_; onChanged(); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -609,6 +686,122 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DisableSecretVersionRequestOrBuilder.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DisableSecretVersionRequestOrBuilder.java index 8be70dfe..4ee4043f 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DisableSecretVersionRequestOrBuilder.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/DisableSecretVersionRequestOrBuilder.java @@ -53,4 +53,33 @@ public interface DisableSecretVersionRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); } diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/EnableSecretVersionRequest.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/EnableSecretVersionRequest.java index ab169c93..114fd9ef 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/EnableSecretVersionRequest.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/EnableSecretVersionRequest.java @@ -39,6 +39,7 @@ private EnableSecretVersionRequest(com.google.protobuf.GeneratedMessageV3.Builde private EnableSecretVersionRequest() { name_ = ""; + etag_ = ""; } @java.lang.Override @@ -77,6 +78,13 @@ private EnableSecretVersionRequest( name_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -166,6 +174,59 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int ETAG_FIELD_NUMBER = 2; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -183,6 +244,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + } unknownFields.writeTo(output); } @@ -195,6 +259,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -212,6 +279,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.secretmanager.v1.EnableSecretVersionRequest) obj; if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -225,6 +293,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -373,6 +443,8 @@ public Builder clear() { super.clear(); name_ = ""; + etag_ = ""; + return this; } @@ -402,6 +474,7 @@ public com.google.cloud.secretmanager.v1.EnableSecretVersionRequest buildPartial com.google.cloud.secretmanager.v1.EnableSecretVersionRequest result = new com.google.cloud.secretmanager.v1.EnableSecretVersionRequest(this); result.name_ = name_; + result.etag_ = etag_; onBuilt(); return result; } @@ -457,6 +530,10 @@ public Builder mergeFrom(com.google.cloud.secretmanager.v1.EnableSecretVersionRe name_ = other.name_; onChanged(); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -608,6 +685,122 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+     * the etag of the currently stored secret version object. If the etag is
+     * omitted, the request succeeds.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/EnableSecretVersionRequestOrBuilder.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/EnableSecretVersionRequestOrBuilder.java index 1e9238bf..ec7ea4f8 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/EnableSecretVersionRequestOrBuilder.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/EnableSecretVersionRequestOrBuilder.java @@ -53,4 +53,33 @@ public interface EnableSecretVersionRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches
+   * the etag of the currently stored secret version object. If the etag is
+   * omitted, the request succeeds.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); } diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/GetSecretVersionRequest.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/GetSecretVersionRequest.java index 8920d907..c29db206 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/GetSecretVersionRequest.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/GetSecretVersionRequest.java @@ -119,8 +119,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
    * `projects/*/secrets/*/versions/*`.
-   * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-   * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+   * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+   * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
    * 
* * @@ -147,8 +147,8 @@ public java.lang.String getName() { *
    * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
    * `projects/*/secrets/*/versions/*`.
-   * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-   * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+   * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+   * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
    * 
* * @@ -496,8 +496,8 @@ public Builder mergeFrom( *
      * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
      * `projects/*/secrets/*/versions/*`.
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
* * @@ -523,8 +523,8 @@ public java.lang.String getName() { *
      * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
      * `projects/*/secrets/*/versions/*`.
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
* * @@ -550,8 +550,8 @@ public com.google.protobuf.ByteString getNameBytes() { *
      * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
      * `projects/*/secrets/*/versions/*`.
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
* * @@ -576,8 +576,8 @@ public Builder setName(java.lang.String value) { *
      * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
      * `projects/*/secrets/*/versions/*`.
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
* * @@ -598,8 +598,8 @@ public Builder clearName() { *
      * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
      * `projects/*/secrets/*/versions/*`.
-     * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-     * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+     * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
      * 
* * diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/GetSecretVersionRequestOrBuilder.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/GetSecretVersionRequestOrBuilder.java index 10e1cb53..5af2f809 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/GetSecretVersionRequestOrBuilder.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/GetSecretVersionRequestOrBuilder.java @@ -29,8 +29,8 @@ public interface GetSecretVersionRequestOrBuilder *
    * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
    * `projects/*/secrets/*/versions/*`.
-   * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-   * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+   * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+   * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
    * 
* * @@ -46,8 +46,8 @@ public interface GetSecretVersionRequestOrBuilder *
    * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
    * `projects/*/secrets/*/versions/*`.
-   * `projects/*/secrets/*/versions/latest` is an alias to the `latest`
-   * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+   * `projects/*/secrets/*/versions/latest` is an alias to the most recently
+   * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
    * 
* * diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/ResourcesProto.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/ResourcesProto.java index 48c48da0..9b0e4e01 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/ResourcesProto.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/ResourcesProto.java @@ -105,7 +105,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "google/api/field_behavior.proto\032\031google/" + "api/resource.proto\032\036google/protobuf/dura" + "tion.proto\032\037google/protobuf/timestamp.pr" - + "oto\032\034google/api/annotations.proto\"\313\004\n\006Se" + + "oto\032\034google/api/annotations.proto\"\336\004\n\006Se" + "cret\022\021\n\004name\030\001 \001(\tB\003\340A\003\022G\n\013replication\030\002" + " \001(\0132*.google.cloud.secretmanager.v1.Rep" + "licationB\006\340A\005\340A\002\0224\n\013create_time\030\003 \001(\0132\032." @@ -115,69 +115,70 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "le.cloud.secretmanager.v1.TopicB\003\340A\001\0226\n\013" + "expire_time\030\006 \001(\0132\032.google.protobuf.Time" + "stampB\003\340A\001H\000\022-\n\003ttl\030\007 \001(\0132\031.google.proto" - + "buf.DurationB\003\340A\004H\000\022>\n\010rotation\030\t \001(\0132\'." - + "google.cloud.secretmanager.v1.RotationB\003" - + "\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001:M\352AJ\n#secretmanager.googleapi" - + "s.com/Secret\022#projects/{project}/secrets" - + "/{secret}B\014\n\nexpiration\"\337\003\n\rSecretVersio" - + "n\022\021\n\004name\030\001 \001(\tB\003\340A\003\0224\n\013create_time\030\002 \001(" - + "\0132\032.google.protobuf.TimestampB\003\340A\003\0225\n\014de" - + "stroy_time\030\003 \001(\0132\032.google.protobuf.Times" - + "tampB\003\340A\003\022F\n\005state\030\004 \001(\01622.google.cloud." - + "secretmanager.v1.SecretVersion.StateB\003\340A" - + "\003\022L\n\022replication_status\030\005 \001(\01320.google.c" - + "loud.secretmanager.v1.ReplicationStatus\"" - + "H\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007ENABL" - + "ED\020\001\022\014\n\010DISABLED\020\002\022\r\n\tDESTROYED\020\003:n\352Ak\n*" - + "secretmanager.googleapis.com/SecretVersi" - + "on\022=projects/{project}/secrets/{secret}/" - + "versions/{secret_version}\"\220\004\n\013Replicatio" - + "n\022I\n\tautomatic\030\001 \001(\01324.google.cloud.secr" - + "etmanager.v1.Replication.AutomaticH\000\022N\n\014" - + "user_managed\030\002 \001(\01326.google.cloud.secret" - + "manager.v1.Replication.UserManagedH\000\032o\n\t" - + "Automatic\022b\n\033customer_managed_encryption" - + "\030\001 \001(\01328.google.cloud.secretmanager.v1.C" - + "ustomerManagedEncryptionB\003\340A\001\032\345\001\n\013UserMa" - + "naged\022U\n\010replicas\030\001 \003(\0132>.google.cloud.s" - + "ecretmanager.v1.Replication.UserManaged." - + "ReplicaB\003\340A\002\032\177\n\007Replica\022\020\n\010location\030\001 \001(" - + "\t\022b\n\033customer_managed_encryption\030\002 \001(\01328" - + ".google.cloud.secretmanager.v1.CustomerM" - + "anagedEncryptionB\003\340A\001B\r\n\013replication\"6\n\031" - + "CustomerManagedEncryption\022\031\n\014kms_key_nam" - + "e\030\001 \001(\tB\003\340A\002\"\353\004\n\021ReplicationStatus\022U\n\tau" - + "tomatic\030\001 \001(\0132@.google.cloud.secretmanag" - + "er.v1.ReplicationStatus.AutomaticStatusH" - + "\000\022Z\n\014user_managed\030\002 \001(\0132B.google.cloud.s" - + "ecretmanager.v1.ReplicationStatus.UserMa" - + "nagedStatusH\000\032{\n\017AutomaticStatus\022h\n\033cust" - + "omer_managed_encryption\030\001 \001(\0132>.google.c" - + "loud.secretmanager.v1.CustomerManagedEnc" - + "ryptionStatusB\003\340A\003\032\217\002\n\021UserManagedStatus" - + "\022g\n\010replicas\030\001 \003(\0132P.google.cloud.secret" - + "manager.v1.ReplicationStatus.UserManaged" - + "Status.ReplicaStatusB\003\340A\003\032\220\001\n\rReplicaSta" - + "tus\022\025\n\010location\030\001 \001(\tB\003\340A\003\022h\n\033customer_m" - + "anaged_encryption\030\002 \001(\0132>.google.cloud.s" - + "ecretmanager.v1.CustomerManagedEncryptio" - + "nStatusB\003\340A\003B\024\n\022replication_status\"D\n\037Cu" - + "stomerManagedEncryptionStatus\022!\n\024kms_key" - + "_version_name\030\001 \001(\tB\003\340A\002\"_\n\005Topic\022\021\n\004nam" - + "e\030\001 \001(\tB\003\340A\002:C\352A@\n\033pubsub.googleapis.com" - + "/Topic\022!projects/{project}/topics/{topic" - + "}\"\200\001\n\010Rotation\022;\n\022next_rotation_time\030\001 \001" - + "(\0132\032.google.protobuf.TimestampB\003\340A\001\0227\n\017r" - + "otation_period\030\002 \001(\0132\031.google.protobuf.D" - + "urationB\003\340A\004\"\035\n\rSecretPayload\022\014\n\004data\030\001 " - + "\001(\014B\355\001\n!com.google.cloud.secretmanager.v" - + "1B\016ResourcesProtoP\001ZJgoogle.golang.org/g" - + "enproto/googleapis/cloud/secretmanager/v" - + "1;secretmanager\370\001\001\242\002\003GSM\252\002\035Google.Cloud." - + "SecretManager.V1\312\002\035Google\\Cloud\\SecretMa" - + "nager\\V1\352\002 Google::Cloud::SecretManager:" - + ":V1b\006proto3" + + "buf.DurationB\003\340A\004H\000\022\021\n\004etag\030\010 \001(\tB\003\340A\001\022>" + + "\n\010rotation\030\t \001(\0132\'.google.cloud.secretma" + + "nager.v1.RotationB\003\340A\001\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:M\352AJ\n#secr" + + "etmanager.googleapis.com/Secret\022#project" + + "s/{project}/secrets/{secret}B\014\n\nexpirati" + + "on\"\362\003\n\rSecretVersion\022\021\n\004name\030\001 \001(\tB\003\340A\003\022" + + "4\n\013create_time\030\002 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\0225\n\014destroy_time\030\003 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\022F\n\005state\030\004 " + + "\001(\01622.google.cloud.secretmanager.v1.Secr" + + "etVersion.StateB\003\340A\003\022L\n\022replication_stat" + + "us\030\005 \001(\01320.google.cloud.secretmanager.v1" + + ".ReplicationStatus\022\021\n\004etag\030\006 \001(\tB\003\340A\003\"H\n" + + "\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007ENABLED" + + "\020\001\022\014\n\010DISABLED\020\002\022\r\n\tDESTROYED\020\003:n\352Ak\n*se" + + "cretmanager.googleapis.com/SecretVersion" + + "\022=projects/{project}/secrets/{secret}/ve" + + "rsions/{secret_version}\"\220\004\n\013Replication\022" + + "I\n\tautomatic\030\001 \001(\01324.google.cloud.secret" + + "manager.v1.Replication.AutomaticH\000\022N\n\014us" + + "er_managed\030\002 \001(\01326.google.cloud.secretma" + + "nager.v1.Replication.UserManagedH\000\032o\n\tAu" + + "tomatic\022b\n\033customer_managed_encryption\030\001" + + " \001(\01328.google.cloud.secretmanager.v1.Cus" + + "tomerManagedEncryptionB\003\340A\001\032\345\001\n\013UserMana" + + "ged\022U\n\010replicas\030\001 \003(\0132>.google.cloud.sec" + + "retmanager.v1.Replication.UserManaged.Re" + + "plicaB\003\340A\002\032\177\n\007Replica\022\020\n\010location\030\001 \001(\t\022" + + "b\n\033customer_managed_encryption\030\002 \001(\01328.g" + + "oogle.cloud.secretmanager.v1.CustomerMan" + + "agedEncryptionB\003\340A\001B\r\n\013replication\"6\n\031Cu" + + "stomerManagedEncryption\022\031\n\014kms_key_name\030" + + "\001 \001(\tB\003\340A\002\"\353\004\n\021ReplicationStatus\022U\n\tauto" + + "matic\030\001 \001(\0132@.google.cloud.secretmanager" + + ".v1.ReplicationStatus.AutomaticStatusH\000\022" + + "Z\n\014user_managed\030\002 \001(\0132B.google.cloud.sec" + + "retmanager.v1.ReplicationStatus.UserMana" + + "gedStatusH\000\032{\n\017AutomaticStatus\022h\n\033custom" + + "er_managed_encryption\030\001 \001(\0132>.google.clo" + + "ud.secretmanager.v1.CustomerManagedEncry" + + "ptionStatusB\003\340A\003\032\217\002\n\021UserManagedStatus\022g" + + "\n\010replicas\030\001 \003(\0132P.google.cloud.secretma" + + "nager.v1.ReplicationStatus.UserManagedSt" + + "atus.ReplicaStatusB\003\340A\003\032\220\001\n\rReplicaStatu" + + "s\022\025\n\010location\030\001 \001(\tB\003\340A\003\022h\n\033customer_man" + + "aged_encryption\030\002 \001(\0132>.google.cloud.sec" + + "retmanager.v1.CustomerManagedEncryptionS" + + "tatusB\003\340A\003B\024\n\022replication_status\"D\n\037Cust" + + "omerManagedEncryptionStatus\022!\n\024kms_key_v" + + "ersion_name\030\001 \001(\tB\003\340A\002\"_\n\005Topic\022\021\n\004name\030" + + "\001 \001(\tB\003\340A\002:C\352A@\n\033pubsub.googleapis.com/T" + + "opic\022!projects/{project}/topics/{topic}\"" + + "\200\001\n\010Rotation\022;\n\022next_rotation_time\030\001 \001(\013" + + "2\032.google.protobuf.TimestampB\003\340A\001\0227\n\017rot" + + "ation_period\030\002 \001(\0132\031.google.protobuf.Dur" + + "ationB\003\340A\004\"\035\n\rSecretPayload\022\014\n\004data\030\001 \001(" + + "\014B\355\001\n!com.google.cloud.secretmanager.v1B" + + "\016ResourcesProtoP\001ZJgoogle.golang.org/gen" + + "proto/googleapis/cloud/secretmanager/v1;" + + "secretmanager\370\001\001\242\002\003GSM\252\002\035Google.Cloud.Se" + + "cretManager.V1\312\002\035Google\\Cloud\\SecretMana" + + "ger\\V1\352\002 Google::Cloud::SecretManager::V" + + "1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -202,6 +203,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Topics", "ExpireTime", "Ttl", + "Etag", "Rotation", "Expiration", }); @@ -219,7 +221,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_secretmanager_v1_SecretVersion_descriptor, new java.lang.String[] { - "Name", "CreateTime", "DestroyTime", "State", "ReplicationStatus", + "Name", "CreateTime", "DestroyTime", "State", "ReplicationStatus", "Etag", }); internal_static_google_cloud_secretmanager_v1_Replication_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/Rotation.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/Rotation.java index 449a7da4..c0b64574 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/Rotation.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/Rotation.java @@ -140,7 +140,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+   * set to less than 300s (5 min) in the future and at most 3153600000s (100
+   * years).
    * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
    * 
* @@ -158,7 +160,9 @@ public boolean hasNextRotationTime() { * * *
-   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+   * set to less than 300s (5 min) in the future and at most 3153600000s (100
+   * years).
    * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
    * 
* @@ -178,7 +182,9 @@ public com.google.protobuf.Timestamp getNextRotationTime() { * * *
-   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+   * set to less than 300s (5 min) in the future and at most 3153600000s (100
+   * years).
    * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
    * 
* @@ -625,7 +631,9 @@ public Builder mergeFrom( * * *
-     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+     * set to less than 300s (5 min) in the future and at most 3153600000s (100
+     * years).
      * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
      * 
* @@ -642,7 +650,9 @@ public boolean hasNextRotationTime() { * * *
-     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+     * set to less than 300s (5 min) in the future and at most 3153600000s (100
+     * years).
      * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
      * 
* @@ -665,7 +675,9 @@ public com.google.protobuf.Timestamp getNextRotationTime() { * * *
-     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+     * set to less than 300s (5 min) in the future and at most 3153600000s (100
+     * years).
      * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
      * 
* @@ -690,7 +702,9 @@ public Builder setNextRotationTime(com.google.protobuf.Timestamp value) { * * *
-     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+     * set to less than 300s (5 min) in the future and at most 3153600000s (100
+     * years).
      * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
      * 
* @@ -712,7 +726,9 @@ public Builder setNextRotationTime(com.google.protobuf.Timestamp.Builder builder * * *
-     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+     * set to less than 300s (5 min) in the future and at most 3153600000s (100
+     * years).
      * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
      * 
* @@ -741,7 +757,9 @@ public Builder mergeNextRotationTime(com.google.protobuf.Timestamp value) { * * *
-     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+     * set to less than 300s (5 min) in the future and at most 3153600000s (100
+     * years).
      * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
      * 
* @@ -764,7 +782,9 @@ public Builder clearNextRotationTime() { * * *
-     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+     * set to less than 300s (5 min) in the future and at most 3153600000s (100
+     * years).
      * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
      * 
* @@ -781,7 +801,9 @@ public com.google.protobuf.Timestamp.Builder getNextRotationTimeBuilder() { * * *
-     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+     * set to less than 300s (5 min) in the future and at most 3153600000s (100
+     * years).
      * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
      * 
* @@ -802,7 +824,9 @@ public com.google.protobuf.TimestampOrBuilder getNextRotationTimeOrBuilder() { * * *
-     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+     * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+     * set to less than 300s (5 min) in the future and at most 3153600000s (100
+     * years).
      * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
      * 
* diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/RotationOrBuilder.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/RotationOrBuilder.java index 1954b89a..0b95542b 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/RotationOrBuilder.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/RotationOrBuilder.java @@ -27,7 +27,9 @@ public interface RotationOrBuilder * * *
-   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+   * set to less than 300s (5 min) in the future and at most 3153600000s (100
+   * years).
    * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
    * 
* @@ -42,7 +44,9 @@ public interface RotationOrBuilder * * *
-   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+   * set to less than 300s (5 min) in the future and at most 3153600000s (100
+   * years).
    * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
    * 
* @@ -57,7 +61,9 @@ public interface RotationOrBuilder * * *
-   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
+   * Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be
+   * set to less than 300s (5 min) in the future and at most 3153600000s (100
+   * years).
    * [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST  be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set.
    * 
* diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/Secret.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/Secret.java index 39aa1316..0ea41c1d 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/Secret.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/Secret.java @@ -43,6 +43,7 @@ private Secret(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Secret() { name_ = ""; topics_ = java.util.Collections.emptyList(); + etag_ = ""; } @java.lang.Override @@ -167,6 +168,13 @@ private Secret( expirationCase_ = 7; break; } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } case 74: { com.google.cloud.secretmanager.v1.Rotation.Builder subBuilder = null; @@ -751,6 +759,55 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { return com.google.protobuf.Duration.getDefaultInstance(); } + public static final int ETAG_FIELD_NUMBER = 8; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Optional. Etag of the currently stored [Secret][google.cloud.secretmanager.v1.Secret].
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Etag of the currently stored [Secret][google.cloud.secretmanager.v1.Secret].
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int ROTATION_FIELD_NUMBER = 9; private com.google.cloud.secretmanager.v1.Rotation rotation_; /** @@ -842,6 +899,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (expirationCase_ == 7) { output.writeMessage(7, (com.google.protobuf.Duration) expiration_); } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); + } if (rotation_ != null) { output.writeMessage(9, getRotation()); } @@ -886,6 +946,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 7, (com.google.protobuf.Duration) expiration_); } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); + } if (rotation_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getRotation()); } @@ -915,6 +978,7 @@ public boolean equals(final java.lang.Object obj) { } if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getTopicsList().equals(other.getTopicsList())) return false; + if (!getEtag().equals(other.getEtag())) return false; if (hasRotation() != other.hasRotation()) return false; if (hasRotation()) { if (!getRotation().equals(other.getRotation())) return false; @@ -959,6 +1023,8 @@ public int hashCode() { hash = (37 * hash) + TOPICS_FIELD_NUMBER; hash = (53 * hash) + getTopicsList().hashCode(); } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); if (hasRotation()) { hash = (37 * hash) + ROTATION_FIELD_NUMBER; hash = (53 * hash) + getRotation().hashCode(); @@ -1166,6 +1232,8 @@ public Builder clear() { } else { topicsBuilder_.clear(); } + etag_ = ""; + if (rotationBuilder_ == null) { rotation_ = null; } else { @@ -1238,6 +1306,7 @@ public com.google.cloud.secretmanager.v1.Secret buildPartial() { result.expiration_ = ttlBuilder_.build(); } } + result.etag_ = etag_; if (rotationBuilder_ == null) { result.rotation_ = rotation_; } else { @@ -1331,6 +1400,10 @@ public Builder mergeFrom(com.google.cloud.secretmanager.v1.Secret other) { } } } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } if (other.hasRotation()) { mergeRotation(other.getRotation()); } @@ -2951,6 +3024,112 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { return ttlBuilder_; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. Etag of the currently stored [Secret][google.cloud.secretmanager.v1.Secret].
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Etag of the currently stored [Secret][google.cloud.secretmanager.v1.Secret].
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Etag of the currently stored [Secret][google.cloud.secretmanager.v1.Secret].
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Etag of the currently stored [Secret][google.cloud.secretmanager.v1.Secret].
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Etag of the currently stored [Secret][google.cloud.secretmanager.v1.Secret].
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + private com.google.cloud.secretmanager.v1.Rotation rotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.secretmanager.v1.Rotation, diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretOrBuilder.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretOrBuilder.java index 341bb8b8..a5007b8b 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretOrBuilder.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretOrBuilder.java @@ -362,6 +362,31 @@ public interface SecretOrBuilder */ com.google.protobuf.DurationOrBuilder getTtlOrBuilder(); + /** + * + * + *
+   * Optional. Etag of the currently stored [Secret][google.cloud.secretmanager.v1.Secret].
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. Etag of the currently stored [Secret][google.cloud.secretmanager.v1.Secret].
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + /** * * diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretVersion.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretVersion.java index 12a8720c..6d29ccb7 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretVersion.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretVersion.java @@ -40,6 +40,7 @@ private SecretVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) private SecretVersion() { name_ = ""; state_ = 0; + etag_ = ""; } @java.lang.Override @@ -130,6 +131,13 @@ private SecretVersion( replicationStatus_ = subBuilder.buildPartial(); } + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; break; } default: @@ -601,6 +609,55 @@ public com.google.cloud.secretmanager.v1.ReplicationStatus getReplicationStatus( return getReplicationStatus(); } + public static final int ETAG_FIELD_NUMBER = 6; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Output only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+   * 
+ * + * string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+   * 
+ * + * string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -631,6 +688,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (replicationStatus_ != null) { output.writeMessage(5, getReplicationStatus()); } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, etag_); + } unknownFields.writeTo(output); } @@ -656,6 +716,9 @@ public int getSerializedSize() { if (replicationStatus_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReplicationStatus()); } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, etag_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -686,6 +749,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReplicationStatus()) { if (!getReplicationStatus().equals(other.getReplicationStatus())) return false; } + if (!getEtag().equals(other.getEtag())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -713,6 +777,8 @@ public int hashCode() { hash = (37 * hash) + REPLICATION_STATUS_FIELD_NUMBER; hash = (53 * hash) + getReplicationStatus().hashCode(); } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -880,6 +946,8 @@ public Builder clear() { replicationStatus_ = null; replicationStatusBuilder_ = null; } + etag_ = ""; + return this; } @@ -924,6 +992,7 @@ public com.google.cloud.secretmanager.v1.SecretVersion buildPartial() { } else { result.replicationStatus_ = replicationStatusBuilder_.build(); } + result.etag_ = etag_; onBuilt(); return result; } @@ -990,6 +1059,10 @@ public Builder mergeFrom(com.google.cloud.secretmanager.v1.SecretVersion other) if (other.hasReplicationStatus()) { mergeReplicationStatus(other.getReplicationStatus()); } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1854,6 +1927,112 @@ public Builder clearReplicationStatus() { return replicationStatusBuilder_; } + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Output only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * 
+ * + * string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * 
+ * + * string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * 
+ * + * string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * 
+ * + * string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+     * 
+ * + * string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretVersionOrBuilder.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretVersionOrBuilder.java index 652b6e27..90b0fc5c 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretVersionOrBuilder.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/SecretVersionOrBuilder.java @@ -199,4 +199,29 @@ public interface SecretVersionOrBuilder * .google.cloud.secretmanager.v1.ReplicationStatus replication_status = 5; */ com.google.cloud.secretmanager.v1.ReplicationStatusOrBuilder getReplicationStatusOrBuilder(); + + /** + * + * + *
+   * Output only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+   * 
+ * + * string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Output only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+   * 
+ * + * string etag = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); } diff --git a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/ServiceProto.java b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/ServiceProto.java index 5093982c..89b94c03 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/ServiceProto.java +++ b/proto-google-cloud-secretmanager-v1/src/main/java/com/google/cloud/secretmanager/v1/ServiceProto.java @@ -141,91 +141,93 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\004name\030\001 \001(\tB/\372A,\n*secretmanager.googlea" + "pis.com/SecretVersion\022=\n\007payload\030\002 \001(\0132," + ".google.cloud.secretmanager.v1.SecretPay" - + "load\"P\n\023DeleteSecretRequest\0229\n\004name\030\001 \001(" + + "load\"c\n\023DeleteSecretRequest\0229\n\004name\030\001 \001(" + "\tB+\340A\002\372A%\n#secretmanager.googleapis.com/" - + "Secret\"_\n\033DisableSecretVersionRequest\022@\n" - + "\004name\030\001 \001(\tB2\340A\002\372A,\n*secretmanager.googl" - + "eapis.com/SecretVersion\"^\n\032EnableSecretV" - + "ersionRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*sec" - + "retmanager.googleapis.com/SecretVersion\"" - + "_\n\033DestroySecretVersionRequest\022@\n\004name\030\001" - + " \001(\tB2\340A\002\372A,\n*secretmanager.googleapis.c" - + "om/SecretVersion2\317\025\n\024SecretManagerServic" - + "e\022\246\001\n\013ListSecrets\0221.google.cloud.secretm" - + "anager.v1.ListSecretsRequest\0322.google.cl" - + "oud.secretmanager.v1.ListSecretsResponse" - + "\"0\202\323\344\223\002!\022\037/v1/{parent=projects/*}/secret" - + "s\332A\006parent\022\264\001\n\014CreateSecret\0222.google.clo" - + "ud.secretmanager.v1.CreateSecretRequest\032" - + "%.google.cloud.secretmanager.v1.Secret\"I" - + "\202\323\344\223\002)\"\037/v1/{parent=projects/*}/secrets:" - + "\006secret\332A\027parent,secret_id,secret\022\302\001\n\020Ad" - + "dSecretVersion\0226.google.cloud.secretmana" - + "ger.v1.AddSecretVersionRequest\032,.google." - + "cloud.secretmanager.v1.SecretVersion\"H\202\323" - + "\344\223\0021\",/v1/{parent=projects/*/secrets/*}:" - + "addVersion:\001*\332A\016parent,payload\022\223\001\n\tGetSe" - + "cret\022/.google.cloud.secretmanager.v1.Get" - + "SecretRequest\032%.google.cloud.secretmanag" - + "er.v1.Secret\".\202\323\344\223\002!\022\037/v1/{name=projects" - + "/*/secrets/*}\332A\004name\022\266\001\n\014UpdateSecret\0222." - + "google.cloud.secretmanager.v1.UpdateSecr" + + "Secret\022\021\n\004etag\030\002 \001(\tB\003\340A\001\"r\n\033DisableSecr" + + "etVersionRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*" + + "secretmanager.googleapis.com/SecretVersi" + + "on\022\021\n\004etag\030\002 \001(\tB\003\340A\001\"q\n\032EnableSecretVer" + + "sionRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*secre" + + "tmanager.googleapis.com/SecretVersion\022\021\n" + + "\004etag\030\002 \001(\tB\003\340A\001\"r\n\033DestroySecretVersion" + + "Request\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*secretman" + + "ager.googleapis.com/SecretVersion\022\021\n\004eta" + + "g\030\002 \001(\tB\003\340A\0012\317\025\n\024SecretManagerService\022\246\001" + + "\n\013ListSecrets\0221.google.cloud.secretmanag" + + "er.v1.ListSecretsRequest\0322.google.cloud." + + "secretmanager.v1.ListSecretsResponse\"0\202\323" + + "\344\223\002!\022\037/v1/{parent=projects/*}/secrets\332A\006" + + "parent\022\264\001\n\014CreateSecret\0222.google.cloud.s" + + "ecretmanager.v1.CreateSecretRequest\032%.go" + + "ogle.cloud.secretmanager.v1.Secret\"I\202\323\344\223" + + "\002)\"\037/v1/{parent=projects/*}/secrets:\006sec" + + "ret\332A\027parent,secret_id,secret\022\302\001\n\020AddSec" + + "retVersion\0226.google.cloud.secretmanager." + + "v1.AddSecretVersionRequest\032,.google.clou" + + "d.secretmanager.v1.SecretVersion\"H\202\323\344\223\0021" + + "\",/v1/{parent=projects/*/secrets/*}:addV" + + "ersion:\001*\332A\016parent,payload\022\223\001\n\tGetSecret" + + "\022/.google.cloud.secretmanager.v1.GetSecr" + "etRequest\032%.google.cloud.secretmanager.v" - + "1.Secret\"K\202\323\344\223\00202&/v1/{secret.name=proje" - + "cts/*/secrets/*}:\006secret\332A\022secret,update" - + "_mask\022\212\001\n\014DeleteSecret\0222.google.cloud.se" - + "cretmanager.v1.DeleteSecretRequest\032\026.goo" - + "gle.protobuf.Empty\".\202\323\344\223\002!*\037/v1/{name=pr" - + "ojects/*/secrets/*}\332A\004name\022\306\001\n\022ListSecre" - + "tVersions\0228.google.cloud.secretmanager.v" - + "1.ListSecretVersionsRequest\0329.google.clo" - + "ud.secretmanager.v1.ListSecretVersionsRe" - + "sponse\";\202\323\344\223\002,\022*/v1/{parent=projects/*/s" - + "ecrets/*}/versions\332A\006parent\022\263\001\n\020GetSecre" - + "tVersion\0226.google.cloud.secretmanager.v1" - + ".GetSecretVersionRequest\032,.google.cloud." - + "secretmanager.v1.SecretVersion\"9\202\323\344\223\002,\022*" - + "/v1/{name=projects/*/secrets/*/versions/" - + "*}\332A\004name\022\316\001\n\023AccessSecretVersion\0229.goog" - + "le.cloud.secretmanager.v1.AccessSecretVe" - + "rsionRequest\032:.google.cloud.secretmanage" - + "r.v1.AccessSecretVersionResponse\"@\202\323\344\223\0023" - + "\0221/v1/{name=projects/*/secrets/*/version" - + "s/*}:access\332A\004name\022\306\001\n\024DisableSecretVers" - + "ion\022:.google.cloud.secretmanager.v1.Disa" - + "bleSecretVersionRequest\032,.google.cloud.s" - + "ecretmanager.v1.SecretVersion\"D\202\323\344\223\0027\"2/" - + "v1/{name=projects/*/secrets/*/versions/*" - + "}:disable:\001*\332A\004name\022\303\001\n\023EnableSecretVers" - + "ion\0229.google.cloud.secretmanager.v1.Enab" - + "leSecretVersionRequest\032,.google.cloud.se" - + "cretmanager.v1.SecretVersion\"C\202\323\344\223\0026\"1/v" + + "1.Secret\".\202\323\344\223\002!\022\037/v1/{name=projects/*/s" + + "ecrets/*}\332A\004name\022\266\001\n\014UpdateSecret\0222.goog" + + "le.cloud.secretmanager.v1.UpdateSecretRe" + + "quest\032%.google.cloud.secretmanager.v1.Se" + + "cret\"K\202\323\344\223\00202&/v1/{secret.name=projects/" + + "*/secrets/*}:\006secret\332A\022secret,update_mas" + + "k\022\212\001\n\014DeleteSecret\0222.google.cloud.secret" + + "manager.v1.DeleteSecretRequest\032\026.google." + + "protobuf.Empty\".\202\323\344\223\002!*\037/v1/{name=projec" + + "ts/*/secrets/*}\332A\004name\022\306\001\n\022ListSecretVer" + + "sions\0228.google.cloud.secretmanager.v1.Li" + + "stSecretVersionsRequest\0329.google.cloud.s" + + "ecretmanager.v1.ListSecretVersionsRespon" + + "se\";\202\323\344\223\002,\022*/v1/{parent=projects/*/secre" + + "ts/*}/versions\332A\006parent\022\263\001\n\020GetSecretVer" + + "sion\0226.google.cloud.secretmanager.v1.Get" + + "SecretVersionRequest\032,.google.cloud.secr" + + "etmanager.v1.SecretVersion\"9\202\323\344\223\002,\022*/v1/" + + "{name=projects/*/secrets/*/versions/*}\332A" + + "\004name\022\316\001\n\023AccessSecretVersion\0229.google.c" + + "loud.secretmanager.v1.AccessSecretVersio" + + "nRequest\032:.google.cloud.secretmanager.v1" + + ".AccessSecretVersionResponse\"@\202\323\344\223\0023\0221/v" + "1/{name=projects/*/secrets/*/versions/*}" - + ":enable:\001*\332A\004name\022\306\001\n\024DestroySecretVersi" - + "on\022:.google.cloud.secretmanager.v1.Destr" - + "oySecretVersionRequest\032,.google.cloud.se" - + "cretmanager.v1.SecretVersion\"D\202\323\344\223\0027\"2/v" - + "1/{name=projects/*/secrets/*/versions/*}" - + ":destroy:\001*\332A\004name\022\206\001\n\014SetIamPolicy\022\".go" - + "ogle.iam.v1.SetIamPolicyRequest\032\025.google" - + ".iam.v1.Policy\";\202\323\344\223\0025\"0/v1/{resource=pr" - + "ojects/*/secrets/*}:setIamPolicy:\001*\022\203\001\n\014" - + "GetIamPolicy\022\".google.iam.v1.GetIamPolic" - + "yRequest\032\025.google.iam.v1.Policy\"8\202\323\344\223\0022\022" - + "0/v1/{resource=projects/*/secrets/*}:get" - + "IamPolicy\022\254\001\n\022TestIamPermissions\022(.googl" - + "e.iam.v1.TestIamPermissionsRequest\032).goo" - + "gle.iam.v1.TestIamPermissionsResponse\"A\202" - + "\323\344\223\002;\"6/v1/{resource=projects/*/secrets/" - + "*}:testIamPermissions:\001*\032P\312A\034secretmanag" - + "er.googleapis.com\322A.https://www.googleap" - + "is.com/auth/cloud-platformB\353\001\n!com.googl" - + "e.cloud.secretmanager.v1B\014ServiceProtoP\001" - + "ZJgoogle.golang.org/genproto/googleapis/" - + "cloud/secretmanager/v1;secretmanager\370\001\001\242" - + "\002\003GSM\252\002\035Google.Cloud.SecretManager.V1\312\002\035" - + "Google\\Cloud\\SecretManager\\V1\352\002 Google::" - + "Cloud::SecretManager::V1b\006proto3" + + ":access\332A\004name\022\306\001\n\024DisableSecretVersion\022" + + ":.google.cloud.secretmanager.v1.DisableS" + + "ecretVersionRequest\032,.google.cloud.secre" + + "tmanager.v1.SecretVersion\"D\202\323\344\223\0027\"2/v1/{" + + "name=projects/*/secrets/*/versions/*}:di" + + "sable:\001*\332A\004name\022\303\001\n\023EnableSecretVersion\022" + + "9.google.cloud.secretmanager.v1.EnableSe" + + "cretVersionRequest\032,.google.cloud.secret" + + "manager.v1.SecretVersion\"C\202\323\344\223\0026\"1/v1/{n" + + "ame=projects/*/secrets/*/versions/*}:ena" + + "ble:\001*\332A\004name\022\306\001\n\024DestroySecretVersion\022:" + + ".google.cloud.secretmanager.v1.DestroySe" + + "cretVersionRequest\032,.google.cloud.secret" + + "manager.v1.SecretVersion\"D\202\323\344\223\0027\"2/v1/{n" + + "ame=projects/*/secrets/*/versions/*}:des" + + "troy:\001*\332A\004name\022\206\001\n\014SetIamPolicy\022\".google" + + ".iam.v1.SetIamPolicyRequest\032\025.google.iam" + + ".v1.Policy\";\202\323\344\223\0025\"0/v1/{resource=projec" + + "ts/*/secrets/*}:setIamPolicy:\001*\022\203\001\n\014GetI" + + "amPolicy\022\".google.iam.v1.GetIamPolicyReq" + + "uest\032\025.google.iam.v1.Policy\"8\202\323\344\223\0022\0220/v1" + + "/{resource=projects/*/secrets/*}:getIamP" + + "olicy\022\254\001\n\022TestIamPermissions\022(.google.ia" + + "m.v1.TestIamPermissionsRequest\032).google." + + "iam.v1.TestIamPermissionsResponse\"A\202\323\344\223\002" + + ";\"6/v1/{resource=projects/*/secrets/*}:t" + + "estIamPermissions:\001*\032P\312A\034secretmanager.g" + + "oogleapis.com\322A.https://www.googleapis.c" + + "om/auth/cloud-platformB\353\001\n!com.google.cl" + + "oud.secretmanager.v1B\014ServiceProtoP\001ZJgo" + + "ogle.golang.org/genproto/googleapis/clou" + + "d/secretmanager/v1;secretmanager\370\001\001\242\002\003GS" + + "M\252\002\035Google.Cloud.SecretManager.V1\312\002\035Goog" + + "le\\Cloud\\SecretManager\\V1\352\002 Google::Clou" + + "d::SecretManager::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -335,7 +337,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_secretmanager_v1_DeleteSecretRequest_descriptor, new java.lang.String[] { - "Name", + "Name", "Etag", }); internal_static_google_cloud_secretmanager_v1_DisableSecretVersionRequest_descriptor = getDescriptor().getMessageTypes().get(12); @@ -343,7 +345,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_secretmanager_v1_DisableSecretVersionRequest_descriptor, new java.lang.String[] { - "Name", + "Name", "Etag", }); internal_static_google_cloud_secretmanager_v1_EnableSecretVersionRequest_descriptor = getDescriptor().getMessageTypes().get(13); @@ -351,7 +353,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_secretmanager_v1_EnableSecretVersionRequest_descriptor, new java.lang.String[] { - "Name", + "Name", "Etag", }); internal_static_google_cloud_secretmanager_v1_DestroySecretVersionRequest_descriptor = getDescriptor().getMessageTypes().get(14); @@ -359,7 +361,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_secretmanager_v1_DestroySecretVersionRequest_descriptor, new java.lang.String[] { - "Name", + "Name", "Etag", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/proto-google-cloud-secretmanager-v1/src/main/proto/google/cloud/secretmanager/v1/resources.proto b/proto-google-cloud-secretmanager-v1/src/main/proto/google/cloud/secretmanager/v1/resources.proto index 597cfe8a..9b189692 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/proto/google/cloud/secretmanager/v1/resources.proto +++ b/proto-google-cloud-secretmanager-v1/src/main/proto/google/cloud/secretmanager/v1/resources.proto @@ -91,6 +91,9 @@ message Secret { google.protobuf.Duration ttl = 7 [(google.api.field_behavior) = INPUT_ONLY]; } + // Optional. Etag of the currently stored [Secret][google.cloud.secretmanager.v1.Secret]. + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Rotation policy attached to the [Secret][google.cloud.secretmanager.v1.Secret]. May be excluded if there is no // rotation policy. Rotation rotation = 9 [(google.api.field_behavior) = OPTIONAL]; @@ -141,6 +144,9 @@ message SecretVersion { // The replication status of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. ReplicationStatus replication_status = 5; + + // Output only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + string etag = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A policy that defines the replication and encryption configuration of data. @@ -286,7 +292,9 @@ message Topic { // Manager will send a Pub/Sub notification to the topics configured on the // Secret. [Secret.topics][google.cloud.secretmanager.v1.Secret.topics] must be set to configure rotation. message Rotation { - // Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. + // Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate. Cannot be + // set to less than 300s (5 min) in the future and at most 3153600000s (100 + // years). // // [next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time] MUST be set if [rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period] is set. google.protobuf.Timestamp next_rotation_time = 1 [(google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-secretmanager-v1/src/main/proto/google/cloud/secretmanager/v1/service.proto b/proto-google-cloud-secretmanager-v1/src/main/proto/google/cloud/secretmanager/v1/service.proto index 1e9d3e04..44ffe421 100644 --- a/proto-google-cloud-secretmanager-v1/src/main/proto/google/cloud/secretmanager/v1/service.proto +++ b/proto-google-cloud-secretmanager-v1/src/main/proto/google/cloud/secretmanager/v1/service.proto @@ -110,8 +110,8 @@ service SecretManagerService { // Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. // - // `projects/*/secrets/*/versions/latest` is an alias to the `latest` - // [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + // `projects/*/secrets/*/versions/latest` is an alias to the most recently + // created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. rpc GetSecretVersion(GetSecretVersionRequest) returns (SecretVersion) { option (google.api.http) = { get: "/v1/{name=projects/*/secrets/*/versions/*}" @@ -121,8 +121,8 @@ service SecretManagerService { // Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data. // - // `projects/*/secrets/*/versions/latest` is an alias to the `latest` - // [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + // `projects/*/secrets/*/versions/latest` is an alias to the most recently + // created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. rpc AccessSecretVersion(AccessSecretVersionRequest) returns (AccessSecretVersionResponse) { option (google.api.http) = { get: "/v1/{name=projects/*/secrets/*/versions/*}:access" @@ -325,8 +325,9 @@ message ListSecretVersionsResponse { message GetSecretVersionRequest { // Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format // `projects/*/secrets/*/versions/*`. - // `projects/*/secrets/*/versions/latest` is an alias to the `latest` - // [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + // + // `projects/*/secrets/*/versions/latest` is an alias to the most recently + // created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -348,6 +349,9 @@ message UpdateSecretRequest { message AccessSecretVersionRequest { // Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format // `projects/*/secrets/*/versions/*`. + // + // `projects/*/secrets/*/versions/latest` is an alias to the most recently + // created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -378,6 +382,11 @@ message DeleteSecretRequest { type: "secretmanager.googleapis.com/Secret" } ]; + + // Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches + // the etag of the currently stored secret object. If the etag is omitted, + // the request succeeds. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for [SecretManagerService.DisableSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.DisableSecretVersion]. @@ -390,6 +399,11 @@ message DisableSecretVersionRequest { type: "secretmanager.googleapis.com/SecretVersion" } ]; + + // Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches + // the etag of the currently stored secret version object. If the etag is + // omitted, the request succeeds. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for [SecretManagerService.EnableSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.EnableSecretVersion]. @@ -402,6 +416,11 @@ message EnableSecretVersionRequest { type: "secretmanager.googleapis.com/SecretVersion" } ]; + + // Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches + // the etag of the currently stored secret version object. If the etag is + // omitted, the request succeeds. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for [SecretManagerService.DestroySecretVersion][google.cloud.secretmanager.v1.SecretManagerService.DestroySecretVersion]. @@ -414,4 +433,9 @@ message DestroySecretVersionRequest { type: "secretmanager.googleapis.com/SecretVersion" } ]; + + // Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches + // the etag of the currently stored secret version object. If the etag is + // omitted, the request succeeds. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/synth.metadata b/synth.metadata index 5dfb37b5..1d19b1df 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-secretmanager.git", - "sha": "5cd416ff76d4550e2209def6c6a4322d7d9a7a8f" + "sha": "3ca2d226cc8e0c7ed60b0f7e0a8afcd5a2ec8139" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6c7693680fe320b4705dd8500c255843749eb58a", - "internalRef": "365574085" + "sha": "bff807490f09712527b1af607160a4f7ae48702e", + "internalRef": "373836373" } }, {