diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml index 0e85f8052..7023350ad 100644 --- a/.github/workflows/hermetic_library_generation.yaml +++ b/.github/workflows/hermetic_library_generation.yaml @@ -37,7 +37,7 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - - uses: googleapis/sdk-platform-java/.github/scripts@v2.62.3 + - uses: googleapis/sdk-platform-java/.github/scripts@v2.63.0 if: env.SHOULD_RUN == 'true' with: base_ref: ${{ github.base_ref }} diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index b7567eeb7..55c5543e2 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.52.3" # {x-version-update:google-cloud-shared-dependencies:current} + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.53.0" # {x-version-update:google-cloud-shared-dependencies:current} } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index c7205f0ab..5c981b984 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.52.3" # {x-version-update:google-cloud-shared-dependencies:current} + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.53.0" # {x-version-update:google-cloud-shared-dependencies:current} } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native-c.cfg b/.kokoro/presubmit/graalvm-native-c.cfg index f6ab8976a..f2032499d 100644 --- a/.kokoro/presubmit/graalvm-native-c.cfg +++ b/.kokoro/presubmit/graalvm-native-c.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.52.3" # {x-version-update:google-cloud-shared-dependencies:current} + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.53.0" # {x-version-update:google-cloud-shared-dependencies:current} } env_vars: { diff --git a/README.md b/README.md index 4d9a3de62..2e7f2aa59 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.69.0') +implementation platform('com.google.cloud:libraries-bom:26.70.0') implementation 'com.google.cloud:google-cloud-pubsub' ``` diff --git a/generation_config.yaml b/generation_config.yaml index b70e279e6..0a9e75959 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ -gapic_generator_version: 2.62.3 -googleapis_commitish: 6e79e73204aed17b11e724beebb9cf11f36ea57d -libraries_bom_version: 26.69.0 +gapic_generator_version: 2.63.0 +googleapis_commitish: c288189b43c016dd3cf1ec73ce3cadee8b732f07 +libraries_bom_version: 26.70.0 libraries: - api_shortname: pubsub name_pretty: Cloud Pub/Sub diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index e0e70beb2..f22e3ec16 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -881,6 +881,7 @@ public final Subscription createSubscription( * .setAnalyticsHubSubscriptionInfo( * Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) * .addAllMessageTransforms(new ArrayList()) + * .putAllTags(new HashMap()) * .build(); * Subscription response = subscriptionAdminClient.createSubscription(request); * } @@ -1147,6 +1148,7 @@ public final Subscription createSubscription( * .setAnalyticsHubSubscriptionInfo( * Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) * .addAllMessageTransforms(new ArrayList()) + * .putAllTags(new HashMap()) * .build(); * ApiFuture future = * subscriptionAdminClient.createSubscriptionCallable().futureCall(request); @@ -3181,6 +3183,7 @@ public final Snapshot createSnapshot(String name, String subscription) { * .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .putAllLabels(new HashMap()) + * .putAllTags(new HashMap()) * .build(); * Snapshot response = subscriptionAdminClient.createSnapshot(request); * } @@ -3373,6 +3376,7 @@ public final Snapshot createSnapshot(ProjectSnapshotName name, String subscripti * .setName(SnapshotName.of("[PROJECT]", "[SNAPSHOT]").toString()) * .setSubscription(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString()) * .putAllLabels(new HashMap()) + * .putAllTags(new HashMap()) * .build(); * ApiFuture future = * subscriptionAdminClient.createSnapshotCallable().futureCall(request); diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java index 2e635ba43..750f4da49 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/TopicAdminClient.java @@ -511,12 +511,15 @@ public final Topic createTopic(ProjectTopicName name) { * .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) * .putAllLabels(new HashMap()) * .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - * .setKmsKeyName("kmsKeyName412586233") + * .setKmsKeyName( + * CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + * .toString()) * .setSchemaSettings(SchemaSettings.newBuilder().build()) * .setSatisfiesPzs(true) * .setMessageRetentionDuration(Duration.newBuilder().build()) * .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) * .addAllMessageTransforms(new ArrayList()) + * .putAllTags(new HashMap()) * .build(); * Topic response = topicAdminClient.createTopic(request); * } @@ -548,12 +551,15 @@ public final Topic createTopic(Topic request) { * .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) * .putAllLabels(new HashMap()) * .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - * .setKmsKeyName("kmsKeyName412586233") + * .setKmsKeyName( + * CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + * .toString()) * .setSchemaSettings(SchemaSettings.newBuilder().build()) * .setSatisfiesPzs(true) * .setMessageRetentionDuration(Duration.newBuilder().build()) * .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) * .addAllMessageTransforms(new ArrayList()) + * .putAllTags(new HashMap()) * .build(); * ApiFuture future = topicAdminClient.createTopicCallable().futureCall(request); * // Do something. diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientHttpJsonTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientHttpJsonTest.java index 711c8da98..860eb95ce 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientHttpJsonTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientHttpJsonTest.java @@ -135,6 +135,7 @@ public void createSubscriptionTest() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -205,6 +206,7 @@ public void createSubscriptionTest2() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -275,6 +277,7 @@ public void createSubscriptionTest3() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -345,6 +348,7 @@ public void createSubscriptionTest4() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -415,6 +419,7 @@ public void getSubscriptionTest() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -478,6 +483,7 @@ public void getSubscriptionTest2() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -541,6 +547,7 @@ public void updateSubscriptionTest() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -566,6 +573,7 @@ public void updateSubscriptionTest() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -617,6 +625,7 @@ public void updateSubscriptionExceptionTest() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateSubscription(subscription, updateMask); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java index c7d13c720..480e7ceaa 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java @@ -161,6 +161,7 @@ public void createSubscriptionTest() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -228,6 +229,7 @@ public void createSubscriptionTest2() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -295,6 +297,7 @@ public void createSubscriptionTest3() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -362,6 +365,7 @@ public void createSubscriptionTest4() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -429,6 +433,7 @@ public void getSubscriptionTest() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -486,6 +491,7 @@ public void getSubscriptionTest2() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -543,6 +549,7 @@ public void updateSubscriptionTest() throws Exception { .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockSubscriber.addResponse(expectedResponse); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientHttpJsonTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientHttpJsonTest.java index 5a1e1e68a..44488abc6 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientHttpJsonTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientHttpJsonTest.java @@ -43,6 +43,7 @@ import com.google.protobuf.Duration; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; +import com.google.pubsub.v1.CryptoKeyName; import com.google.pubsub.v1.DetachSubscriptionRequest; import com.google.pubsub.v1.DetachSubscriptionResponse; import com.google.pubsub.v1.IngestionDataSourceSettings; @@ -113,12 +114,15 @@ public void createTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -165,12 +169,15 @@ public void createTopicTest2() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -217,12 +224,15 @@ public void updateTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -231,12 +241,15 @@ public void updateTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -271,12 +284,15 @@ public void updateTopicExceptionTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateTopic(topic, updateMask); @@ -381,12 +397,15 @@ public void getTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -433,12 +452,15 @@ public void getTopicTest2() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockService.addResponse(expectedResponse); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java index d1e05afde..2ad693de3 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/TopicAdminClientTest.java @@ -41,6 +41,7 @@ import com.google.protobuf.Duration; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; +import com.google.pubsub.v1.CryptoKeyName; import com.google.pubsub.v1.DeleteTopicRequest; import com.google.pubsub.v1.DetachSubscriptionRequest; import com.google.pubsub.v1.DetachSubscriptionResponse; @@ -127,12 +128,15 @@ public void createTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockPublisher.addResponse(expectedResponse); @@ -173,12 +177,15 @@ public void createTopicTest2() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockPublisher.addResponse(expectedResponse); @@ -219,12 +226,15 @@ public void updateTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockPublisher.addResponse(expectedResponse); @@ -346,12 +356,15 @@ public void getTopicTest() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockPublisher.addResponse(expectedResponse); @@ -392,12 +405,15 @@ public void getTopicTest2() throws Exception { .setName(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString()) .putAllLabels(new HashMap()) .setMessageStoragePolicy(MessageStoragePolicy.newBuilder().build()) - .setKmsKeyName("kmsKeyName412586233") + .setKmsKeyName( + CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]") + .toString()) .setSchemaSettings(SchemaSettings.newBuilder().build()) .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) .addAllMessageTransforms(new ArrayList()) + .putAllTags(new HashMap()) .build(); mockPublisher.addResponse(expectedResponse); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java index 079f3344b..e5d4f651c 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequest.java @@ -62,6 +62,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 3: return internalGetLabels(); + case 4: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -328,6 +330,133 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { return map.get(key); } + public static final int TAGS_FIELD_NUMBER = 4; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_CreateSnapshotRequest_TagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -350,6 +479,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 4); getUnknownFields().writeTo(output); } @@ -375,6 +506,16 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); } + for (java.util.Map.Entry entry : + internalGetTags().getMap().entrySet()) { + com.google.protobuf.MapEntry tags__ = + TagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, tags__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -394,6 +535,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getSubscription().equals(other.getSubscription())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetTags().equals(other.internalGetTags())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,6 +555,10 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -538,6 +684,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 3: return internalGetLabels(); + case 4: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -549,6 +697,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi switch (number) { case 3: return internalGetMutableLabels(); + case 4: + return internalGetMutableTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -578,6 +728,7 @@ public Builder clear() { name_ = ""; subscription_ = ""; internalGetMutableLabels().clear(); + internalGetMutableTags().clear(); return this; } @@ -624,6 +775,10 @@ private void buildPartial0(com.google.pubsub.v1.CreateSnapshotRequest result) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + } } @java.lang.Override @@ -683,6 +838,8 @@ public Builder mergeFrom(com.google.pubsub.v1.CreateSnapshotRequest other) { } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); bitField0_ |= 0x00000004; + internalGetMutableTags().mergeFrom(other.internalGetTags()); + bitField0_ |= 0x00000008; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -733,6 +890,15 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTags().getMutableMap().put(tags__.getKey(), tags__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1238,6 +1404,213 @@ public Builder putAllLabels(java.util.Map va return this; } + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + private com.google.protobuf.MapField + internalGetMutableTags() { + if (tags_ == null) { + tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + } + if (!tags_.isMutable()) { + tags_ = tags_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTags() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableTags().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTags().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTags() { + bitField0_ |= 0x00000008; + return internalGetMutableTags().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableTags().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllTags(java.util.Map values) { + internalGetMutableTags().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + 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-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java index 25f5c59d1..80a1f76fc 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CreateSnapshotRequestOrBuilder.java @@ -177,4 +177,92 @@ java.lang.String getLabelsOrDefault( * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; */ java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + int getTagsCount(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsTags(java.lang.String key); + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTags(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getTagsMap(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getTagsOrThrow(java.lang.String key); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CryptoKeyName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CryptoKeyName.java new file mode 100644 index 000000000..12a4c7312 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/CryptoKeyName.java @@ -0,0 +1,261 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.pubsub.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class CryptoKeyName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_KEY_RING_CRYPTO_KEY = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String keyRing; + private final String cryptoKey; + + @Deprecated + protected CryptoKeyName() { + project = null; + location = null; + keyRing = null; + cryptoKey = null; + } + + private CryptoKeyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + keyRing = Preconditions.checkNotNull(builder.getKeyRing()); + cryptoKey = Preconditions.checkNotNull(builder.getCryptoKey()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getKeyRing() { + return keyRing; + } + + public String getCryptoKey() { + return cryptoKey; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CryptoKeyName of( + String project, String location, String keyRing, String cryptoKey) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setKeyRing(keyRing) + .setCryptoKey(cryptoKey) + .build(); + } + + public static String format(String project, String location, String keyRing, String cryptoKey) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setKeyRing(keyRing) + .setCryptoKey(cryptoKey) + .build() + .toString(); + } + + public static CryptoKeyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_KEY_RING_CRYPTO_KEY.validatedMatch( + formattedString, "CryptoKeyName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("key_ring"), + matchMap.get("crypto_key")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (CryptoKeyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_KEY_RING_CRYPTO_KEY.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (keyRing != null) { + fieldMapBuilder.put("key_ring", keyRing); + } + if (cryptoKey != null) { + fieldMapBuilder.put("crypto_key", cryptoKey); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_KEY_RING_CRYPTO_KEY.instantiate( + "project", project, "location", location, "key_ring", keyRing, "crypto_key", cryptoKey); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + CryptoKeyName that = ((CryptoKeyName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.keyRing, that.keyRing) + && Objects.equals(this.cryptoKey, that.cryptoKey); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(keyRing); + h *= 1000003; + h ^= Objects.hashCode(cryptoKey); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. + */ + public static class Builder { + private String project; + private String location; + private String keyRing; + private String cryptoKey; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getKeyRing() { + return keyRing; + } + + public String getCryptoKey() { + return cryptoKey; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setKeyRing(String keyRing) { + this.keyRing = keyRing; + return this; + } + + public Builder setCryptoKey(String cryptoKey) { + this.cryptoKey = cryptoKey; + return this; + } + + private Builder(CryptoKeyName cryptoKeyName) { + this.project = cryptoKeyName.project; + this.location = cryptoKeyName.location; + this.keyRing = cryptoKeyName.keyRing; + this.cryptoKey = cryptoKeyName.cryptoKey; + } + + public CryptoKeyName build() { + return new CryptoKeyName(this); + } + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java index b9b9f3a19..d809e9d6b 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicy.java @@ -88,7 +88,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The deadLetterTopic. */ @@ -120,7 +122,9 @@ public java.lang.String getDeadLetterTopic() { * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for deadLetterTopic. */ @@ -551,7 +555,9 @@ public Builder mergeFrom( * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The deadLetterTopic. */ @@ -582,7 +588,9 @@ public java.lang.String getDeadLetterTopic() { * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for deadLetterTopic. */ @@ -613,7 +621,9 @@ public com.google.protobuf.ByteString getDeadLetterTopicBytes() { * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The deadLetterTopic to set. * @return This builder for chaining. @@ -643,7 +653,9 @@ public Builder setDeadLetterTopic(java.lang.String value) { * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -669,7 +681,9 @@ public Builder clearDeadLetterTopic() { * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for deadLetterTopic to set. * @return This builder for chaining. diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicyOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicyOrBuilder.java index 2978a0510..83159d59d 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicyOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeadLetterPolicyOrBuilder.java @@ -39,7 +39,9 @@ public interface DeadLetterPolicyOrBuilder * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The deadLetterTopic. */ @@ -60,7 +62,9 @@ public interface DeadLetterPolicyOrBuilder * since messages published to a topic with no subscriptions are lost. * * - * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string dead_letter_topic = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for deadLetterTopic. */ diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java index 73f44578d..d2c79575f 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionDataSourceSettings.java @@ -9182,7 +9182,9 @@ public interface AwsMskOrBuilder * will import from. * * - * string topic = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The topic. */ @@ -9196,7 +9198,9 @@ public interface AwsMskOrBuilder * will import from. * * - * string topic = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for topic. */ @@ -9657,7 +9661,9 @@ public com.google.protobuf.ByteString getClusterArnBytes() { * will import from. * * - * string topic = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The topic. */ @@ -9682,7 +9688,9 @@ public java.lang.String getTopic() { * will import from. * * - * string topic = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for topic. */ @@ -10499,7 +10507,9 @@ public Builder setClusterArnBytes(com.google.protobuf.ByteString value) { * will import from. * * - * string topic = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The topic. */ @@ -10523,7 +10533,9 @@ public java.lang.String getTopic() { * will import from. * * - * string topic = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for topic. */ @@ -10547,7 +10559,9 @@ public com.google.protobuf.ByteString getTopicBytes() { * will import from. * * - * string topic = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The topic to set. * @return This builder for chaining. @@ -10570,7 +10584,9 @@ public Builder setTopic(java.lang.String value) { * will import from. * * - * string topic = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -10589,7 +10605,9 @@ public Builder clearTopic() { * will import from. * * - * string topic = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for topic to set. * @return This builder for chaining. diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEvent.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEvent.java index 640c8f154..6f1455a19 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEvent.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEvent.java @@ -11941,6 +11941,56 @@ public interface AwsKinesisFailureReasonOrBuilder com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonOrBuilder getMessageTransformationFailureReasonOrBuilder(); + /** + * + * + *
+     * Optional. The message failed to be published due to an API violation.
+     * This is only set when the size of the data field of the Kinesis record
+     * is zero.
+     * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + boolean hasApiViolationReason(); + + /** + * + * + *
+     * Optional. The message failed to be published due to an API violation.
+     * This is only set when the size of the data field of the Kinesis record
+     * is zero.
+     * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason(); + + /** + * + * + *
+     * Optional. The message failed to be published due to an API violation.
+     * This is only set when the size of the data field of the Kinesis record
+     * is zero.
+     * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder(); + com.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.ReasonCase getReasonCase(); } @@ -12002,6 +12052,7 @@ public enum ReasonCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { SCHEMA_VIOLATION_REASON(4), MESSAGE_TRANSFORMATION_FAILURE_REASON(5), + API_VIOLATION_REASON(6), REASON_NOT_SET(0); private final int value; @@ -12025,6 +12076,8 @@ public static ReasonCase forNumber(int value) { return SCHEMA_VIOLATION_REASON; case 5: return MESSAGE_TRANSFORMATION_FAILURE_REASON; + case 6: + return API_VIOLATION_REASON; case 0: return REASON_NOT_SET; default: @@ -12331,6 +12384,73 @@ public boolean hasMessageTransformationFailureReason() { .getDefaultInstance(); } + public static final int API_VIOLATION_REASON_FIELD_NUMBER = 6; + + /** + * + * + *
+     * Optional. The message failed to be published due to an API violation.
+     * This is only set when the size of the data field of the Kinesis record
+     * is zero.
+     * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + @java.lang.Override + public boolean hasApiViolationReason() { + return reasonCase_ == 6; + } + + /** + * + * + *
+     * Optional. The message failed to be published due to an API violation.
+     * This is only set when the size of the data field of the Kinesis record
+     * is zero.
+     * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + + /** + * + * + *
+     * Optional. The message failed to be published due to an API violation.
+     * This is only set when the size of the data field of the Kinesis record
+     * is zero.
+     * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder() { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -12364,6 +12484,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) reason_); } + if (reasonCase_ == 6) { + output.writeMessage( + 6, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } getUnknownFields().writeTo(output); } @@ -12394,6 +12518,11 @@ public int getSerializedSize() { (com.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) reason_); } + if (reasonCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -12422,6 +12551,9 @@ public boolean equals(final java.lang.Object obj) { if (!getMessageTransformationFailureReason() .equals(other.getMessageTransformationFailureReason())) return false; break; + case 6: + if (!getApiViolationReason().equals(other.getApiViolationReason())) return false; + break; case 0: default: } @@ -12451,6 +12583,10 @@ public int hashCode() { hash = (37 * hash) + MESSAGE_TRANSFORMATION_FAILURE_REASON_FIELD_NUMBER; hash = (53 * hash) + getMessageTransformationFailureReason().hashCode(); break; + case 6: + hash = (37 * hash) + API_VIOLATION_REASON_FIELD_NUMBER; + hash = (53 * hash) + getApiViolationReason().hashCode(); + break; case 0: default: } @@ -12608,6 +12744,9 @@ public Builder clear() { if (messageTransformationFailureReasonBuilder_ != null) { messageTransformationFailureReasonBuilder_.clear(); } + if (apiViolationReasonBuilder_ != null) { + apiViolationReasonBuilder_.clear(); + } reasonCase_ = 0; reason_ = null; return this; @@ -12671,6 +12810,9 @@ private void buildPartialOneofs( if (reasonCase_ == 5 && messageTransformationFailureReasonBuilder_ != null) { result.reason_ = messageTransformationFailureReasonBuilder_.build(); } + if (reasonCase_ == 6 && apiViolationReasonBuilder_ != null) { + result.reason_ = apiViolationReasonBuilder_.build(); + } } @java.lang.Override @@ -12751,6 +12893,11 @@ public Builder mergeFrom( other.getMessageTransformationFailureReason()); break; } + case API_VIOLATION_REASON: + { + mergeApiViolationReason(other.getApiViolationReason()); + break; + } case REASON_NOT_SET: { break; @@ -12815,6 +12962,13 @@ public Builder mergeFrom( reasonCase_ = 5; break; } // case 42 + case 50: + { + input.readMessage( + getApiViolationReasonFieldBuilder().getBuilder(), extensionRegistry); + reasonCase_ = 6; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -13698,6 +13852,267 @@ public Builder clearMessageTransformationFailureReason() { return messageTransformationFailureReasonBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> + apiViolationReasonBuilder_; + + /** + * + * + *
+       * Optional. The message failed to be published due to an API violation.
+       * This is only set when the size of the data field of the Kinesis record
+       * is zero.
+       * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the apiViolationReason field is set. + */ + @java.lang.Override + public boolean hasApiViolationReason() { + return reasonCase_ == 6; + } + + /** + * + * + *
+       * Optional. The message failed to be published due to an API violation.
+       * This is only set when the size of the data field of the Kinesis record
+       * is zero.
+       * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The apiViolationReason. + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason getApiViolationReason() { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } else { + if (reasonCase_ == 6) { + return apiViolationReasonBuilder_.getMessage(); + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + } + + /** + * + * + *
+       * Optional. The message failed to be published due to an API violation.
+       * This is only set when the size of the data field of the Kinesis record
+       * is zero.
+       * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason value) { + if (apiViolationReasonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + onChanged(); + } else { + apiViolationReasonBuilder_.setMessage(value); + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
+       * Optional. The message failed to be published due to an API violation.
+       * This is only set when the size of the data field of the Kinesis record
+       * is zero.
+       * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder builderForValue) { + if (apiViolationReasonBuilder_ == null) { + reason_ = builderForValue.build(); + onChanged(); + } else { + apiViolationReasonBuilder_.setMessage(builderForValue.build()); + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
+       * Optional. The message failed to be published due to an API violation.
+       * This is only set when the size of the data field of the Kinesis record
+       * is zero.
+       * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeApiViolationReason( + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason value) { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 6 + && reason_ + != com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason + .getDefaultInstance()) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.newBuilder( + (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_) + .mergeFrom(value) + .buildPartial(); + } else { + reason_ = value; + } + onChanged(); + } else { + if (reasonCase_ == 6) { + apiViolationReasonBuilder_.mergeFrom(value); + } else { + apiViolationReasonBuilder_.setMessage(value); + } + } + reasonCase_ = 6; + return this; + } + + /** + * + * + *
+       * Optional. The message failed to be published due to an API violation.
+       * This is only set when the size of the data field of the Kinesis record
+       * is zero.
+       * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearApiViolationReason() { + if (apiViolationReasonBuilder_ == null) { + if (reasonCase_ == 6) { + reasonCase_ = 0; + reason_ = null; + onChanged(); + } + } else { + if (reasonCase_ == 6) { + reasonCase_ = 0; + reason_ = null; + } + apiViolationReasonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Optional. The message failed to be published due to an API violation.
+       * This is only set when the size of the data field of the Kinesis record
+       * is zero.
+       * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder + getApiViolationReasonBuilder() { + return getApiViolationReasonFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. The message failed to be published due to an API violation.
+       * This is only set when the size of the data field of the Kinesis record
+       * is zero.
+       * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder + getApiViolationReasonOrBuilder() { + if ((reasonCase_ == 6) && (apiViolationReasonBuilder_ != null)) { + return apiViolationReasonBuilder_.getMessageOrBuilder(); + } else { + if (reasonCase_ == 6) { + return (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_; + } + return com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + } + + /** + * + * + *
+       * Optional. The message failed to be published due to an API violation.
+       * This is only set when the size of the data field of the Kinesis record
+       * is zero.
+       * 
+ * + * + * .google.pubsub.v1.IngestionFailureEvent.ApiViolationReason api_violation_reason = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder> + getApiViolationReasonFieldBuilder() { + if (apiViolationReasonBuilder_ == null) { + if (!(reasonCase_ == 6)) { + reason_ = + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.getDefaultInstance(); + } + apiViolationReasonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.Builder, + com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonOrBuilder>( + (com.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) reason_, + getParentForChildren(), + isClean()); + reason_ = null; + } + reasonCase_ = 6; + onChanged(); + return apiViolationReasonBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -13837,7 +14252,9 @@ public FailureCase getFailureCase() { * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The topic. */ @@ -13862,7 +14279,9 @@ public java.lang.String getTopic() { * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for topic. */ @@ -14826,7 +15245,9 @@ public Builder clearFailure() { * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The topic. */ @@ -14850,7 +15271,9 @@ public java.lang.String getTopic() { * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for topic. */ @@ -14874,7 +15297,9 @@ public com.google.protobuf.ByteString getTopicBytes() { * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The topic to set. * @return This builder for chaining. @@ -14897,7 +15322,9 @@ public Builder setTopic(java.lang.String value) { * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -14916,7 +15343,9 @@ public Builder clearTopic() { * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for topic to set. * @return This builder for chaining. diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEventOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEventOrBuilder.java index c7ceeb108..49390d159 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEventOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/IngestionFailureEventOrBuilder.java @@ -32,7 +32,9 @@ public interface IngestionFailureEventOrBuilder * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The topic. */ @@ -46,7 +48,9 @@ public interface IngestionFailureEventOrBuilder * projects/{project_name}/topics/{topic_name}. * * - * string topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for topic. */ diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java index 4536d9f60..387a4ef7e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponse.java @@ -78,7 +78,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return A list containing the snapshots. */ @@ -93,7 +95,9 @@ public com.google.protobuf.ProtocolStringList getSnapshotsList() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The count of snapshots. */ @@ -108,7 +112,9 @@ public int getSnapshotsCount() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the element to return. * @return The snapshots at the given index. @@ -124,7 +130,9 @@ public java.lang.String getSnapshots(int index) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the value to return. * @return The bytes of the snapshots at the given index. @@ -588,7 +596,9 @@ private void ensureSnapshotsIsMutable() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return A list containing the snapshots. */ @@ -604,7 +614,9 @@ public com.google.protobuf.ProtocolStringList getSnapshotsList() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The count of snapshots. */ @@ -619,7 +631,9 @@ public int getSnapshotsCount() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the element to return. * @return The snapshots at the given index. @@ -635,7 +649,9 @@ public java.lang.String getSnapshots(int index) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the value to return. * @return The bytes of the snapshots at the given index. @@ -651,7 +667,9 @@ public com.google.protobuf.ByteString getSnapshotsBytes(int index) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index to set the value at. * @param value The snapshots to set. @@ -675,7 +693,9 @@ public Builder setSnapshots(int index, java.lang.String value) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The snapshots to add. * @return This builder for chaining. @@ -698,7 +718,9 @@ public Builder addSnapshots(java.lang.String value) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param values The snapshots to add. * @return This builder for chaining. @@ -718,7 +740,9 @@ public Builder addAllSnapshots(java.lang.Iterable values) { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -737,7 +761,9 @@ public Builder clearSnapshots() { * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes of the snapshots to add. * @return This builder for chaining. diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java index 4623e163f..fd3eca179 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ListTopicSnapshotsResponseOrBuilder.java @@ -31,7 +31,9 @@ public interface ListTopicSnapshotsResponseOrBuilder * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return A list containing the snapshots. */ @@ -44,7 +46,9 @@ public interface ListTopicSnapshotsResponseOrBuilder * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The count of snapshots. */ @@ -57,7 +61,9 @@ public interface ListTopicSnapshotsResponseOrBuilder * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the element to return. * @return The snapshots at the given index. @@ -71,7 +77,9 @@ public interface ListTopicSnapshotsResponseOrBuilder * Optional. The names of the snapshots that match the request. * * - * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string snapshots = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param index The index of the value to return. * @return The bytes of the snapshots at the given index. diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransform.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransform.java index 0456c10b4..573d42c33 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransform.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransform.java @@ -186,7 +186,7 @@ public com.google.pubsub.v1.JavaScriptUDFOrBuilder getJavascriptUdfOrBuilder() { * bool enabled = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.pubsub.v1.MessageTransform.enabled is deprecated. See - * google/pubsub/v1/pubsub.proto;l=798 + * google/pubsub/v1/pubsub.proto;l=818 * @return The enabled. */ @java.lang.Override @@ -899,7 +899,7 @@ public com.google.pubsub.v1.JavaScriptUDFOrBuilder getJavascriptUdfOrBuilder() { * bool enabled = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.pubsub.v1.MessageTransform.enabled is deprecated. See - * google/pubsub/v1/pubsub.proto;l=798 + * google/pubsub/v1/pubsub.proto;l=818 * @return The enabled. */ @java.lang.Override @@ -919,7 +919,7 @@ public boolean getEnabled() { * bool enabled = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.pubsub.v1.MessageTransform.enabled is deprecated. See - * google/pubsub/v1/pubsub.proto;l=798 + * google/pubsub/v1/pubsub.proto;l=818 * @param value The enabled to set. * @return This builder for chaining. */ @@ -943,7 +943,7 @@ public Builder setEnabled(boolean value) { * bool enabled = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.pubsub.v1.MessageTransform.enabled is deprecated. See - * google/pubsub/v1/pubsub.proto;l=798 + * google/pubsub/v1/pubsub.proto;l=818 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransformOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransformOrBuilder.java index 324cf524a..24c73b06b 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransformOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransformOrBuilder.java @@ -81,7 +81,7 @@ public interface MessageTransformOrBuilder * bool enabled = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * * @deprecated google.pubsub.v1.MessageTransform.enabled is deprecated. See - * google/pubsub/v1/pubsub.proto;l=798 + * google/pubsub/v1/pubsub.proto;l=818 * @return The enabled. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java index 0a9017c9b..1b5e7d634 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java @@ -132,6 +132,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_pubsub_v1_Topic_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_pubsub_v1_Topic_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_Topic_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_Topic_TagsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_PubsubMessage_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -204,6 +208,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_pubsub_v1_Subscription_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_pubsub_v1_Subscription_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_Subscription_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_Subscription_TagsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_RetryPolicy_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -324,6 +332,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_CreateSnapshotRequest_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_CreateSnapshotRequest_TagsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -385,7 +397,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\034pubsub.googleapis.com/Schema\0221\n" + "\010encoding\030\002 \001(\0162\032.google.pubsub.v1.EncodingB\003\340A\001\022\036\n" + "\021first_revision_id\030\003 \001(\tB\003\340A\001\022\035\n" - + "\020last_revision_id\030\004 \001(\tB\003\340A\001\"\310\027\n" + + "\020last_revision_id\030\004 \001(\tB\003\340A\001\"\350\027\n" + "\033IngestionDataSourceSettings\022T\n" + "\013aws_kinesis\030\001 \001(\01328.google.pubsub.v" + "1.IngestionDataSourceSettings.AwsKinesisB\003\340A\001H\000\022X\n\r" @@ -457,12 +469,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\023NAMESPACE_NOT_FOUND\020\004\022\027\n" + "\023EVENT_HUB_NOT_FOUND\020\005\022\032\n" + "\026SUBSCRIPTION_NOT_FOUND\020\006\022\034\n" - + "\030RESOURCE_GROUP_NOT_FOUND\020\007\032\326\002\n" + + "\030RESOURCE_GROUP_NOT_FOUND\020\007\032\366\002\n" + "\006AwsMsk\022N\n" + "\005state\030\001 \001(\0162:.google.pubsub.v1.In" + "gestionDataSourceSettings.AwsMsk.StateB\003\340A\003\022\030\n" - + "\013cluster_arn\030\002 \001(\tB\003\340A\002\022\022\n" - + "\005topic\030\003 \001(\tB\003\340A\002\022\031\n" + + "\013cluster_arn\030\002 \001(\tB\003\340A\002\0222\n" + + "\005topic\030\003 \001(\tB#\340A\002\372A\035\n" + + "\033pubsub.googleapis.com/Topic\022\031\n" + "\014aws_role_arn\030\004 \001(\tB\003\340A\002\022 \n" + "\023gcp_service_account\030\005 \001(\tB\003\340A\002\"\220\001\n" + "\005State\022\025\n" @@ -473,8 +486,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021CLUSTER_NOT_FOUND\020\004\022\023\n" + "\017TOPIC_NOT_FOUND\020\005\032\266\003\n" + "\016ConfluentCloud\022V\n" - + "\005state\030\001 \001(\0162B.google.pubsub.v1.Ingestion" - + "DataSourceSettings.ConfluentCloud.StateB\003\340A\003\022\035\n" + + "\005state\030\001 " + + "\001(\0162B.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.StateB\003\340A\003\022\035\n" + "\020bootstrap_server\030\002 \001(\tB\003\340A\002\022\027\n\n" + "cluster_id\030\003 \001(\tB\003\340A\002\022\022\n" + "\005topic\030\004 \001(\tB\003\340A\002\022\035\n" @@ -490,28 +503,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017TOPIC_NOT_FOUND\020\006B\010\n" + "\006source\"\277\001\n" + "\024PlatformLogsSettings\022F\n" - + "\010severity\030\001 \001(\0162/.google" - + ".pubsub.v1.PlatformLogsSettings.SeverityB\003\340A\001\"_\n" + + "\010severity\030\001" + + " \001(\0162/.google.pubsub.v1.PlatformLogsSettings.SeverityB\003\340A\001\"_\n" + "\010Severity\022\030\n" + "\024SEVERITY_UNSPECIFIED\020\000\022\014\n" + "\010DISABLED\020\001\022\t\n" + "\005DEBUG\020\002\022\010\n" + "\004INFO\020\003\022\013\n" + "\007WARNING\020\004\022\t\n" - + "\005ERROR\020\005\"\270\027\n" - + "\025IngestionFailureEvent\022\022\n" - + "\005topic\030\001 \001(\tB\003\340A\002\022\032\n\r" + + "\005ERROR\020\005\"\271\030\n" + + "\025IngestionFailureEvent\0222\n" + + "\005topic\030\001 \001(\tB#\340A\002\372A\035\n" + + "\033pubsub.googleapis.com/Topic\022\032\n\r" + "error_message\030\002 \001(\tB\003\340A\002\022a\n" - + "\025cloud_storage_failure\030\003" - + " \001(\0132;.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailureB\003\340A\001H\000\022[\n" - + "\017aws_msk_failure\030\004 \001(\0132;.google.pubsub.v1." - + "IngestionFailureEvent.AwsMskFailureReasonB\003\340A\001H\000\022l\n" - + "\030azure_event_hubs_failure\030\005 \001(\0132C.google.pubsub.v1.IngestionFailureEv" - + "ent.AzureEventHubsFailureReasonB\003\340A\001H\000\022k\n" - + "\027confluent_cloud_failure\030\006 \001(\0132C.google" - + ".pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReasonB\003\340A\001H\000\022c\n" - + "\023aws_kinesis_failure\030\007 \001(\0132?.google.pubsub.v1.Inge" - + "stionFailureEvent.AwsKinesisFailureReasonB\003\340A\001H\000\032\024\n" + + "\025cloud_storage_failure\030\003 \001(\0132;.google" + + ".pubsub.v1.IngestionFailureEvent.CloudStorageFailureB\003\340A\001H\000\022[\n" + + "\017aws_msk_failure\030\004" + + " \001(\0132;.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReasonB\003\340A\001H\000\022l\n" + + "\030azure_event_hubs_failure\030\005 \001(\0132C.google.pubs" + + "ub.v1.IngestionFailureEvent.AzureEventHubsFailureReasonB\003\340A\001H\000\022k\n" + + "\027confluent_cloud_failure\030\006 \001(\0132C.google.pubsub.v1.Inges" + + "tionFailureEvent.ConfluentCloudFailureReasonB\003\340A\001H\000\022c\n" + + "\023aws_kinesis_failure\030\007 \001(\013" + + "2?.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReasonB\003\340A\001H\000\032\024\n" + "\022ApiViolationReason\032\023\n" + "\021AvroFailureReason\032\027\n" + "\025SchemaViolationReason\032$\n" @@ -520,62 +534,63 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006bucket\030\001 \001(\tB\003\340A\001\022\030\n" + "\013object_name\030\002 \001(\tB\003\340A\001\022\036\n" + "\021object_generation\030\003 \001(\003B\003\340A\001\022]\n" - + "\023avro_failure_reason\030\005" - + " \001(\01329.google.pubsub.v1.IngestionFailureEvent.AvroFailureReasonB\003\340A\001H\000\022_\n" - + "\024api_violation_reason\030\006 \001(\0132:.google.pubsub.v" - + "1.IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" - + "\027schema_violation_reason\030\007 \001" - + "(\0132=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" - + "%message_transformation_failure_reason\030\010 \001(\013" - + "2J.google.pubsub.v1.IngestionFailureEven" - + "t.MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + + "\023avro_failure_reason\030\005 \001(\01329.google." + + "pubsub.v1.IngestionFailureEvent.AvroFailureReasonB\003\340A\001H\000\022_\n" + + "\024api_violation_reason\030\006" + + " \001(\0132:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" + + "\027schema_violation_reason\030\007 \001(\0132=.google.pubs" + + "ub.v1.IngestionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" + + "%message_transformation_failure_reason\030\010 \001(\0132J.google.pubsub" + + ".v1.IngestionFailureEvent.MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + "\006reason\032\316\003\n" + "\023AwsMskFailureReason\022\030\n" + "\013cluster_arn\030\001 \001(\tB\003\340A\001\022\030\n" + "\013kafka_topic\030\002 \001(\tB\003\340A\001\022\031\n" + "\014partition_id\030\003 \001(\003B\003\340A\001\022\023\n" + "\006offset\030\004 \001(\003B\003\340A\001\022_\n" - + "\024api_violation_reason\030\005" - + " \001(\0132:.google.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" - + "\027schema_violation_reason\030\006 \001(\0132=.google.pub" - + "sub.v1.IngestionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" - + "%message_transformation_failure_reason\030\007 \001(\0132J.google.pubsu" - + "b.v1.IngestionFailureEvent.MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + + "\024api_violation_reason\030\005 \001(\0132:.google" + + ".pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" + + "\027schema_violation_reason\030\006 \001(\0132=.google.pubsub.v1.Ingestion" + + "FailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" + + "%message_transformation_failure_reason\030\007" + + " \001(\0132J.google.pubsub.v1.IngestionFa" + + "ilureEvent.MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + "\006reason\032\322\003\n" + "\033AzureEventHubsFailureReason\022\026\n" + "\tnamespace\030\001 \001(\tB\003\340A\001\022\026\n" + "\tevent_hub\030\002 \001(\tB\003\340A\001\022\031\n" + "\014partition_id\030\003 \001(\003B\003\340A\001\022\023\n" + "\006offset\030\004 \001(\003B\003\340A\001\022_\n" - + "\024api_violation_reason\030\005 \001(\0132:.g" - + "oogle.pubsub.v1.IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" - + "\027schema_violation_reason\030\006 \001(\0132=.google.pubsub.v1.Inge" - + "stionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" - + "%message_transformation_failure_reason\030\007 \001(\0132J.google.pubsub.v1.Ingest" - + "ionFailureEvent.MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + + "\024api_violation_reason\030\005 \001(\0132:.google.pubsub.v1." + + "IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" + + "\027schema_violation_reason\030\006 \001(\013" + + "2=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" + + "%message_transformation_failure_reason\030\007 \001(\0132J" + + ".google.pubsub.v1.IngestionFailureEvent." + + "MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + "\006reason\032\325\003\n" + "\033ConfluentCloudFailureReason\022\027\n\n" + "cluster_id\030\001 \001(\tB\003\340A\001\022\030\n" + "\013kafka_topic\030\002 \001(\tB\003\340A\001\022\031\n" + "\014partition_id\030\003 \001(\003B\003\340A\001\022\023\n" + "\006offset\030\004 \001(\003B\003\340A\001\022_\n" - + "\024api_violation_reason\030\005 \001(\0132:.google.pu" - + "bsub.v1.IngestionFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" - + "\027schema_violation_reason\030\006 \001(\0132=.google.pubsub.v1.IngestionFai" - + "lureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" - + "%message_transformation_failure_reason\030\007" - + " \001(\0132J.google.pubsub.v1.IngestionFailu" - + "reEvent.MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" - + "\006reason\032\340\002\n" + + "\024api_violation_reason\030\005 \001(\0132:.google.pubsub.v1.Ingestio" + + "nFailureEvent.ApiViolationReasonB\003\340A\001H\000\022e\n" + + "\027schema_violation_reason\030\006 \001(\0132=.googl" + + "e.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" + + "%message_transformation_failure_reason\030\007 \001(\0132J.google." + + "pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + + "\006reason\032\301\003\n" + "\027AwsKinesisFailureReason\022\027\n\n" + "stream_arn\030\001 \001(\tB\003\340A\001\022\032\n\r" + "partition_key\030\002 \001(\tB\003\340A\001\022\034\n" + "\017sequence_number\030\003 \001(\tB\003\340A\001\022e\n" - + "\027schema_violation_reason\030\004 " - + "\001(\0132=.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" - + "%message_transformation_failure_reason\030\005 \001(" - + "\0132J.google.pubsub.v1.IngestionFailureEve" - + "nt.MessageTransformationFailureReasonB\003\340A\001H\000B\010\n" + + "\027schema_violation_reason\030\004 \001(\0132=.google.pub" + + "sub.v1.IngestionFailureEvent.SchemaViolationReasonB\003\340A\001H\000\022\200\001\n" + + "%message_transformation_failure_reason\030\005 \001(\0132J.google.pubsu" + + "b.v1.IngestionFailureEvent.MessageTransformationFailureReasonB\003\340A\001H\000\022_\n" + + "\024api_violation_reason\030\006 \001(\0132:.google.pubsub.v1.In" + + "gestionFailureEvent.ApiViolationReasonB\003\340A\001H\000B\010\n" + "\006reasonB\t\n" + "\007failure\">\n\r" + "JavaScriptUDF\022\032\n\r" @@ -586,13 +601,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132\037.google.pubsub.v1.JavaScriptUDFB\003\340A\001H\000\022\026\n" + "\007enabled\030\003 \001(\010B\005\030\001\340A\001\022\025\n" + "\010disabled\030\004 \001(\010B\003\340A\001B\013\n" - + "\ttransform\"\216\006\n" + + "\ttransform\"\235\007\n" + "\005Topic\022\021\n" + "\004name\030\001 \001(\tB\003\340A\002\0228\n" + "\006labels\030\002 \003(\0132#.google.pubsub.v1.Topic.LabelsEntryB\003\340A\001\022K\n" - + "\026message_storage_policy\030\003 \001(\0132&.goog" - + "le.pubsub.v1.MessageStoragePolicyB\003\340A\001\022\031\n" - + "\014kms_key_name\030\005 \001(\tB\003\340A\001\022>\n" + + "\026message_storage_policy\030\003 \001(\0132&.goo" + + "gle.pubsub.v1.MessageStoragePolicyB\003\340A\001\022?\n" + + "\014kms_key_name\030\005 \001(\tB)\340A\001\372A#\n" + + "!cloudkms.googleapis.com/CryptoKey\022>\n" + "\017schema_settings\030\006 \001(\0132" + " .google.pubsub.v1.SchemaSettingsB\003\340A\001\022\032\n\r" + "satisfies_pzs\030\007 \001(\010B\003\340A\001\022B\n" @@ -602,20 +618,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\036ingestion_data_source_settings\030\n" + " \001(\0132-.google.pubsub.v1.IngestionDataSourceSettingsB\003\340A\001\022C\n" + "\022message_transforms\030\r" - + " \003(\0132\".google.pubsub.v1.MessageTransformB\003\340A\001\032-\n" + + " \003(\0132\".google.pubsub.v1.MessageTransformB\003\340A\001\022:\n" + + "\004tags\030\016 \003(\0132!.google.pubsub.v1.Topic.TagsEntryB" + + "\t\340A\004\340A\005\340A\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\032+\n" + + "\tTagsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"H\n" + "\005State\022\025\n" + "\021STATE_UNSPECIFIED\020\000\022\n\n" + "\006ACTIVE\020\001\022\034\n" + "\030INGESTION_RESOURCE_ERROR\020\002:c\352A`\n" - + "\033pubsub.googleapis.com/Topic\022!projec" - + "ts/{project}/topics/{topic}\022\017_deleted-topic_*\006topics2\005topic\"\200\002\n\r" + + "\033pubsub.googleapis.com/Topic\022!projects/{project}/top" + + "ics/{topic}\022\017_deleted-topic_*\006topics2\005topic\"\200\002\n\r" + "PubsubMessage\022\021\n" + "\004data\030\001 \001(\014B\003\340A\001\022H\n\n" - + "attributes\030\002 \003(\0132/.g" - + "oogle.pubsub.v1.PubsubMessage.AttributesEntryB\003\340A\001\022\022\n\n" + + "attributes\030\002" + + " \003(\0132/.google.pubsub.v1.PubsubMessage.AttributesEntryB\003\340A\001\022\022\n\n" + "message_id\030\003 \001(\t\0220\n" + "\014publish_time\030\004 \001(\0132\032.google.protobuf.Timestamp\022\031\n" + "\014ordering_key\030\005 \001(\tB\003\340A\001\0321\n" @@ -637,8 +658,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021ListTopicsRequest\022D\n" + "\007project\030\001 \001(\tB3\340A\002\372A-\n" + "+cloudresourcemanager.googleapis.com/Project\022\026\n" - + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n" - + "\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\"`\n" + "\022ListTopicsResponse\022,\n" + "\006topics\030\001 \003(\0132\027.google.pubsub.v1.TopicB\003\340A\001\022\034\n" @@ -655,10 +675,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\031ListTopicSnapshotsRequest\0222\n" + "\005topic\030\001 \001(\tB#\340A\002\372A\035\n" + "\033pubsub.googleapis.com/Topic\022\026\n" - + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" - + "page_token\030\003 \001(\tB\003\340A\001\"R\n" - + "\032ListTopicSnapshotsResponse\022\026\n" - + "\tsnapshots\030\001 \003(\tB\003\340A\001\022\034\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n" + + "\n" + + "page_token\030\003 \001(\tB\003\340A\001\"u\n" + + "\032ListTopicSnapshotsResponse\0229\n" + + "\tsnapshots\030\001 \003(\tB&\340A\001\372A \n" + + "\036pubsub.googleapis.com/Snapshot\022\034\n" + "\017next_page_token\030\002 \001(\tB\003\340A\001\"H\n" + "\022DeleteTopicRequest\0222\n" + "\005topic\030\001 \001(\tB#\340A\002\372A\035\n" @@ -666,7 +688,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\031DetachSubscriptionRequest\022@\n" + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + "\"pubsub.googleapis.com/Subscription\"\034\n" - + "\032DetachSubscriptionResponse\"\215\013\n" + + "\032DetachSubscriptionResponse\"\245\014\n" + "\014Subscription\022\021\n" + "\004name\030\001 \001(\tB\003\340A\002\0222\n" + "\005topic\030\002 \001(\tB#\340A\002\372A\035\n" @@ -675,14 +697,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132\034.google.pubsub.v1.PushConfigB\003\340A\001\022>\n" + "\017bigquery_config\030\022 \001(\0132" + " .google.pubsub.v1.BigQueryConfigB\003\340A\001\022G\n" - + "\024cloud_storage_config\030\026 \001(\0132" - + "$.google.pubsub.v1.CloudStorageConfigB\003\340A\001\022!\n" + + "\024cloud_storage_config\030\026" + + " \001(\0132$.google.pubsub.v1.CloudStorageConfigB\003\340A\001\022!\n" + "\024ack_deadline_seconds\030\005 \001(\005B\003\340A\001\022\"\n" + "\025retain_acked_messages\030\007 \001(\010B\003\340A\001\022B\n" + "\032message_retention_duration\030\010" + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\022?\n" - + "\006labels\030\t \003(\0132*." - + "google.pubsub.v1.Subscription.LabelsEntryB\003\340A\001\022$\n" + + "\006labels\030\t" + + " \003(\0132*.google.pubsub.v1.Subscription.LabelsEntryB\003\340A\001\022$\n" + "\027enable_message_ordering\030\n" + " \001(\010B\003\340A\001\022B\n" + "\021expiration_policy\030\013" @@ -690,36 +712,43 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006filter\030\014 \001(\tB\003\340A\001\022C\n" + "\022dead_letter_policy\030\r" + " \001(\0132\".google.pubsub.v1.DeadLetterPolicyB\003\340A\001\0228\n" - + "\014retry_policy\030\016" - + " \001(\0132\035.google.pubsub.v1.RetryPolicyB\003\340A\001\022\025\n" + + "\014retry_policy\030\016 " + + "\001(\0132\035.google.pubsub.v1.RetryPolicyB\003\340A\001\022\025\n" + "\010detached\030\017 \001(\010B\003\340A\001\022)\n" + "\034enable_exactly_once_delivery\030\020 \001(\010B\003\340A\001\022H\n" + " topic_message_retention_duration\030\021" + " \001(\0132\031.google.protobuf.DurationB\003\340A\003\0228\n" + "\005state\030\023 \001(\0162$.google.pubsub.v1.Subscription.StateB\003\340A\003\022i\n" - + "\037analytics_hub_subscription_info\030\027 \001(\0132;.google.pubsub.v1.S" - + "ubscription.AnalyticsHubSubscriptionInfoB\003\340A\003\022C\n" + + "\037analytics_hub_subscription_info\030\027 \001(\0132;" + + ".google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfoB\003\340A\003\022C\n" + "\022message_transforms\030\031" - + " \003(\0132\".google.pubsub.v1.MessageTransformB\003\340A\001\032O\n" - + "\034AnalyticsHubSubscriptionInfo\022\024\n" - + "\007listing\030\001 \001(\tB\003\340A\001\022\031\n" + + " \003(\0132\".google.pubsub.v1.MessageTransformB\003\340A\001\022A\n" + + "\004tags\030\032 \003(\0132(.google.pubsub.v1.Subscription.TagsEntryB" + + "\t\340A\004\340A\005\340A\001\032w\n" + + "\034AnalyticsHubSubscriptionInfo\022<\n" + + "\007listing\030\001 \001(\tB+\340A\001\372A%\n" + + "#analyticshub.googleapis.com/Listing\022\031\n" + "\014subscription\030\002 \001(\tB\003\340A\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\032+\n" + + "\tTagsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\">\n" + "\005State\022\025\n" + "\021STATE_UNSPECIFIED\020\000\022\n\n" + "\006ACTIVE\020\001\022\022\n" + "\016RESOURCE_ERROR\020\002:u\352Ar\n" - + "\"pubsub." - + "googleapis.com/Subscription\022/projects/{project}/subscriptions/{subscription}*\r" + + "\"pubsub.googleapis.com/Subscription\022/" + + "projects/{project}/subscriptions/{subscription}*\r" + "subscriptions2\014subscription\"\177\n" + "\013RetryPolicy\0227\n" + "\017minimum_backoff\030\001" + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\0227\n" - + "\017maximum_backoff\030\002 \001(\0132\031.google.protobuf.DurationB\003\340A\001\"V\n" - + "\020DeadLetterPolicy\022\036\n" - + "\021dead_letter_topic\030\001 \001(\tB\003\340A\001\022\"\n" + + "\017maximum_backoff\030\002 \001(\0132\031.google.protobuf.DurationB\003\340A\001\"v\n" + + "\020DeadLetterPolicy\022>\n" + + "\021dead_letter_topic\030\001 \001(\tB#\340A\001\372A\035\n" + + "\033pubsub.googleapis.com/Topic\022\"\n" + "\025max_delivery_attempts\030\002 \001(\005B\003\340A\001\"?\n" + "\020ExpirationPolicy\022+\n" + "\003ttl\030\001 \001(\0132\031.google.protobuf.DurationB\003\340A\001\"\232\004\n\n" @@ -727,10 +756,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "push_endpoint\030\001 \001(\tB\003\340A\001\022E\n\n" + "attributes\030\002" + " \003(\0132,.google.pubsub.v1.PushConfig.AttributesEntryB\003\340A\001\022A\n\n" - + "oidc_token\030\003 \001(" - + "\0132&.google.pubsub.v1.PushConfig.OidcTokenB\003\340A\001H\000\022I\n" - + "\016pubsub_wrapper\030\004 \001(\0132*.googl" - + "e.pubsub.v1.PushConfig.PubsubWrapperB\003\340A\001H\001\022A\n\n" + + "oidc_token\030\003" + + " \001(\0132&.google.pubsub.v1.PushConfig.OidcTokenB\003\340A\001H\000\022I\n" + + "\016pubsub_wrapper\030\004 \001(\0132*.go" + + "ogle.pubsub.v1.PushConfig.PubsubWrapperB\003\340A\001H\001\022A\n\n" + "no_wrapper\030\005" + " \001(\0132&.google.pubsub.v1.PushConfig.NoWrapperB\003\340A\001H\001\032F\n" + "\tOidcToken\022\"\n" @@ -749,8 +778,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020use_topic_schema\030\002 \001(\010B\003\340A\001\022\033\n" + "\016write_metadata\030\003 \001(\010B\003\340A\001\022 \n" + "\023drop_unknown_fields\030\004 \001(\010B\003\340A\001\022:\n" - + "\005state\030\005 \001(\0162&.g" - + "oogle.pubsub.v1.BigQueryConfig.StateB\003\340A\003\022\035\n" + + "\005state\030\005 \001(\0162" + + "&.google.pubsub.v1.BigQueryConfig.StateB\003\340A\003\022\035\n" + "\020use_table_schema\030\006 \001(\010B\003\340A\001\022\"\n" + "\025service_account_email\030\007 \001(\tB\003\340A\001\"\212\001\n" + "\005State\022\025\n" @@ -774,8 +803,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\022\026\n" + "\tmax_bytes\030\007 \001(\003B\003\340A\001\022\031\n" + "\014max_messages\030\010 \001(\003B\003\340A\001\022>\n" - + "\005state\030\t" - + " \001(\0162*.google.pubsub.v1.CloudStorageConfig.StateB\003\340A\003\022\"\n" + + "\005state\030\t \001(\0162*.google.p" + + "ubsub.v1.CloudStorageConfig.StateB\003\340A\003\022\"\n" + "\025service_account_email\030\013 \001(\tB\003\340A\001\032\014\n\n" + "TextConfig\032H\n\n" + "AvroConfig\022\033\n" @@ -808,8 +837,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\"u\n" + "\031ListSubscriptionsResponse\022:\n\r" - + "subscriptions\030\001" - + " \003(\0132\036.google.pubsub.v1.SubscriptionB\003\340A\001\022\034\n" + + "subscriptions\030\001 \003(" + + "\0132\036.google.pubsub.v1.SubscriptionB\003\340A\001\022\034\n" + "\017next_page_token\030\002 \001(\tB\003\340A\001\"]\n" + "\031DeleteSubscriptionRequest\022@\n" + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n" @@ -851,12 +880,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\025StreamingPullResponse\022A\n" + "\021received_messages\030\001" + " \003(\0132!.google.pubsub.v1.ReceivedMessageB\003\340A\001\022f\n" - + "\030acknowledge_confirmation\030\005" - + " \001(\0132?.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationB\003\340A\001\022t\n" - + " modify_ack_deadline_confirmation\030\003 \001(\0132" - + "E.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationB\003\340A\001\022d\n" - + "\027subscription_properties\030\004 \001(\0132>.google.pu" - + "bsub.v1.StreamingPullResponse.SubscriptionPropertiesB\003\340A\001\032\224\001\n" + + "\030acknowledge_confirmation\030\005 \001(\0132?.google.pubsub.v1.StreamingP" + + "ullResponse.AcknowledgeConfirmationB\003\340A\001\022t\n" + + " modify_ack_deadline_confirmation\030\003 \001" + + "(\0132E.google.pubsub.v1.StreamingPullRespo" + + "nse.ModifyAckDeadlineConfirmationB\003\340A\001\022d\n" + + "\027subscription_properties\030\004 \001(\0132>.google" + + ".pubsub.v1.StreamingPullResponse.SubscriptionPropertiesB\003\340A\001\032\224\001\n" + "\027AcknowledgeConfirmation\022\024\n" + "\007ack_ids\030\001 \003(\tB\003\340A\001\022\034\n" + "\017invalid_ack_ids\030\002 \003(\tB\003\340A\001\022\036\n" @@ -868,16 +898,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030temporary_failed_ack_ids\030\003 \003(\tB\003\340A\001\032k\n" + "\026SubscriptionProperties\022*\n" + "\035exactly_once_delivery_enabled\030\001 \001(\010B\003\340A\001\022%\n" - + "\030message_ordering_enabled\030\002 \001(\010B\003\340A\001\"\210\002\n" + + "\030message_ordering_enabled\030\002 \001(\010B\003\340A\001\"\201\003\n" + "\025CreateSnapshotRequest\0224\n" + "\004name\030\001 \001(\tB&\340A\002\372A \n" + "\036pubsub.googleapis.com/Snapshot\022@\n" + "\014subscription\030\002 \001(\tB*\340A\002\372A$\n" + "\"pubsub.googleapis.com/Subscription\022H\n" - + "\006labels\030\003 " - + "\003(\01323.google.pubsub.v1.CreateSnapshotRequest.LabelsEntryB\003\340A\001\032-\n" + + "\006labels\030\003 \003(\01323.google.pubsub.v1.CreateSnapshot", + "Request.LabelsEntryB\003\340A\001\022J\n" + + "\004tags\030\004 \003(\01321.google.pubsub.v1.CreateSnapshotRequest.TagsEntryB" + + "\t\340A\004\340A\005\340A\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\032+\n" + + "\tTagsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"\200\001\n" + "\025UpdateSnapshotRequest\0221\n" + "\010snapshot\030\001 \001(\0132\032.google.pubsub.v1.SnapshotB\003\340A\002\0224\n" @@ -888,139 +923,127 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005topic\030\002 \001(\tB#\340A\001\372A\035\n" + "\033pubsub.googleapis.com/Topic\0224\n" + "\013expire_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\001\022;\n" - + "\006labels\030\004 \003(\0132&.goog" - + "le.pubsub.v1.Snapshot.LabelsEntryB\003\340A\001\032-\n" + + "\006labels\030\004 \003(\0132&." + + "google.pubsub.v1.Snapshot.LabelsEntryB\003\340A\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:a\352A^\n" - + "\036pubsub.googleapis.com/Snapshot\022\'projects/{project}/snapshots/{snapsh", - "ot}*\tsnapshots2\010snapshot\"N\n\022GetSnapshotR" - + "equest\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub" - + ".googleapis.com/Snapshot\"\215\001\n\024ListSnapsho" - + "tsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+clou" - + "dresourcemanager.googleapis.com/Project\022" - + "\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 " - + "\001(\tB\003\340A\001\"i\n\025ListSnapshotsResponse\0222\n\tsna" - + "pshots\030\001 \003(\0132\032.google.pubsub.v1.Snapshot" - + "B\003\340A\001\022\034\n\017next_page_token\030\002 \001(\tB\003\340A\001\"Q\n\025D" - + "eleteSnapshotRequest\0228\n\010snapshot\030\001 \001(\tB&" - + "\340A\002\372A \n\036pubsub.googleapis.com/Snapshot\"\306" - + "\001\n\013SeekRequest\022@\n\014subscription\030\001 \001(\tB*\340A" - + "\002\372A$\n\"pubsub.googleapis.com/Subscription" - + "\022/\n\004time\030\002 \001(\0132\032.google.protobuf.Timesta" - + "mpB\003\340A\001H\000\022:\n\010snapshot\030\003 \001(\tB&\340A\001\372A \n\036pub" - + "sub.googleapis.com/SnapshotH\000B\010\n\006target\"" - + "\016\n\014SeekResponse2\270\013\n\tPublisher\022q\n\013CreateT" - + "opic\022\027.google.pubsub.v1.Topic\032\027.google.p" - + "ubsub.v1.Topic\"0\332A\004name\202\323\344\223\002#\032\036/v1/{name" - + "=projects/*/topics/*}:\001*\022\221\001\n\013UpdateTopic" - + "\022$.google.pubsub.v1.UpdateTopicRequest\032\027" - + ".google.pubsub.v1.Topic\"C\332A\021topic,update" - + "_mask\202\323\344\223\002)2$/v1/{topic.name=projects/*/" - + "topics/*}:\001*\022\223\001\n\007Publish\022 .google.pubsub" - + ".v1.PublishRequest\032!.google.pubsub.v1.Pu" - + "blishResponse\"C\332A\016topic,messages\202\323\344\223\002,\"\'" - + "/v1/{topic=projects/*/topics/*}:publish:" - + "\001*\022w\n\010GetTopic\022!.google.pubsub.v1.GetTop" - + "icRequest\032\027.google.pubsub.v1.Topic\"/\332A\005t" - + "opic\202\323\344\223\002!\022\037/v1/{topic=projects/*/topics" - + "/*}\022\212\001\n\nListTopics\022#.google.pubsub.v1.Li" - + "stTopicsRequest\032$.google.pubsub.v1.ListT" - + "opicsResponse\"1\332A\007project\202\323\344\223\002!\022\037/v1/{pr" - + "oject=projects/*}/topics\022\272\001\n\026ListTopicSu" - + "bscriptions\022/.google.pubsub.v1.ListTopic" - + "SubscriptionsRequest\0320.google.pubsub.v1." - + "ListTopicSubscriptionsResponse\"=\332A\005topic" - + "\202\323\344\223\002/\022-/v1/{topic=projects/*/topics/*}/" - + "subscriptions\022\252\001\n\022ListTopicSnapshots\022+.g" - + "oogle.pubsub.v1.ListTopicSnapshotsReques" - + "t\032,.google.pubsub.v1.ListTopicSnapshotsR" - + "esponse\"9\332A\005topic\202\323\344\223\002+\022)/v1/{topic=proj" - + "ects/*/topics/*}/snapshots\022|\n\013DeleteTopi" - + "c\022$.google.pubsub.v1.DeleteTopicRequest\032" - + "\026.google.protobuf.Empty\"/\332A\005topic\202\323\344\223\002!*" - + "\037/v1/{topic=projects/*/topics/*}\022\255\001\n\022Det" - + "achSubscription\022+.google.pubsub.v1.Detac" - + "hSubscriptionRequest\032,.google.pubsub.v1." - + "DetachSubscriptionResponse\"<\202\323\344\223\0026\"4/v1/" - + "{subscription=projects/*/subscriptions/*" - + "}:detach\032p\312A\025pubsub.googleapis.com\322AUhtt" - + "ps://www.googleapis.com/auth/cloud-platf" - + "orm,https://www.googleapis.com/auth/pubs" - + "ub2\322\025\n\nSubscriber\022\264\001\n\022CreateSubscription" - + "\022\036.google.pubsub.v1.Subscription\032\036.googl" - + "e.pubsub.v1.Subscription\"^\332A+name,topic," - + "push_config,ack_deadline_seconds\202\323\344\223\002*\032%" - + "/v1/{name=projects/*/subscriptions/*}:\001*" - + "\022\241\001\n\017GetSubscription\022(.google.pubsub.v1." - + "GetSubscriptionRequest\032\036.google.pubsub.v" - + "1.Subscription\"D\332A\014subscription\202\323\344\223\002/\022-/" - + "v1/{subscription=projects/*/subscription" - + "s/*}\022\273\001\n\022UpdateSubscription\022+.google.pub" - + "sub.v1.UpdateSubscriptionRequest\032\036.googl" - + "e.pubsub.v1.Subscription\"X\332A\030subscriptio" - + "n,update_mask\202\323\344\223\002722/v1/{subscription.n" - + "ame=projects/*/subscriptions/*}:\001*\022\246\001\n\021L" - + "istSubscriptions\022*.google.pubsub.v1.List" - + "SubscriptionsRequest\032+.google.pubsub.v1." - + "ListSubscriptionsResponse\"8\332A\007project\202\323\344" - + "\223\002(\022&/v1/{project=projects/*}/subscripti" - + "ons\022\237\001\n\022DeleteSubscription\022+.google.pubs" - + "ub.v1.DeleteSubscriptionRequest\032\026.google" - + ".protobuf.Empty\"D\332A\014subscription\202\323\344\223\002/*-" + + "\036pubsub.googleapis.com/Snapshot\022\'projects/{project}/snapshots/{snapshot}*" + + "\tsnapshots2\010snapshot\"N\n" + + "\022GetSnapshotRequest\0228\n" + + "\010snapshot\030\001 \001(\tB&\340A\002\372A \n" + + "\036pubsub.googleapis.com/Snapshot\"\215\001\n" + + "\024ListSnapshotsRequest\022D\n" + + "\007project\030\001 \001(\tB3\340A\002\372A-\n" + + "+cloudresourcemanager.googleapis.com/Project\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"i\n" + + "\025ListSnapshotsResponse\0222\n" + + "\tsnapshots\030\001 \003(\0132\032.google.pubsub.v1.SnapshotB\003\340A\001\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\001\"Q\n" + + "\025DeleteSnapshotRequest\0228\n" + + "\010snapshot\030\001 \001(\tB&\340A\002\372A \n" + + "\036pubsub.googleapis.com/Snapshot\"\306\001\n" + + "\013SeekRequest\022@\n" + + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\022/\n" + + "\004time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\001H\000\022:\n" + + "\010snapshot\030\003 \001(\tB&\340A\001\372A \n" + + "\036pubsub.googleapis.com/SnapshotH\000B\010\n" + + "\006target\"\016\n" + + "\014SeekResponse2\270\013\n" + + "\tPublisher\022q\n" + + "\013CreateTopic\022\027.google.pubsub.v1.Topic\032\027.goog" + + "le.pubsub.v1.Topic\"0\332A\004name\202\323\344\223\002#\032\036/v1/{name=projects/*/topics/*}:\001*\022\221\001\n" + + "\013UpdateTopic\022$.google.pubsub.v1.UpdateTopicReque" + + "st\032\027.google.pubsub.v1.Topic\"C\332A\021topic,up" + + "date_mask\202\323\344\223\002)2$/v1/{topic.name=projects/*/topics/*}:\001*\022\223\001\n" + + "\007Publish\022 .google.pubsub.v1.PublishRequest\032!.google.pubsub.v" + + "1.PublishResponse\"C\332A\016topic,messages\202\323\344\223" + + "\002,\"\'/v1/{topic=projects/*/topics/*}:publish:\001*\022w\n" + + "\010GetTopic\022!.google.pubsub.v1.GetTopicRequest\032\027.google.pubsub.v1.Topic\"/" + + "\332A\005topic\202\323\344\223\002!\022\037/v1/{topic=projects/*/topics/*}\022\212\001\n\n" + + "ListTopics\022#.google.pubsub.v1.ListTopicsRequest\032$.google.pubsub.v1.L" + + "istTopicsResponse\"1\332A\007project\202\323\344\223\002!\022\037/v1/{project=projects/*}/topics\022\272\001\n" + + "\026ListTopicSubscriptions\022/.google.pubsub.v1.ListT" + + "opicSubscriptionsRequest\0320.google.pubsub" + + ".v1.ListTopicSubscriptionsResponse\"=\332A\005t" + + "opic\202\323\344\223\002/\022-/v1/{topic=projects/*/topics/*}/subscriptions\022\252\001\n" + + "\022ListTopicSnapshots\022+.google.pubsub.v1.ListTopicSnapshotsRe" + + "quest\032,.google.pubsub.v1.ListTopicSnapsh" + + "otsResponse\"9\332A\005topic\202\323\344\223\002+\022)/v1/{topic=projects/*/topics/*}/snapshots\022|\n" + + "\013DeleteTopic\022$.google.pubsub.v1.DeleteTopicRequ" + + "est\032\026.google.protobuf.Empty\"/\332A\005topic\202\323\344\223\002!*\037/v1/{topic=projects/*/topics/*}\022\255\001\n" + + "\022DetachSubscription\022+.google.pubsub.v1.D" + + "etachSubscriptionRequest\032,.google.pubsub" + + ".v1.DetachSubscriptionResponse\"<\202\323\344\223\0026\"4" + "/v1/{subscription=projects/*/subscriptio" - + "ns/*}\022\317\001\n\021ModifyAckDeadline\022*.google.pub" - + "sub.v1.ModifyAckDeadlineRequest\032\026.google" - + ".protobuf.Empty\"v\332A)subscription,ack_ids" - + ",ack_deadline_seconds\202\323\344\223\002D\"?/v1/{subscr" - + "iption=projects/*/subscriptions/*}:modif" - + "yAckDeadline:\001*\022\250\001\n\013Acknowledge\022$.google" - + ".pubsub.v1.AcknowledgeRequest\032\026.google.p" - + "rotobuf.Empty\"[\332A\024subscription,ack_ids\202\323" - + "\344\223\002>\"9/v1/{subscription=projects/*/subsc" - + "riptions/*}:acknowledge:\001*\022\320\001\n\004Pull\022\035.go" - + "ogle.pubsub.v1.PullRequest\032\036.google.pubs" - + "ub.v1.PullResponse\"\210\001\332A,subscription,ret" - + "urn_immediately,max_messages\332A\031subscript" - + "ion,max_messages\202\323\344\223\0027\"2/v1/{subscriptio" - + "n=projects/*/subscriptions/*}:pull:\001*\022f\n" - + "\rStreamingPull\022&.google.pubsub.v1.Stream" - + "ingPullRequest\032\'.google.pubsub.v1.Stream" - + "ingPullResponse\"\000(\0010\001\022\273\001\n\020ModifyPushConf" - + "ig\022).google.pubsub.v1.ModifyPushConfigRe" - + "quest\032\026.google.protobuf.Empty\"d\332A\030subscr" - + "iption,push_config\202\323\344\223\002C\">/v1/{subscript" - + "ion=projects/*/subscriptions/*}:modifyPu" - + "shConfig:\001*\022\211\001\n\013GetSnapshot\022$.google.pub" - + "sub.v1.GetSnapshotRequest\032\032.google.pubsu" - + "b.v1.Snapshot\"8\332A\010snapshot\202\323\344\223\002\'\022%/v1/{s" - + "napshot=projects/*/snapshots/*}\022\226\001\n\rList" - + "Snapshots\022&.google.pubsub.v1.ListSnapsho" - + "tsRequest\032\'.google.pubsub.v1.ListSnapsho" - + "tsResponse\"4\332A\007project\202\323\344\223\002$\022\"/v1/{proje" - + "ct=projects/*}/snapshots\022\227\001\n\016CreateSnaps" - + "hot\022\'.google.pubsub.v1.CreateSnapshotReq" - + "uest\032\032.google.pubsub.v1.Snapshot\"@\332A\021nam" - + "e,subscription\202\323\344\223\002&\032!/v1/{name=projects" - + "/*/snapshots/*}:\001*\022\243\001\n\016UpdateSnapshot\022\'." - + "google.pubsub.v1.UpdateSnapshotRequest\032\032" - + ".google.pubsub.v1.Snapshot\"L\332A\024snapshot," - + "update_mask\202\323\344\223\002/2*/v1/{snapshot.name=pr" - + "ojects/*/snapshots/*}:\001*\022\213\001\n\016DeleteSnaps" - + "hot\022\'.google.pubsub.v1.DeleteSnapshotReq" - + "uest\032\026.google.protobuf.Empty\"8\332A\010snapsho" - + "t\202\323\344\223\002\'*%/v1/{snapshot=projects/*/snapsh" - + "ots/*}\022\204\001\n\004Seek\022\035.google.pubsub.v1.SeekR" - + "equest\032\036.google.pubsub.v1.SeekResponse\"=" - + "\202\323\344\223\0027\"2/v1/{subscription=projects/*/sub" - + "scriptions/*}:seek:\001*\032p\312A\025pubsub.googlea" - + "pis.com\322AUhttps://www.googleapis.com/aut" - + "h/cloud-platform,https://www.googleapis." - + "com/auth/pubsubB\252\001\n\024com.google.pubsub.v1" - + "B\013PubsubProtoP\001Z5cloud.google.com/go/pub" - + "sub/v2/apiv1/pubsubpb;pubsubpb\252\002\026Google." - + "Cloud.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V1" - + "\352\002\031Google::Cloud::PubSub::V1b\006proto3" + + "ns/*}:detach\032p\312A\025pubsub.googleapis.com\322A" + + "Uhttps://www.googleapis.com/auth/cloud-p" + + "latform,https://www.googleapis.com/auth/pubsub2\322\025\n\n" + + "Subscriber\022\264\001\n" + + "\022CreateSubscription\022\036.google.pubsub.v1.Subscription\032\036.g" + + "oogle.pubsub.v1.Subscription\"^\332A+name,to" + + "pic,push_config,ack_deadline_seconds\202\323\344\223" + + "\002*\032%/v1/{name=projects/*/subscriptions/*}:\001*\022\241\001\n" + + "\017GetSubscription\022(.google.pubsub.v1.GetSubscriptionRequest\032\036.google.pubs" + + "ub.v1.Subscription\"D\332A\014subscription\202\323\344\223\002" + + "/\022-/v1/{subscription=projects/*/subscriptions/*}\022\273\001\n" + + "\022UpdateSubscription\022+.google.pubsub.v1.UpdateSubscriptionRequest\032\036.g" + + "oogle.pubsub.v1.Subscription\"X\332A\030subscri" + + "ption,update_mask\202\323\344\223\002722/v1/{subscripti" + + "on.name=projects/*/subscriptions/*}:\001*\022\246\001\n" + + "\021ListSubscriptions\022*.google.pubsub.v1." + + "ListSubscriptionsRequest\032+.google.pubsub" + + ".v1.ListSubscriptionsResponse\"8\332A\007projec" + + "t\202\323\344\223\002(\022&/v1/{project=projects/*}/subscriptions\022\237\001\n" + + "\022DeleteSubscription\022+.google.pubsub.v1.DeleteSubscriptionRequest\032\026.go" + + "ogle.protobuf.Empty\"D\332A\014subscription\202\323\344\223" + + "\002/*-/v1/{subscription=projects/*/subscriptions/*}\022\317\001\n" + + "\021ModifyAckDeadline\022*.google.pubsub.v1.ModifyAckDeadlineRequest\032\026.go" + + "ogle.protobuf.Empty\"v\332A)subscription,ack" + + "_ids,ack_deadline_seconds\202\323\344\223\002D\"?/v1/{su" + + "bscription=projects/*/subscriptions/*}:modifyAckDeadline:\001*\022\250\001\n" + + "\013Acknowledge\022$.google.pubsub.v1.AcknowledgeRequest\032\026.goog" + + "le.protobuf.Empty\"[\332A\024subscription,ack_i" + + "ds\202\323\344\223\002>\"9/v1/{subscription=projects/*/subscriptions/*}:acknowledge:\001*\022\320\001\n" + + "\004Pull\022\035.google.pubsub.v1.PullRequest\032\036.google." + + "pubsub.v1.PullResponse\"\210\001\332A,subscription" + + ",return_immediately,max_messages\332A\031subsc" + + "ription,max_messages\202\323\344\223\0027\"2/v1/{subscri" + + "ption=projects/*/subscriptions/*}:pull:\001*\022f\n\r" + + "StreamingPull\022&.google.pubsub.v1.St" + + "reamingPullRequest\032\'.google.pubsub.v1.StreamingPullResponse\"\000(\0010\001\022\273\001\n" + + "\020ModifyPushConfig\022).google.pubsub.v1.ModifyPushConf" + + "igRequest\032\026.google.protobuf.Empty\"d\332A\030su" + + "bscription,push_config\202\323\344\223\002C\">/v1/{subsc" + + "ription=projects/*/subscriptions/*}:modifyPushConfig:\001*\022\211\001\n" + + "\013GetSnapshot\022$.google.pubsub.v1.GetSnapshotRequest\032\032.google.p" + + "ubsub.v1.Snapshot\"8\332A\010snapshot\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/snapshots/*}\022\226\001\n\r" + + "ListSnapshots\022&.google.pubsub.v1.ListSna" + + "pshotsRequest\032\'.google.pubsub.v1.ListSna" + + "pshotsResponse\"4\332A\007project\202\323\344\223\002$\022\"/v1/{project=projects/*}/snapshots\022\227\001\n" + + "\016CreateSnapshot\022\'.google.pubsub.v1.CreateSnapsho" + + "tRequest\032\032.google.pubsub.v1.Snapshot\"@\332A" + + "\021name,subscription\202\323\344\223\002&\032!/v1/{name=projects/*/snapshots/*}:\001*\022\243\001\n" + + "\016UpdateSnapshot\022\'.google.pubsub.v1.UpdateSnapshotReque" + + "st\032\032.google.pubsub.v1.Snapshot\"L\332A\024snaps" + + "hot,update_mask\202\323\344\223\002/2*/v1/{snapshot.name=projects/*/snapshots/*}:\001*\022\213\001\n" + + "\016DeleteSnapshot\022\'.google.pubsub.v1.DeleteSnapsho" + + "tRequest\032\026.google.protobuf.Empty\"8\332A\010sna" + + "pshot\202\323\344\223\002\'*%/v1/{snapshot=projects/*/snapshots/*}\022\204\001\n" + + "\004Seek\022\035.google.pubsub.v1.SeekRequest\032\036.google.pubsub.v1.SeekRespon" + + "se\"=\202\323\344\223\0027\"2/v1/{subscription=projects/*" + + "/subscriptions/*}:seek:\001*\032p\312A\025pubsub.goo" + + "gleapis.com\322AUhttps://www.googleapis.com" + + "/auth/cloud-platform,https://www.googleapis.com/auth/pubsubB\247\003\n" + + "\024com.google.pubsub.v1B\013PubsubProtoP\001Z5cloud.google.com/go" + + "/pubsub/v2/apiv1/pubsubpb;pubsubpb\252\002\026Goo" + + "gle.Cloud.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V1\352\002\031Google::Cloud::PubSub::V1\352Ax\n" + + "!cloudkms.googleapis.com/CryptoKey\022Sprojects" + + "/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\352A\177\n" + + "#analyticshub.googleapis.com/Listing\022Xprojects/{project}/locations/{location}/dat" + + "aExchanges/{data_exchange}/listings/{listing}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1279,6 +1302,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SequenceNumber", "SchemaViolationReason", "MessageTransformationFailureReason", + "ApiViolationReason", "Reason", }); internal_static_google_pubsub_v1_JavaScriptUDF_descriptor = @@ -1312,6 +1336,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "State", "IngestionDataSourceSettings", "MessageTransforms", + "Tags", }); internal_static_google_pubsub_v1_Topic_LabelsEntry_descriptor = internal_static_google_pubsub_v1_Topic_descriptor.getNestedTypes().get(0); @@ -1321,6 +1346,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_pubsub_v1_Topic_TagsEntry_descriptor = + internal_static_google_pubsub_v1_Topic_descriptor.getNestedTypes().get(1); + internal_static_google_pubsub_v1_Topic_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_Topic_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_pubsub_v1_PubsubMessage_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_google_pubsub_v1_PubsubMessage_fieldAccessorTable = @@ -1465,6 +1498,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "State", "AnalyticsHubSubscriptionInfo", "MessageTransforms", + "Tags", }); internal_static_google_pubsub_v1_Subscription_AnalyticsHubSubscriptionInfo_descriptor = internal_static_google_pubsub_v1_Subscription_descriptor.getNestedTypes().get(0); @@ -1482,6 +1516,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_pubsub_v1_Subscription_TagsEntry_descriptor = + internal_static_google_pubsub_v1_Subscription_descriptor.getNestedTypes().get(2); + internal_static_google_pubsub_v1_Subscription_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_Subscription_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_pubsub_v1_RetryPolicy_descriptor = getDescriptor().getMessageTypes().get(23); internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable = @@ -1742,7 +1784,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor, new java.lang.String[] { - "Name", "Subscription", "Labels", + "Name", "Subscription", "Labels", "Tags", }); internal_static_google_pubsub_v1_CreateSnapshotRequest_LabelsEntry_descriptor = internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor.getNestedTypes().get(0); @@ -1752,6 +1794,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_pubsub_v1_CreateSnapshotRequest_TagsEntry_descriptor = + internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor.getNestedTypes().get(1); + internal_static_google_pubsub_v1_CreateSnapshotRequest_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_CreateSnapshotRequest_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor = getDescriptor().getMessageTypes().get(43); internal_static_google_pubsub_v1_UpdateSnapshotRequest_fieldAccessorTable = @@ -1829,6 +1879,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java index 330b0ece6..c6dbf3f12 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequest.java @@ -141,7 +141,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1983 + * google/pubsub/v1/pubsub.proto;l=2039 * @return The returnImmediately. */ @java.lang.Override @@ -700,7 +700,7 @@ public Builder setSubscriptionBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1983 + * google/pubsub/v1/pubsub.proto;l=2039 * @return The returnImmediately. */ @java.lang.Override @@ -727,7 +727,7 @@ public boolean getReturnImmediately() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1983 + * google/pubsub/v1/pubsub.proto;l=2039 * @param value The returnImmediately to set. * @return This builder for chaining. */ @@ -758,7 +758,7 @@ public Builder setReturnImmediately(boolean value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1983 + * google/pubsub/v1/pubsub.proto;l=2039 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java index 4f1cb824e..15b70709e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java @@ -73,7 +73,7 @@ public interface PullRequestOrBuilder * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1983 + * google/pubsub/v1/pubsub.proto;l=2039 * @return The returnImmediately. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java index 677345113..bf36bc06f 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java @@ -4214,7 +4214,7 @@ public com.google.protobuf.Parser getParserForType() { * * *
-   * Optional. Received Pub/Sub messages. This will not be empty.
+   * Optional. Received Pub/Sub messages.
    * 
* * @@ -4230,7 +4230,7 @@ public java.util.List getReceivedMessagesL * * *
-   * Optional. Received Pub/Sub messages. This will not be empty.
+   * Optional. Received Pub/Sub messages.
    * 
* * @@ -4247,7 +4247,7 @@ public java.util.List getReceivedMessagesL * * *
-   * Optional. Received Pub/Sub messages. This will not be empty.
+   * Optional. Received Pub/Sub messages.
    * 
* * @@ -4263,7 +4263,7 @@ public int getReceivedMessagesCount() { * * *
-   * Optional. Received Pub/Sub messages. This will not be empty.
+   * Optional. Received Pub/Sub messages.
    * 
* * @@ -4279,7 +4279,7 @@ public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { * * *
-   * Optional. Received Pub/Sub messages. This will not be empty.
+   * Optional. Received Pub/Sub messages.
    * 
* * @@ -5023,7 +5023,7 @@ private void ensureReceivedMessagesIsMutable() { * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5042,7 +5042,7 @@ public java.util.List getReceivedMessagesL * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5061,7 +5061,7 @@ public int getReceivedMessagesCount() { * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5080,7 +5080,7 @@ public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5105,7 +5105,7 @@ public Builder setReceivedMessages(int index, com.google.pubsub.v1.ReceivedMessa * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5128,7 +5128,7 @@ public Builder setReceivedMessages( * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5153,7 +5153,7 @@ public Builder addReceivedMessages(com.google.pubsub.v1.ReceivedMessage value) { * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5178,7 +5178,7 @@ public Builder addReceivedMessages(int index, com.google.pubsub.v1.ReceivedMessa * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5201,7 +5201,7 @@ public Builder addReceivedMessages( * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5224,7 +5224,7 @@ public Builder addReceivedMessages( * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5247,7 +5247,7 @@ public Builder addAllReceivedMessages( * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5269,7 +5269,7 @@ public Builder clearReceivedMessages() { * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5291,7 +5291,7 @@ public Builder removeReceivedMessages(int index) { * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5306,7 +5306,7 @@ public com.google.pubsub.v1.ReceivedMessage.Builder getReceivedMessagesBuilder(i * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5325,7 +5325,7 @@ public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilde * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5345,7 +5345,7 @@ public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilde * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5361,7 +5361,7 @@ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder() * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * @@ -5377,7 +5377,7 @@ public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder(i * * *
-     * Optional. Received Pub/Sub messages. This will not be empty.
+     * Optional. Received Pub/Sub messages.
      * 
* * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java index 1a6fedfa8..516c56f47 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java @@ -28,7 +28,7 @@ public interface StreamingPullResponseOrBuilder * * *
-   * Optional. Received Pub/Sub messages. This will not be empty.
+   * Optional. Received Pub/Sub messages.
    * 
* * @@ -41,7 +41,7 @@ public interface StreamingPullResponseOrBuilder * * *
-   * Optional. Received Pub/Sub messages. This will not be empty.
+   * Optional. Received Pub/Sub messages.
    * 
* * @@ -54,7 +54,7 @@ public interface StreamingPullResponseOrBuilder * * *
-   * Optional. Received Pub/Sub messages. This will not be empty.
+   * Optional. Received Pub/Sub messages.
    * 
* * @@ -67,7 +67,7 @@ public interface StreamingPullResponseOrBuilder * * *
-   * Optional. Received Pub/Sub messages. This will not be empty.
+   * Optional. Received Pub/Sub messages.
    * 
* * @@ -81,7 +81,7 @@ public interface StreamingPullResponseOrBuilder * * *
-   * Optional. Received Pub/Sub messages. This will not be empty.
+   * Optional. Received Pub/Sub messages.
    * 
* * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java index e70130399..9e637b08e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java @@ -67,6 +67,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 9: return internalGetLabels(); + case 26: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -259,7 +261,9 @@ public interface AnalyticsHubSubscriptionInfoOrBuilder * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" * * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The listing. */ @@ -274,7 +278,9 @@ public interface AnalyticsHubSubscriptionInfoOrBuilder * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" * * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for listing. */ @@ -374,7 +380,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" * * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The listing. */ @@ -400,7 +408,9 @@ public java.lang.String getListing() { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" * * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for listing. */ @@ -862,7 +872,9 @@ public Builder mergeFrom( * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" * * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The listing. */ @@ -887,7 +899,9 @@ public java.lang.String getListing() { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" * * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for listing. */ @@ -912,7 +926,9 @@ public com.google.protobuf.ByteString getListingBytes() { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" * * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The listing to set. * @return This builder for chaining. @@ -936,7 +952,9 @@ public Builder setListing(java.lang.String value) { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" * * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -956,7 +974,9 @@ public Builder clearListing() { * "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" * * - * string listing = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * string listing = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for listing to set. * @return This builder for chaining. @@ -2351,6 +2371,133 @@ public com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuil return messageTransforms_.get(index); } + public static final int TAGS_FIELD_NUMBER = 26; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_Subscription_TagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2424,6 +2571,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < messageTransforms_.size(); i++) { output.writeMessage(25, messageTransforms_.get(i)); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 26); getUnknownFields().writeTo(output); } @@ -2507,6 +2656,16 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, messageTransforms_.get(i)); } + for (java.util.Map.Entry entry : + internalGetTags().getMap().entrySet()) { + com.google.protobuf.MapEntry tags__ = + TagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, tags__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2572,6 +2731,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getMessageTransformsList().equals(other.getMessageTransformsList())) return false; + if (!internalGetTags().equals(other.internalGetTags())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2645,6 +2805,10 @@ public int hashCode() { hash = (37 * hash) + MESSAGE_TRANSFORMS_FIELD_NUMBER; hash = (53 * hash) + getMessageTransformsList().hashCode(); } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2771,6 +2935,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 9: return internalGetLabels(); + case 26: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -2782,6 +2948,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi switch (number) { case 9: return internalGetMutableLabels(); + case 26: + return internalGetMutableTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -2888,6 +3056,7 @@ public Builder clear() { messageTransformsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00080000); + internalGetMutableTags().clear(); return this; } @@ -3020,6 +3189,10 @@ private void buildPartial0(com.google.pubsub.v1.Subscription result) { : analyticsHubSubscriptionInfoBuilder_.build(); to_bitField0_ |= 0x00000100; } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + } result.bitField0_ |= to_bitField0_; } @@ -3157,6 +3330,8 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { } } } + internalGetMutableTags().mergeFrom(other.internalGetTags()); + bitField0_ |= 0x00100000; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3322,6 +3497,15 @@ public Builder mergeFrom( } break; } // case 202 + case 210: + { + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTags().getMutableMap().put(tags__.getKey(), tags__.getValue()); + bitField0_ |= 0x00100000; + break; + } // case 210 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -7065,6 +7249,213 @@ public com.google.pubsub.v1.MessageTransform.Builder addMessageTransformsBuilder return messageTransformsBuilder_; } + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + private com.google.protobuf.MapField + internalGetMutableTags() { + if (tags_ == null) { + tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + } + if (!tags_.isMutable()) { + tags_ = tags_.copy(); + } + bitField0_ |= 0x00100000; + onChanged(); + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTags() { + bitField0_ = (bitField0_ & ~0x00100000); + internalGetMutableTags().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTags().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTags() { + bitField0_ |= 0x00100000; + return internalGetMutableTags().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableTags().getMutableMap().put(key, value); + bitField0_ |= 0x00100000; + return this; + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllTags(java.util.Map values) { + internalGetMutableTags().getMutableMap().putAll(values); + bitField0_ |= 0x00100000; + 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-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java index 40c9a735d..585c95c3e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java @@ -886,4 +886,92 @@ java.lang.String getLabelsOrDefault( *
*/ com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + int getTagsCount(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsTags(java.lang.String key); + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTags(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getTagsMap(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getTagsOrThrow(java.lang.String key); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java index 234faa309..3719e7280 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Topic.java @@ -63,6 +63,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 2: return internalGetLabels(); + case 14: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -495,7 +497,9 @@ public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolic * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKeyName. */ @@ -522,7 +526,9 @@ public java.lang.String getKmsKeyName() { * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKeyName. */ @@ -890,6 +896,133 @@ public com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuil return messageTransforms_.get(index); } + public static final int TAGS_FIELD_NUMBER = 14; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_Topic_TagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -933,6 +1066,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < messageTransforms_.size(); i++) { output.writeMessage(13, messageTransforms_.get(i)); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 14); getUnknownFields().writeTo(output); } @@ -985,6 +1120,16 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, messageTransforms_.get(i)); } + for (java.util.Map.Entry entry : + internalGetTags().getMap().entrySet()) { + com.google.protobuf.MapEntry tags__ = + TagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, tags__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1023,6 +1168,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getMessageTransformsList().equals(other.getMessageTransformsList())) return false; + if (!internalGetTags().equals(other.internalGetTags())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1066,6 +1212,10 @@ public int hashCode() { hash = (37 * hash) + MESSAGE_TRANSFORMS_FIELD_NUMBER; hash = (53 * hash) + getMessageTransformsList().hashCode(); } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1189,6 +1339,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 2: return internalGetLabels(); + case 14: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -1200,6 +1352,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi switch (number) { case 2: return internalGetMutableLabels(); + case 14: + return internalGetMutableTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -1270,6 +1424,7 @@ public Builder clear() { messageTransformsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000200); + internalGetMutableTags().clear(); return this; } @@ -1360,6 +1515,10 @@ private void buildPartial0(com.google.pubsub.v1.Topic result) { : ingestionDataSourceSettingsBuilder_.build(); to_bitField0_ |= 0x00000008; } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + } result.bitField0_ |= to_bitField0_; } @@ -1465,6 +1624,8 @@ public Builder mergeFrom(com.google.pubsub.v1.Topic other) { } } } + internalGetMutableTags().mergeFrom(other.internalGetTags()); + bitField0_ |= 0x00000400; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1567,6 +1728,15 @@ public Builder mergeFrom( } break; } // case 106 + case 114: + { + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTags().getMutableMap().put(tags__.getKey(), tags__.getValue()); + bitField0_ |= 0x00000400; + break; + } // case 114 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2145,7 +2315,9 @@ public com.google.pubsub.v1.MessageStoragePolicyOrBuilder getMessageStoragePolic * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKeyName. */ @@ -2171,7 +2343,9 @@ public java.lang.String getKmsKeyName() { * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKeyName. */ @@ -2197,7 +2371,9 @@ public com.google.protobuf.ByteString getKmsKeyNameBytes() { * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The kmsKeyName to set. * @return This builder for chaining. @@ -2222,7 +2398,9 @@ public Builder setKmsKeyName(java.lang.String value) { * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -2243,7 +2421,9 @@ public Builder clearKmsKeyName() { * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for kmsKeyName to set. * @return This builder for chaining. @@ -3557,6 +3737,213 @@ public com.google.pubsub.v1.MessageTransform.Builder addMessageTransformsBuilder return messageTransformsBuilder_; } + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + private com.google.protobuf.MapField + internalGetMutableTags() { + if (tags_ == null) { + tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + } + if (!tags_.isMutable()) { + tags_ = tags_.copy(); + } + bitField0_ |= 0x00000400; + onChanged(); + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTags() { + bitField0_ = (bitField0_ & ~0x00000400); + internalGetMutableTags().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTags().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTags() { + bitField0_ |= 0x00000400; + return internalGetMutableTags().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableTags().getMutableMap().put(key, value); + bitField0_ |= 0x00000400; + return this; + } + + /** + * + * + *
+     * Optional. Input only. Immutable. Tag keys/values directly bound to this
+     * resource. For example:
+     *   "123/environment": "production",
+     *   "123/costCenter": "marketing"
+     * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllTags(java.util.Map values) { + internalGetMutableTags().getMutableMap().putAll(values); + bitField0_ |= 0x00000400; + 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-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java index 875b6e81a..ea55bec4e 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java @@ -187,7 +187,9 @@ java.lang.String getLabelsOrDefault( * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKeyName. */ @@ -203,7 +205,9 @@ java.lang.String getLabelsOrDefault( * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * string kms_key_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKeyName. */ @@ -475,4 +479,92 @@ java.lang.String getLabelsOrDefault( *
*/ com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + int getTagsCount(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsTags(java.lang.String key); + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTags(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getTagsMap(); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Input only. Immutable. Tag keys/values directly bound to this
+   * resource. For example:
+   *   "123/environment": "production",
+   *   "123/costCenter": "marketing"
+   * 
+ * + * + * map<string, string> tags = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getTagsOrThrow(java.lang.String key); } diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto index 125b907f6..b542351d9 100644 --- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto +++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto @@ -33,6 +33,14 @@ option java_outer_classname = "PubsubProto"; option java_package = "com.google.pubsub.v1"; option php_namespace = "Google\\Cloud\\PubSub\\V1"; option ruby_package = "Google::Cloud::PubSub::V1"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" +}; +option (google.api.resource_definition) = { + type: "analyticshub.googleapis.com/Listing" + pattern: "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" +}; // The service that an application uses to manipulate topics, and to send // messages to a topic. @@ -415,7 +423,10 @@ message IngestionDataSourceSettings { // Required. The name of the topic in the Amazon MSK cluster that Pub/Sub // will import from. - string topic = 3 [(google.api.field_behavior) = REQUIRED]; + string topic = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // Required. AWS role ARN to be used for Federated Identity authentication // with Amazon MSK. Check the Pub/Sub docs for how to set up this role and @@ -712,12 +723,21 @@ message IngestionFailureEvent { // the Pub/Sub message. MessageTransformationFailureReason message_transformation_failure_reason = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The message failed to be published due to an API violation. + // This is only set when the size of the data field of the Kinesis record + // is zero. + ApiViolationReason api_violation_reason = 6 + [(google.api.field_behavior) = OPTIONAL]; } } // Required. Name of the import topic. Format is: // projects/{project_name}/topics/{topic_name}. - string topic = 1 [(google.api.field_behavior) = REQUIRED]; + string topic = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // Required. Error details explaining why ingestion to Pub/Sub has failed. string error_message = 2 [(google.api.field_behavior) = REQUIRED]; @@ -849,7 +869,12 @@ message Topic { // protect access to messages published on this topic. // // The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - string kms_key_name = 5 [(google.api.field_behavior) = OPTIONAL]; + string kms_key_name = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; // Optional. Settings for validating messages published against a schema. SchemaSettings schema_settings = 6 [(google.api.field_behavior) = OPTIONAL]; @@ -881,6 +906,16 @@ message Topic { // Transforms are applied in the order specified. repeated MessageTransform message_transforms = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input only. Immutable. Tag keys/values directly bound to this + // resource. For example: + // "123/environment": "production", + // "123/costCenter": "marketing" + map tags = 14 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; } // A message that is published by publishers and consumed by subscribers. The @@ -1054,7 +1089,10 @@ message ListTopicSnapshotsRequest { // Response for the `ListTopicSnapshots` method. message ListTopicSnapshotsResponse { // Optional. The names of the snapshots that match the request. - repeated string snapshots = 1 [(google.api.field_behavior) = OPTIONAL]; + repeated string snapshots = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" } + ]; // Optional. If not empty, indicates that there may be more snapshots that // match the request; this value should be passed in a new @@ -1348,7 +1386,12 @@ message Subscription { // Optional. The name of the associated Analytics Hub listing resource. // Pattern: // "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}" - string listing = 1 [(google.api.field_behavior) = OPTIONAL]; + string listing = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "analyticshub.googleapis.com/Listing" + } + ]; // Optional. The name of the associated Analytics Hub subscription resource. // Pattern: @@ -1514,6 +1557,16 @@ message Subscription { // subscribers. Transforms are applied in the order specified. repeated MessageTransform message_transforms = 25 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input only. Immutable. Tag keys/values directly bound to this + // resource. For example: + // "123/environment": "production", + // "123/costCenter": "marketing" + map tags = 26 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; } // A policy that specifies how Pub/Sub retries message delivery. @@ -1555,7 +1608,10 @@ message DeadLetterPolicy { // The operation will fail if the topic does not exist. // Users should ensure that there is a subscription attached to this topic // since messages published to a topic with no subscriptions are lost. - string dead_letter_topic = 1 [(google.api.field_behavior) = OPTIONAL]; + string dead_letter_topic = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // Optional. The maximum number of delivery attempts for any message. The // value must be between 5 and 100. @@ -2183,7 +2239,7 @@ message StreamingPullResponse { bool message_ordering_enabled = 2 [(google.api.field_behavior) = OPTIONAL]; } - // Optional. Received Pub/Sub messages. This will not be empty. + // Optional. Received Pub/Sub messages. repeated ReceivedMessage received_messages = 1 [(google.api.field_behavior) = OPTIONAL]; @@ -2234,6 +2290,16 @@ message CreateSnapshotRequest { // Optional. See [Creating and managing // labels](https://cloud.google.com/pubsub/docs/labels). map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input only. Immutable. Tag keys/values directly bound to this + // resource. For example: + // "123/environment": "production", + // "123/costCenter": "marketing" + map tags = 4 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; } // Request for the UpdateSnapshot method.