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 544f5e247..c18683cf6 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 @@ -880,6 +880,7 @@ public final Subscription createSubscription( * .setTopicMessageRetentionDuration(Duration.newBuilder().build()) * .setAnalyticsHubSubscriptionInfo( * Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + * .addAllMessageTransforms(new ArrayList()) * .build(); * Subscription response = subscriptionAdminClient.createSubscription(request); * } @@ -1145,6 +1146,7 @@ public final Subscription createSubscription( * .setTopicMessageRetentionDuration(Duration.newBuilder().build()) * .setAnalyticsHubSubscriptionInfo( * Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + * .addAllMessageTransforms(new ArrayList()) * .build(); * ApiFuture future = * subscriptionAdminClient.createSubscriptionCallable().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 28b77c12b..2e635ba43 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 @@ -516,6 +516,7 @@ public final Topic createTopic(ProjectTopicName name) { * .setSatisfiesPzs(true) * .setMessageRetentionDuration(Duration.newBuilder().build()) * .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + * .addAllMessageTransforms(new ArrayList()) * .build(); * Topic response = topicAdminClient.createTopic(request); * } @@ -552,6 +553,7 @@ public final Topic createTopic(Topic request) { * .setSatisfiesPzs(true) * .setMessageRetentionDuration(Duration.newBuilder().build()) * .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + * .addAllMessageTransforms(new ArrayList()) * .build(); * ApiFuture future = topicAdminClient.createTopicCallable().futureCall(request); * // Do something. diff --git a/google-cloud-pubsub/src/main/resources/META-INF/native-image/com.google.cloud.pubsub.v1/reflect-config.json b/google-cloud-pubsub/src/main/resources/META-INF/native-image/com.google.cloud.pubsub.v1/reflect-config.json index a818e377d..3c5de9478 100644 --- a/google-cloud-pubsub/src/main/resources/META-INF/native-image/com.google.cloud.pubsub.v1/reflect-config.json +++ b/google-cloud-pubsub/src/main/resources/META-INF/native-image/com.google.cloud.pubsub.v1/reflect-config.json @@ -2195,6 +2195,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.pubsub.v1.JavaScriptUDF", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.pubsub.v1.JavaScriptUDF$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.pubsub.v1.ListSchemaRevisionsRequest", "queryAllDeclaredConstructors": true, @@ -2465,6 +2483,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.pubsub.v1.MessageTransform", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.pubsub.v1.MessageTransform$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.pubsub.v1.ModifyAckDeadlineRequest", "queryAllDeclaredConstructors": true, 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 59adc7841..711c8da98 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 @@ -49,6 +49,7 @@ import com.google.pubsub.v1.ExpirationPolicy; import com.google.pubsub.v1.ListSnapshotsResponse; import com.google.pubsub.v1.ListSubscriptionsResponse; +import com.google.pubsub.v1.MessageTransform; import com.google.pubsub.v1.ProjectName; import com.google.pubsub.v1.PullResponse; import com.google.pubsub.v1.PushConfig; @@ -133,6 +134,7 @@ public void createSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -202,6 +204,7 @@ public void createSubscriptionTest2() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -271,6 +274,7 @@ public void createSubscriptionTest3() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -340,6 +344,7 @@ public void createSubscriptionTest4() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -409,6 +414,7 @@ public void getSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -471,6 +477,7 @@ public void getSubscriptionTest2() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -533,6 +540,7 @@ public void updateSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -557,6 +565,7 @@ public void updateSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -607,6 +616,7 @@ public void updateSubscriptionExceptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .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 005b32b9c..6df11d0a0 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 @@ -59,6 +59,7 @@ import com.google.pubsub.v1.ListSnapshotsResponse; import com.google.pubsub.v1.ListSubscriptionsRequest; import com.google.pubsub.v1.ListSubscriptionsResponse; +import com.google.pubsub.v1.MessageTransform; import com.google.pubsub.v1.ModifyAckDeadlineRequest; import com.google.pubsub.v1.ModifyPushConfigRequest; import com.google.pubsub.v1.ProjectName; @@ -159,6 +160,7 @@ public void createSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -225,6 +227,7 @@ public void createSubscriptionTest2() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -291,6 +294,7 @@ public void createSubscriptionTest3() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -357,6 +361,7 @@ public void createSubscriptionTest4() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -423,6 +428,7 @@ public void getSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -479,6 +485,7 @@ public void getSubscriptionTest2() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -535,6 +542,7 @@ public void updateSubscriptionTest() throws Exception { .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .setAnalyticsHubSubscriptionInfo( Subscription.AnalyticsHubSubscriptionInfo.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .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 fd1ac7c90..5a1e1e68a 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 @@ -50,6 +50,7 @@ import com.google.pubsub.v1.ListTopicSubscriptionsResponse; import com.google.pubsub.v1.ListTopicsResponse; import com.google.pubsub.v1.MessageStoragePolicy; +import com.google.pubsub.v1.MessageTransform; import com.google.pubsub.v1.ProjectName; import com.google.pubsub.v1.PublishResponse; import com.google.pubsub.v1.PubsubMessage; @@ -117,6 +118,7 @@ public void createTopicTest() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -168,6 +170,7 @@ public void createTopicTest2() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -219,6 +222,7 @@ public void updateTopicTest() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -232,6 +236,7 @@ public void updateTopicTest() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -271,6 +276,7 @@ public void updateTopicExceptionTest() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateTopic(topic, updateMask); @@ -380,6 +386,7 @@ public void getTopicTest() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -431,6 +438,7 @@ public void getTopicTest2() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .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 775b93750..d1e05afde 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 @@ -53,6 +53,7 @@ import com.google.pubsub.v1.ListTopicsRequest; import com.google.pubsub.v1.ListTopicsResponse; import com.google.pubsub.v1.MessageStoragePolicy; +import com.google.pubsub.v1.MessageTransform; import com.google.pubsub.v1.ProjectName; import com.google.pubsub.v1.PublishRequest; import com.google.pubsub.v1.PublishResponse; @@ -131,6 +132,7 @@ public void createTopicTest() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockPublisher.addResponse(expectedResponse); @@ -176,6 +178,7 @@ public void createTopicTest2() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockPublisher.addResponse(expectedResponse); @@ -221,6 +224,7 @@ public void updateTopicTest() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockPublisher.addResponse(expectedResponse); @@ -347,6 +351,7 @@ public void getTopicTest() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockPublisher.addResponse(expectedResponse); @@ -392,6 +397,7 @@ public void getTopicTest2() throws Exception { .setSatisfiesPzs(true) .setMessageRetentionDuration(Duration.newBuilder().build()) .setIngestionDataSourceSettings(IngestionDataSourceSettings.newBuilder().build()) + .addAllMessageTransforms(new ArrayList()) .build(); mockPublisher.addResponse(expectedResponse); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequest.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequest.java index d92256e6f..3d4db9d4c 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequest.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequest.java @@ -142,7 +142,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The revisionId. */ @java.lang.Override @@ -171,7 +171,7 @@ public java.lang.String getRevisionId() { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The bytes for revisionId. */ @java.lang.Override @@ -699,7 +699,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The revisionId. */ @java.lang.Deprecated @@ -727,7 +727,7 @@ public java.lang.String getRevisionId() { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The bytes for revisionId. */ @java.lang.Deprecated @@ -755,7 +755,7 @@ public com.google.protobuf.ByteString getRevisionIdBytes() { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @param value The revisionId to set. * @return This builder for chaining. */ @@ -782,7 +782,7 @@ public Builder setRevisionId(java.lang.String value) { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return This builder for chaining. */ @java.lang.Deprecated @@ -805,7 +805,7 @@ public Builder clearRevisionId() { * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @param value The bytes for revisionId to set. * @return This builder for chaining. */ diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequestOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequestOrBuilder.java index b5cf5e110..b8d8f0620 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequestOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/DeleteSchemaRevisionRequestOrBuilder.java @@ -72,7 +72,7 @@ public interface DeleteSchemaRevisionRequestOrBuilder * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The revisionId. */ @java.lang.Deprecated @@ -90,7 +90,7 @@ public interface DeleteSchemaRevisionRequestOrBuilder * * * @deprecated google.pubsub.v1.DeleteSchemaRevisionRequest.revision_id is deprecated. See - * google/pubsub/v1/schema.proto;l=331 + * google/pubsub/v1/schema.proto;l=330 * @return The bytes for revisionId. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDF.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDF.java new file mode 100644 index 000000000..923604c8c --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDF.java @@ -0,0 +1,1001 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +// Protobuf Java Version: 3.25.5 +package com.google.pubsub.v1; + +/** + * + * + *
+ * User-defined JavaScript function that can transform or filter a Pub/Sub
+ * message.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.JavaScriptUDF} + */ +public final class JavaScriptUDF extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.JavaScriptUDF) + JavaScriptUDFOrBuilder { + private static final long serialVersionUID = 0L; + // Use JavaScriptUDF.newBuilder() to construct. + private JavaScriptUDF(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private JavaScriptUDF() { + functionName_ = ""; + code_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new JavaScriptUDF(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_JavaScriptUDF_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_JavaScriptUDF_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.JavaScriptUDF.class, + com.google.pubsub.v1.JavaScriptUDF.Builder.class); + } + + public static final int FUNCTION_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object functionName_ = ""; + /** + * + * + *
+   * Required. Name of the JavasScript function that should applied to Pub/Sub
+   * messages.
+   * 
+ * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The functionName. + */ + @java.lang.Override + public java.lang.String getFunctionName() { + java.lang.Object ref = functionName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + functionName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the JavasScript function that should applied to Pub/Sub
+   * messages.
+   * 
+ * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for functionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFunctionNameBytes() { + java.lang.Object ref = functionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + functionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object code_ = ""; + /** + * + * + *
+   * Required. JavaScript code that contains a function `function_name` with the
+   * below signature:
+   *
+   *   /**
+   *   * Transforms a Pub/Sub message.
+   *
+   *   * @return {(Object<string, (string | Object<string, string>)>|null)} - To
+   *   * filter a message, return `null`. To transform a message return a map
+   *   * with the following keys:
+   *   *   - (required) 'data' : {string}
+   *   *   - (optional) 'attributes' : {Object<string, string>}
+   *   * Returning empty `attributes` will remove all attributes from the
+   *   * message.
+   *   *
+   *   * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
+   *   * message. Keys:
+   *   *   - (required) 'data' : {string}
+   *   *   - (required) 'attributes' : {Object<string, string>}
+   *   *
+   *   * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
+   *   * Keys:
+   *   *   - (required) 'message_id'  : {string}
+   *   *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
+   *   *   - (optional) 'ordering_key': {string}
+   *   */
+   *
+   *   function <function_name>(message, metadata) {
+   *   }
+   * 
+ * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The code. + */ + @java.lang.Override + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } + } + /** + * + * + *
+   * Required. JavaScript code that contains a function `function_name` with the
+   * below signature:
+   *
+   *   /**
+   *   * Transforms a Pub/Sub message.
+   *
+   *   * @return {(Object<string, (string | Object<string, string>)>|null)} - To
+   *   * filter a message, return `null`. To transform a message return a map
+   *   * with the following keys:
+   *   *   - (required) 'data' : {string}
+   *   *   - (optional) 'attributes' : {Object<string, string>}
+   *   * Returning empty `attributes` will remove all attributes from the
+   *   * message.
+   *   *
+   *   * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
+   *   * message. Keys:
+   *   *   - (required) 'data' : {string}
+   *   *   - (required) 'attributes' : {Object<string, string>}
+   *   *
+   *   * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
+   *   * Keys:
+   *   *   - (required) 'message_id'  : {string}
+   *   *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
+   *   *   - (optional) 'ordering_key': {string}
+   *   */
+   *
+   *   function <function_name>(message, metadata) {
+   *   }
+   * 
+ * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for code. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(functionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, functionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(code_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, code_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(functionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, functionName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(code_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, code_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.JavaScriptUDF)) { + return super.equals(obj); + } + com.google.pubsub.v1.JavaScriptUDF other = (com.google.pubsub.v1.JavaScriptUDF) obj; + + if (!getFunctionName().equals(other.getFunctionName())) return false; + if (!getCode().equals(other.getCode())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FUNCTION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFunctionName().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.JavaScriptUDF parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.JavaScriptUDF prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * User-defined JavaScript function that can transform or filter a Pub/Sub
+   * message.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.JavaScriptUDF} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.JavaScriptUDF) + com.google.pubsub.v1.JavaScriptUDFOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_JavaScriptUDF_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_JavaScriptUDF_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.JavaScriptUDF.class, + com.google.pubsub.v1.JavaScriptUDF.Builder.class); + } + + // Construct using com.google.pubsub.v1.JavaScriptUDF.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + functionName_ = ""; + code_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_JavaScriptUDF_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF getDefaultInstanceForType() { + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF build() { + com.google.pubsub.v1.JavaScriptUDF result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF buildPartial() { + com.google.pubsub.v1.JavaScriptUDF result = new com.google.pubsub.v1.JavaScriptUDF(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.pubsub.v1.JavaScriptUDF result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.functionName_ = functionName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.code_ = code_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.JavaScriptUDF) { + return mergeFrom((com.google.pubsub.v1.JavaScriptUDF) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.JavaScriptUDF other) { + if (other == com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance()) return this; + if (!other.getFunctionName().isEmpty()) { + functionName_ = other.functionName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCode().isEmpty()) { + code_ = other.code_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + functionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + code_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object functionName_ = ""; + /** + * + * + *
+     * Required. Name of the JavasScript function that should applied to Pub/Sub
+     * messages.
+     * 
+ * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The functionName. + */ + public java.lang.String getFunctionName() { + java.lang.Object ref = functionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + functionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the JavasScript function that should applied to Pub/Sub
+     * messages.
+     * 
+ * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for functionName. + */ + public com.google.protobuf.ByteString getFunctionNameBytes() { + java.lang.Object ref = functionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + functionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the JavasScript function that should applied to Pub/Sub
+     * messages.
+     * 
+ * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The functionName to set. + * @return This builder for chaining. + */ + public Builder setFunctionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + functionName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the JavasScript function that should applied to Pub/Sub
+     * messages.
+     * 
+ * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFunctionName() { + functionName_ = getDefaultInstance().getFunctionName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the JavasScript function that should applied to Pub/Sub
+     * messages.
+     * 
+ * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for functionName to set. + * @return This builder for chaining. + */ + public Builder setFunctionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + functionName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object code_ = ""; + /** + * + * + *
+     * Required. JavaScript code that contains a function `function_name` with the
+     * below signature:
+     *
+     *   /**
+     *   * Transforms a Pub/Sub message.
+     *
+     *   * @return {(Object<string, (string | Object<string, string>)>|null)} - To
+     *   * filter a message, return `null`. To transform a message return a map
+     *   * with the following keys:
+     *   *   - (required) 'data' : {string}
+     *   *   - (optional) 'attributes' : {Object<string, string>}
+     *   * Returning empty `attributes` will remove all attributes from the
+     *   * message.
+     *   *
+     *   * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
+     *   * message. Keys:
+     *   *   - (required) 'data' : {string}
+     *   *   - (required) 'attributes' : {Object<string, string>}
+     *   *
+     *   * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
+     *   * Keys:
+     *   *   - (required) 'message_id'  : {string}
+     *   *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
+     *   *   - (optional) 'ordering_key': {string}
+     *   */
+     *
+     *   function <function_name>(message, metadata) {
+     *   }
+     * 
+ * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The code. + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. JavaScript code that contains a function `function_name` with the
+     * below signature:
+     *
+     *   /**
+     *   * Transforms a Pub/Sub message.
+     *
+     *   * @return {(Object<string, (string | Object<string, string>)>|null)} - To
+     *   * filter a message, return `null`. To transform a message return a map
+     *   * with the following keys:
+     *   *   - (required) 'data' : {string}
+     *   *   - (optional) 'attributes' : {Object<string, string>}
+     *   * Returning empty `attributes` will remove all attributes from the
+     *   * message.
+     *   *
+     *   * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
+     *   * message. Keys:
+     *   *   - (required) 'data' : {string}
+     *   *   - (required) 'attributes' : {Object<string, string>}
+     *   *
+     *   * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
+     *   * Keys:
+     *   *   - (required) 'message_id'  : {string}
+     *   *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
+     *   *   - (optional) 'ordering_key': {string}
+     *   */
+     *
+     *   function <function_name>(message, metadata) {
+     *   }
+     * 
+ * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for code. + */ + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. JavaScript code that contains a function `function_name` with the
+     * below signature:
+     *
+     *   /**
+     *   * Transforms a Pub/Sub message.
+     *
+     *   * @return {(Object<string, (string | Object<string, string>)>|null)} - To
+     *   * filter a message, return `null`. To transform a message return a map
+     *   * with the following keys:
+     *   *   - (required) 'data' : {string}
+     *   *   - (optional) 'attributes' : {Object<string, string>}
+     *   * Returning empty `attributes` will remove all attributes from the
+     *   * message.
+     *   *
+     *   * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
+     *   * message. Keys:
+     *   *   - (required) 'data' : {string}
+     *   *   - (required) 'attributes' : {Object<string, string>}
+     *   *
+     *   * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
+     *   * Keys:
+     *   *   - (required) 'message_id'  : {string}
+     *   *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
+     *   *   - (optional) 'ordering_key': {string}
+     *   */
+     *
+     *   function <function_name>(message, metadata) {
+     *   }
+     * 
+ * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + code_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. JavaScript code that contains a function `function_name` with the
+     * below signature:
+     *
+     *   /**
+     *   * Transforms a Pub/Sub message.
+     *
+     *   * @return {(Object<string, (string | Object<string, string>)>|null)} - To
+     *   * filter a message, return `null`. To transform a message return a map
+     *   * with the following keys:
+     *   *   - (required) 'data' : {string}
+     *   *   - (optional) 'attributes' : {Object<string, string>}
+     *   * Returning empty `attributes` will remove all attributes from the
+     *   * message.
+     *   *
+     *   * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
+     *   * message. Keys:
+     *   *   - (required) 'data' : {string}
+     *   *   - (required) 'attributes' : {Object<string, string>}
+     *   *
+     *   * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
+     *   * Keys:
+     *   *   - (required) 'message_id'  : {string}
+     *   *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
+     *   *   - (optional) 'ordering_key': {string}
+     *   */
+     *
+     *   function <function_name>(message, metadata) {
+     *   }
+     * 
+ * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + code_ = getDefaultInstance().getCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. JavaScript code that contains a function `function_name` with the
+     * below signature:
+     *
+     *   /**
+     *   * Transforms a Pub/Sub message.
+     *
+     *   * @return {(Object<string, (string | Object<string, string>)>|null)} - To
+     *   * filter a message, return `null`. To transform a message return a map
+     *   * with the following keys:
+     *   *   - (required) 'data' : {string}
+     *   *   - (optional) 'attributes' : {Object<string, string>}
+     *   * Returning empty `attributes` will remove all attributes from the
+     *   * message.
+     *   *
+     *   * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
+     *   * message. Keys:
+     *   *   - (required) 'data' : {string}
+     *   *   - (required) 'attributes' : {Object<string, string>}
+     *   *
+     *   * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
+     *   * Keys:
+     *   *   - (required) 'message_id'  : {string}
+     *   *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
+     *   *   - (optional) 'ordering_key': {string}
+     *   */
+     *
+     *   function <function_name>(message, metadata) {
+     *   }
+     * 
+ * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for code to set. + * @return This builder for chaining. + */ + public Builder setCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + code_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.JavaScriptUDF) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.JavaScriptUDF) + private static final com.google.pubsub.v1.JavaScriptUDF DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.JavaScriptUDF(); + } + + public static com.google.pubsub.v1.JavaScriptUDF getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JavaScriptUDF parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDFOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDFOrBuilder.java new file mode 100644 index 000000000..59baf22d5 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/JavaScriptUDFOrBuilder.java @@ -0,0 +1,132 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +// Protobuf Java Version: 3.25.5 +package com.google.pubsub.v1; + +public interface JavaScriptUDFOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.JavaScriptUDF) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the JavasScript function that should applied to Pub/Sub
+   * messages.
+   * 
+ * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The functionName. + */ + java.lang.String getFunctionName(); + /** + * + * + *
+   * Required. Name of the JavasScript function that should applied to Pub/Sub
+   * messages.
+   * 
+ * + * string function_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for functionName. + */ + com.google.protobuf.ByteString getFunctionNameBytes(); + + /** + * + * + *
+   * Required. JavaScript code that contains a function `function_name` with the
+   * below signature:
+   *
+   *   /**
+   *   * Transforms a Pub/Sub message.
+   *
+   *   * @return {(Object<string, (string | Object<string, string>)>|null)} - To
+   *   * filter a message, return `null`. To transform a message return a map
+   *   * with the following keys:
+   *   *   - (required) 'data' : {string}
+   *   *   - (optional) 'attributes' : {Object<string, string>}
+   *   * Returning empty `attributes` will remove all attributes from the
+   *   * message.
+   *   *
+   *   * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
+   *   * message. Keys:
+   *   *   - (required) 'data' : {string}
+   *   *   - (required) 'attributes' : {Object<string, string>}
+   *   *
+   *   * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
+   *   * Keys:
+   *   *   - (required) 'message_id'  : {string}
+   *   *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
+   *   *   - (optional) 'ordering_key': {string}
+   *   */
+   *
+   *   function <function_name>(message, metadata) {
+   *   }
+   * 
+ * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The code. + */ + java.lang.String getCode(); + /** + * + * + *
+   * Required. JavaScript code that contains a function `function_name` with the
+   * below signature:
+   *
+   *   /**
+   *   * Transforms a Pub/Sub message.
+   *
+   *   * @return {(Object<string, (string | Object<string, string>)>|null)} - To
+   *   * filter a message, return `null`. To transform a message return a map
+   *   * with the following keys:
+   *   *   - (required) 'data' : {string}
+   *   *   - (optional) 'attributes' : {Object<string, string>}
+   *   * Returning empty `attributes` will remove all attributes from the
+   *   * message.
+   *   *
+   *   * @param  {(Object<string, (string | Object<string, string>)>} Pub/Sub
+   *   * message. Keys:
+   *   *   - (required) 'data' : {string}
+   *   *   - (required) 'attributes' : {Object<string, string>}
+   *   *
+   *   * @param  {Object<string, any>} metadata - Pub/Sub message metadata.
+   *   * Keys:
+   *   *   - (required) 'message_id'  : {string}
+   *   *   - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format
+   *   *   - (optional) 'ordering_key': {string}
+   *   */
+   *
+   *   function <function_name>(message, metadata) {
+   *   }
+   * 
+ * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for code. + */ + com.google.protobuf.ByteString getCodeBytes(); +} 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 new file mode 100644 index 000000000..3e077acea --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransform.java @@ -0,0 +1,944 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +// Protobuf Java Version: 3.25.5 +package com.google.pubsub.v1; + +/** + * + * + *
+ * All supported message transforms types.
+ * 
+ * + * Protobuf type {@code google.pubsub.v1.MessageTransform} + */ +public final class MessageTransform extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.MessageTransform) + MessageTransformOrBuilder { + private static final long serialVersionUID = 0L; + // Use MessageTransform.newBuilder() to construct. + private MessageTransform(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MessageTransform() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MessageTransform(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_MessageTransform_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_MessageTransform_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.MessageTransform.class, + com.google.pubsub.v1.MessageTransform.Builder.class); + } + + private int transformCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object transform_; + + public enum TransformCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + JAVASCRIPT_UDF(2), + TRANSFORM_NOT_SET(0); + private final int value; + + private TransformCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransformCase valueOf(int value) { + return forNumber(value); + } + + public static TransformCase forNumber(int value) { + switch (value) { + case 2: + return JAVASCRIPT_UDF; + case 0: + return TRANSFORM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TransformCase getTransformCase() { + return TransformCase.forNumber(transformCase_); + } + + public static final int JAVASCRIPT_UDF_FIELD_NUMBER = 2; + /** + * + * + *
+   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+   * are specified on a resource, each must have a unique `function_name`.
+   * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the javascriptUdf field is set. + */ + @java.lang.Override + public boolean hasJavascriptUdf() { + return transformCase_ == 2; + } + /** + * + * + *
+   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+   * are specified on a resource, each must have a unique `function_name`.
+   * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The javascriptUdf. + */ + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF getJavascriptUdf() { + if (transformCase_ == 2) { + return (com.google.pubsub.v1.JavaScriptUDF) transform_; + } + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+   * are specified on a resource, each must have a unique `function_name`.
+   * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDFOrBuilder getJavascriptUdfOrBuilder() { + if (transformCase_ == 2) { + return (com.google.pubsub.v1.JavaScriptUDF) transform_; + } + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + + public static final int ENABLED_FIELD_NUMBER = 3; + private boolean enabled_ = false; + /** + * + * + *
+   * Optional. If set to true, the transform is enabled. If false, the transform
+   * is disabled and will not be applied to messages. Defaults to `true`.
+   * 
+ * + * bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (transformCase_ == 2) { + output.writeMessage(2, (com.google.pubsub.v1.JavaScriptUDF) transform_); + } + if (enabled_ != false) { + output.writeBool(3, enabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transformCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.pubsub.v1.JavaScriptUDF) transform_); + } + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.pubsub.v1.MessageTransform)) { + return super.equals(obj); + } + com.google.pubsub.v1.MessageTransform other = (com.google.pubsub.v1.MessageTransform) obj; + + if (getEnabled() != other.getEnabled()) return false; + if (!getTransformCase().equals(other.getTransformCase())) return false; + switch (transformCase_) { + case 2: + if (!getJavascriptUdf().equals(other.getJavascriptUdf())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + switch (transformCase_) { + case 2: + hash = (37 * hash) + JAVASCRIPT_UDF_FIELD_NUMBER; + hash = (53 * hash) + getJavascriptUdf().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.MessageTransform parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.MessageTransform parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.MessageTransform parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.MessageTransform parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.pubsub.v1.MessageTransform prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * All supported message transforms types.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.MessageTransform} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.MessageTransform) + com.google.pubsub.v1.MessageTransformOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_MessageTransform_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_MessageTransform_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.MessageTransform.class, + com.google.pubsub.v1.MessageTransform.Builder.class); + } + + // Construct using com.google.pubsub.v1.MessageTransform.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (javascriptUdfBuilder_ != null) { + javascriptUdfBuilder_.clear(); + } + enabled_ = false; + transformCase_ = 0; + transform_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_MessageTransform_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.MessageTransform getDefaultInstanceForType() { + return com.google.pubsub.v1.MessageTransform.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.MessageTransform build() { + com.google.pubsub.v1.MessageTransform result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.MessageTransform buildPartial() { + com.google.pubsub.v1.MessageTransform result = + new com.google.pubsub.v1.MessageTransform(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.pubsub.v1.MessageTransform result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enabled_ = enabled_; + } + } + + private void buildPartialOneofs(com.google.pubsub.v1.MessageTransform result) { + result.transformCase_ = transformCase_; + result.transform_ = this.transform_; + if (transformCase_ == 2 && javascriptUdfBuilder_ != null) { + result.transform_ = javascriptUdfBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.MessageTransform) { + return mergeFrom((com.google.pubsub.v1.MessageTransform) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.MessageTransform other) { + if (other == com.google.pubsub.v1.MessageTransform.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + switch (other.getTransformCase()) { + case JAVASCRIPT_UDF: + { + mergeJavascriptUdf(other.getJavascriptUdf()); + break; + } + case TRANSFORM_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(getJavascriptUdfFieldBuilder().getBuilder(), extensionRegistry); + transformCase_ = 2; + break; + } // case 18 + case 24: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int transformCase_ = 0; + private java.lang.Object transform_; + + public TransformCase getTransformCase() { + return TransformCase.forNumber(transformCase_); + } + + public Builder clearTransform() { + transformCase_ = 0; + transform_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.JavaScriptUDF, + com.google.pubsub.v1.JavaScriptUDF.Builder, + com.google.pubsub.v1.JavaScriptUDFOrBuilder> + javascriptUdfBuilder_; + /** + * + * + *
+     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+     * are specified on a resource, each must have a unique `function_name`.
+     * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the javascriptUdf field is set. + */ + @java.lang.Override + public boolean hasJavascriptUdf() { + return transformCase_ == 2; + } + /** + * + * + *
+     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+     * are specified on a resource, each must have a unique `function_name`.
+     * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The javascriptUdf. + */ + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDF getJavascriptUdf() { + if (javascriptUdfBuilder_ == null) { + if (transformCase_ == 2) { + return (com.google.pubsub.v1.JavaScriptUDF) transform_; + } + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } else { + if (transformCase_ == 2) { + return javascriptUdfBuilder_.getMessage(); + } + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+     * are specified on a resource, each must have a unique `function_name`.
+     * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setJavascriptUdf(com.google.pubsub.v1.JavaScriptUDF value) { + if (javascriptUdfBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transform_ = value; + onChanged(); + } else { + javascriptUdfBuilder_.setMessage(value); + } + transformCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+     * are specified on a resource, each must have a unique `function_name`.
+     * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setJavascriptUdf(com.google.pubsub.v1.JavaScriptUDF.Builder builderForValue) { + if (javascriptUdfBuilder_ == null) { + transform_ = builderForValue.build(); + onChanged(); + } else { + javascriptUdfBuilder_.setMessage(builderForValue.build()); + } + transformCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+     * are specified on a resource, each must have a unique `function_name`.
+     * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeJavascriptUdf(com.google.pubsub.v1.JavaScriptUDF value) { + if (javascriptUdfBuilder_ == null) { + if (transformCase_ == 2 + && transform_ != com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance()) { + transform_ = + com.google.pubsub.v1.JavaScriptUDF.newBuilder( + (com.google.pubsub.v1.JavaScriptUDF) transform_) + .mergeFrom(value) + .buildPartial(); + } else { + transform_ = value; + } + onChanged(); + } else { + if (transformCase_ == 2) { + javascriptUdfBuilder_.mergeFrom(value); + } else { + javascriptUdfBuilder_.setMessage(value); + } + } + transformCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+     * are specified on a resource, each must have a unique `function_name`.
+     * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearJavascriptUdf() { + if (javascriptUdfBuilder_ == null) { + if (transformCase_ == 2) { + transformCase_ = 0; + transform_ = null; + onChanged(); + } + } else { + if (transformCase_ == 2) { + transformCase_ = 0; + transform_ = null; + } + javascriptUdfBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+     * are specified on a resource, each must have a unique `function_name`.
+     * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.JavaScriptUDF.Builder getJavascriptUdfBuilder() { + return getJavascriptUdfFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+     * are specified on a resource, each must have a unique `function_name`.
+     * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.JavaScriptUDFOrBuilder getJavascriptUdfOrBuilder() { + if ((transformCase_ == 2) && (javascriptUdfBuilder_ != null)) { + return javascriptUdfBuilder_.getMessageOrBuilder(); + } else { + if (transformCase_ == 2) { + return (com.google.pubsub.v1.JavaScriptUDF) transform_; + } + return com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+     * are specified on a resource, each must have a unique `function_name`.
+     * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.JavaScriptUDF, + com.google.pubsub.v1.JavaScriptUDF.Builder, + com.google.pubsub.v1.JavaScriptUDFOrBuilder> + getJavascriptUdfFieldBuilder() { + if (javascriptUdfBuilder_ == null) { + if (!(transformCase_ == 2)) { + transform_ = com.google.pubsub.v1.JavaScriptUDF.getDefaultInstance(); + } + javascriptUdfBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.JavaScriptUDF, + com.google.pubsub.v1.JavaScriptUDF.Builder, + com.google.pubsub.v1.JavaScriptUDFOrBuilder>( + (com.google.pubsub.v1.JavaScriptUDF) transform_, getParentForChildren(), isClean()); + transform_ = null; + } + transformCase_ = 2; + onChanged(); + return javascriptUdfBuilder_; + } + + private boolean enabled_; + /** + * + * + *
+     * Optional. If set to true, the transform is enabled. If false, the transform
+     * is disabled and will not be applied to messages. Defaults to `true`.
+     * 
+ * + * bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * + * + *
+     * Optional. If set to true, the transform is enabled. If false, the transform
+     * is disabled and will not be applied to messages. Defaults to `true`.
+     * 
+ * + * bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, the transform is enabled. If false, the transform
+     * is disabled and will not be applied to messages. Defaults to `true`.
+     * 
+ * + * bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000002); + enabled_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.pubsub.v1.MessageTransform) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.MessageTransform) + private static final com.google.pubsub.v1.MessageTransform DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.MessageTransform(); + } + + public static com.google.pubsub.v1.MessageTransform getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MessageTransform parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.MessageTransform getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} 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 new file mode 100644 index 000000000..8744837b1 --- /dev/null +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/MessageTransformOrBuilder.java @@ -0,0 +1,86 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/pubsub/v1/pubsub.proto + +// Protobuf Java Version: 3.25.5 +package com.google.pubsub.v1; + +public interface MessageTransformOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.MessageTransform) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+   * are specified on a resource, each must have a unique `function_name`.
+   * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the javascriptUdf field is set. + */ + boolean hasJavascriptUdf(); + /** + * + * + *
+   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+   * are specified on a resource, each must have a unique `function_name`.
+   * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The javascriptUdf. + */ + com.google.pubsub.v1.JavaScriptUDF getJavascriptUdf(); + /** + * + * + *
+   * Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's
+   * are specified on a resource, each must have a unique `function_name`.
+   * 
+ * + * + * .google.pubsub.v1.JavaScriptUDF javascript_udf = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.JavaScriptUDFOrBuilder getJavascriptUdfOrBuilder(); + + /** + * + * + *
+   * Optional. If set to true, the transform is enabled. If false, the transform
+   * is disabled and will not be applied to messages. Defaults to `true`.
+   * 
+ * + * bool enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + boolean getEnabled(); + + com.google.pubsub.v1.MessageTransform.TransformCase getTransformCase(); +} 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 57f1e97fc..5a3485f83 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 @@ -104,6 +104,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_pubsub_v1_IngestionFailureEvent_ConfluentCloudFailureReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_JavaScriptUDF_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_JavaScriptUDF_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_MessageTransform_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_MessageTransform_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_Topic_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -483,352 +491,360 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "t\030\004 \001(\003B\003\340A\001\022_\n\024api_violation_reason\030\005 \001" + "(\0132:.google.pubsub.v1.IngestionFailureEv" + "ent.ApiViolationReasonB\003\340A\001H\000B\010\n\006reasonB" - + "\t\n\007failure\"\272\005\n\005Topic\022\021\n\004name\030\001 \001(\tB\003\340A\002\022" - + "8\n\006labels\030\002 \003(\0132#.google.pubsub.v1.Topic" - + ".LabelsEntryB\003\340A\001\022K\n\026message_storage_pol" - + "icy\030\003 \001(\0132&.google.pubsub.v1.MessageStor" - + "agePolicyB\003\340A\001\022\031\n\014kms_key_name\030\005 \001(\tB\003\340A" - + "\001\022>\n\017schema_settings\030\006 \001(\0132 .google.pubs" - + "ub.v1.SchemaSettingsB\003\340A\001\022\032\n\rsatisfies_p" - + "zs\030\007 \001(\010B\003\340A\001\022B\n\032message_retention_durat" - + "ion\030\010 \001(\0132\031.google.protobuf.DurationB\003\340A" - + "\001\0221\n\005state\030\t \001(\0162\035.google.pubsub.v1.Topi" - + "c.StateB\003\340A\003\022Z\n\036ingestion_data_source_se" - + "ttings\030\n \001(\0132-.google.pubsub.v1.Ingestio" - + "nDataSourceSettingsB\003\340A\001\032-\n\013LabelsEntry\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\030I" - + "NGESTION_RESOURCE_ERROR\020\002:T\352AQ\n\033pubsub.g" - + "oogleapis.com/Topic\022!projects/{project}/" - + "topics/{topic}\022\017_deleted-topic_\"\200\002\n\rPubs" - + "ubMessage\022\021\n\004data\030\001 \001(\014B\003\340A\001\022H\n\nattribut" - + "es\030\002 \003(\0132/.google.pubsub.v1.PubsubMessag" - + "e.AttributesEntryB\003\340A\001\022\022\n\nmessage_id\030\003 \001" - + "(\t\0220\n\014publish_time\030\004 \001(\0132\032.google.protob" - + "uf.Timestamp\022\031\n\014ordering_key\030\005 \001(\tB\003\340A\001\032" - + "1\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001\"E\n\017GetTopicRequest\0222\n\005topic\030\001" - + " \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/Topi" - + "c\"w\n\022UpdateTopicRequest\022+\n\005topic\030\001 \001(\0132\027" - + ".google.pubsub.v1.TopicB\003\340A\002\0224\n\013update_m" - + "ask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340" - + "A\002\"|\n\016PublishRequest\0222\n\005topic\030\001 \001(\tB#\340A\002" - + "\372A\035\n\033pubsub.googleapis.com/Topic\0226\n\010mess" - + "ages\030\002 \003(\0132\037.google.pubsub.v1.PubsubMess" - + "ageB\003\340A\002\"+\n\017PublishResponse\022\030\n\013message_i" - + "ds\030\001 \003(\tB\003\340A\001\"\212\001\n\021ListTopicsRequest\022D\n\007p" - + "roject\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanag" - + "er.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\"`\n\022Li" - + "stTopicsResponse\022,\n\006topics\030\001 \003(\0132\027.googl" - + "e.pubsub.v1.TopicB\003\340A\001\022\034\n\017next_page_toke" - + "n\030\002 \001(\tB\003\340A\001\"\204\001\n\035ListTopicSubscriptionsR" - + "equest\0222\n\005topic\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.go" - + "ogleapis.com/Topic\022\026\n\tpage_size\030\002 \001(\005B\003\340" - + "A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"\201\001\n\036ListTopi" - + "cSubscriptionsResponse\022A\n\rsubscriptions\030" - + "\001 \003(\tB*\340A\001\372A$\n\"pubsub.googleapis.com/Sub" - + "scription\022\034\n\017next_page_token\030\002 \001(\tB\003\340A\001\"" - + "\200\001\n\031ListTopicSnapshotsRequest\0222\n\005topic\030\001" - + " \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/Topi" - + "c\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_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\017next_page_to" - + "ken\030\002 \001(\tB\003\340A\001\"H\n\022DeleteTopicRequest\0222\n\005" - + "topic\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.c" - + "om/Topic\"]\n\031DetachSubscriptionRequest\022@\n" - + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.goog" - + "leapis.com/Subscription\"\034\n\032DetachSubscri" - + "ptionResponse\"\253\n\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\033pubsub" - + ".googleapis.com/Topic\0226\n\013push_config\030\004 \001" - + "(\0132\034.google.pubsub.v1.PushConfigB\003\340A\001\022>\n" - + "\017bigquery_config\030\022 \001(\0132 .google.pubsub.v" - + "1.BigQueryConfigB\003\340A\001\022G\n\024cloud_storage_c" - + "onfig\030\026 \001(\0132$.google.pubsub.v1.CloudStor" - + "ageConfigB\003\340A\001\022!\n\024ack_deadline_seconds\030\005" - + " \001(\005B\003\340A\001\022\"\n\025retain_acked_messages\030\007 \001(\010" - + "B\003\340A\001\022B\n\032message_retention_duration\030\010 \001(" - + "\0132\031.google.protobuf.DurationB\003\340A\001\022?\n\006lab" - + "els\030\t \003(\0132*.google.pubsub.v1.Subscriptio" - + "n.LabelsEntryB\003\340A\001\022$\n\027enable_message_ord" - + "ering\030\n \001(\010B\003\340A\001\022B\n\021expiration_policy\030\013 " - + "\001(\0132\".google.pubsub.v1.ExpirationPolicyB" - + "\003\340A\001\022\023\n\006filter\030\014 \001(\tB\003\340A\001\022C\n\022dead_letter" - + "_policy\030\r \001(\0132\".google.pubsub.v1.DeadLet" - + "terPolicyB\003\340A\001\0228\n\014retry_policy\030\016 \001(\0132\035.g" - + "oogle.pubsub.v1.RetryPolicyB\003\340A\001\022\025\n\010deta" - + "ched\030\017 \001(\010B\003\340A\001\022)\n\034enable_exactly_once_d" - + "elivery\030\020 \001(\010B\003\340A\001\022H\n topic_message_rete" - + "ntion_duration\030\021 \001(\0132\031.google.protobuf.D" - + "urationB\003\340A\003\0228\n\005state\030\023 \001(\0162$.google.pub" - + "sub.v1.Subscription.StateB\003\340A\003\022i\n\037analyt" - + "ics_hub_subscription_info\030\027 \001(\0132;.google" - + ".pubsub.v1.Subscription.AnalyticsHubSubs" - + "criptionInfoB\003\340A\003\032O\n\034AnalyticsHubSubscri" - + "ptionInfo\022\024\n\007listing\030\001 \001(\tB\003\340A\001\022\031\n\014subsc" - + "ription\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\">\n\005State\022\025\n\021ST" - + "ATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\022\n\016RESOURC" - + "E_ERROR\020\002:X\352AU\n\"pubsub.googleapis.com/Su" - + "bscription\022/projects/{project}/subscript" - + "ions/{subscription}\"\177\n\013RetryPolicy\0227\n\017mi" - + "nimum_backoff\030\001 \001(\0132\031.google.protobuf.Du" - + "rationB\003\340A\001\0227\n\017maximum_backoff\030\002 \001(\0132\031.g" - + "oogle.protobuf.DurationB\003\340A\001\"V\n\020DeadLett" - + "erPolicy\022\036\n\021dead_letter_topic\030\001 \001(\tB\003\340A\001" - + "\022\"\n\025max_delivery_attempts\030\002 \001(\005B\003\340A\001\"?\n\020" - + "ExpirationPolicy\022+\n\003ttl\030\001 \001(\0132\031.google.p" - + "rotobuf.DurationB\003\340A\001\"\232\004\n\nPushConfig\022\032\n\r" - + "push_endpoint\030\001 \001(\tB\003\340A\001\022E\n\nattributes\030\002" - + " \003(\0132,.google.pubsub.v1.PushConfig.Attri" - + "butesEntryB\003\340A\001\022A\n\noidc_token\030\003 \001(\0132&.go" - + "ogle.pubsub.v1.PushConfig.OidcTokenB\003\340A\001" - + "H\000\022I\n\016pubsub_wrapper\030\004 \001(\0132*.google.pubs" - + "ub.v1.PushConfig.PubsubWrapperB\003\340A\001H\001\022A\n" - + "\nno_wrapper\030\005 \001(\0132&.google.pubsub.v1.Pus" - + "hConfig.NoWrapperB\003\340A\001H\001\032F\n\tOidcToken\022\"\n" - + "\025service_account_email\030\001 \001(\tB\003\340A\001\022\025\n\010aud" - + "ience\030\002 \001(\tB\003\340A\001\032\017\n\rPubsubWrapper\032(\n\tNoW" - + "rapper\022\033\n\016write_metadata\030\001 \001(\010B\003\340A\001\0321\n\017A" - + "ttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001B\027\n\025authentication_methodB\t\n\007wrapp" - + "er\"\216\003\n\016BigQueryConfig\022\022\n\005table\030\001 \001(\tB\003\340A" - + "\001\022\035\n\020use_topic_schema\030\002 \001(\010B\003\340A\001\022\033\n\016writ" - + "e_metadata\030\003 \001(\010B\003\340A\001\022 \n\023drop_unknown_fi" - + "elds\030\004 \001(\010B\003\340A\001\022:\n\005state\030\005 \001(\0162&.google." - + "pubsub.v1.BigQueryConfig.StateB\003\340A\003\022\035\n\020u" - + "se_table_schema\030\006 \001(\010B\003\340A\001\022\"\n\025service_ac" - + "count_email\030\007 \001(\tB\003\340A\001\"\212\001\n\005State\022\025\n\021STAT" - + "E_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\025\n\021PERMISSIO" - + "N_DENIED\020\002\022\r\n\tNOT_FOUND\020\003\022\023\n\017SCHEMA_MISM" - + "ATCH\020\004\022#\n\037IN_TRANSIT_LOCATION_RESTRICTIO" - + "N\020\005\"\351\005\n\022CloudStorageConfig\022\023\n\006bucket\030\001 \001" - + "(\tB\003\340A\002\022\034\n\017filename_prefix\030\002 \001(\tB\003\340A\001\022\034\n" - + "\017filename_suffix\030\003 \001(\tB\003\340A\001\022%\n\030filename_" - + "datetime_format\030\n \001(\tB\003\340A\001\022K\n\013text_confi" - + "g\030\004 \001(\0132/.google.pubsub.v1.CloudStorageC" - + "onfig.TextConfigB\003\340A\001H\000\022K\n\013avro_config\030\005" - + " \001(\0132/.google.pubsub.v1.CloudStorageConf" - + "ig.AvroConfigB\003\340A\001H\000\0224\n\014max_duration\030\006 \001" - + "(\0132\031.google.protobuf.DurationB\003\340A\001\022\026\n\tma" - + "x_bytes\030\007 \001(\003B\003\340A\001\022\031\n\014max_messages\030\010 \001(\003" - + "B\003\340A\001\022>\n\005state\030\t \001(\0162*.google.pubsub.v1." - + "CloudStorageConfig.StateB\003\340A\003\022\"\n\025service" - + "_account_email\030\013 \001(\tB\003\340A\001\032\014\n\nTextConfig\032" - + "H\n\nAvroConfig\022\033\n\016write_metadata\030\001 \001(\010B\003\340" - + "A\001\022\035\n\020use_topic_schema\030\002 \001(\010B\003\340A\001\"\212\001\n\005St" - + "ate\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\025" - + "\n\021PERMISSION_DENIED\020\002\022\r\n\tNOT_FOUND\020\003\022#\n\037" - + "IN_TRANSIT_LOCATION_RESTRICTION\020\004\022\023\n\017SCH" - + "EMA_MISMATCH\020\005B\017\n\routput_format\"|\n\017Recei" - + "vedMessage\022\023\n\006ack_id\030\001 \001(\tB\003\340A\001\0225\n\007messa" - + "ge\030\002 \001(\0132\037.google.pubsub.v1.PubsubMessag" - + "eB\003\340A\001\022\035\n\020delivery_attempt\030\003 \001(\005B\003\340A\001\"Z\n" - + "\026GetSubscriptionRequest\022@\n\014subscription\030" + + "\t\n\007failure\">\n\rJavaScriptUDF\022\032\n\rfunction_" + + "name\030\001 \001(\tB\003\340A\002\022\021\n\004code\030\002 \001(\tB\003\340A\002\"u\n\020Me" + + "ssageTransform\022>\n\016javascript_udf\030\002 \001(\0132\037" + + ".google.pubsub.v1.JavaScriptUDFB\003\340A\001H\000\022\024" + + "\n\007enabled\030\003 \001(\010B\003\340A\001B\013\n\ttransform\"\377\005\n\005To" + + "pic\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&.googl" + + "e.pubsub.v1.MessageStoragePolicyB\003\340A\001\022\031\n" + + "\014kms_key_name\030\005 \001(\tB\003\340A\001\022>\n\017schema_setti" + + "ngs\030\006 \001(\0132 .google.pubsub.v1.SchemaSetti" + + "ngsB\003\340A\001\022\032\n\rsatisfies_pzs\030\007 \001(\010B\003\340A\001\022B\n\032" + + "message_retention_duration\030\010 \001(\0132\031.googl" + + "e.protobuf.DurationB\003\340A\001\0221\n\005state\030\t \001(\0162" + + "\035.google.pubsub.v1.Topic.StateB\003\340A\003\022Z\n\036i" + + "ngestion_data_source_settings\030\n \001(\0132-.go" + + "ogle.pubsub.v1.IngestionDataSourceSettin" + + "gsB\003\340A\001\022C\n\022message_transforms\030\r \003(\0132\".go" + + "ogle.pubsub.v1.MessageTransformB\003\340A\001\032-\n\013" + + "LabelsEntry\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\006A" + + "CTIVE\020\001\022\034\n\030INGESTION_RESOURCE_ERROR\020\002:T\352" + + "AQ\n\033pubsub.googleapis.com/Topic\022!project" + + "s/{project}/topics/{topic}\022\017_deleted-top" + + "ic_\"\200\002\n\rPubsubMessage\022\021\n\004data\030\001 \001(\014B\003\340A\001" + + "\022H\n\nattributes\030\002 \003(\0132/.google.pubsub.v1." + + "PubsubMessage.AttributesEntryB\003\340A\001\022\022\n\nme" + + "ssage_id\030\003 \001(\t\0220\n\014publish_time\030\004 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\022\031\n\014ordering_key" + + "\030\005 \001(\tB\003\340A\001\0321\n\017AttributesEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"E\n\017GetTopicReques" + + "t\0222\n\005topic\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.googlea" + + "pis.com/Topic\"w\n\022UpdateTopicRequest\022+\n\005t" + + "opic\030\001 \001(\0132\027.google.pubsub.v1.TopicB\003\340A\002" + + "\0224\n\013update_mask\030\002 \001(\0132\032.google.protobuf." + + "FieldMaskB\003\340A\002\"|\n\016PublishRequest\0222\n\005topi" + + "c\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.googleapis.com/T" + + "opic\0226\n\010messages\030\002 \003(\0132\037.google.pubsub.v" + + "1.PubsubMessageB\003\340A\002\"+\n\017PublishResponse\022" + + "\030\n\013message_ids\030\001 \003(\tB\003\340A\001\"\212\001\n\021ListTopics" + + "Request\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudr" + + "esourcemanager.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\"`\n\022ListTopicsResponse\022,\n\006topics\030\001" + + " \003(\0132\027.google.pubsub.v1.TopicB\003\340A\001\022\034\n\017ne" + + "xt_page_token\030\002 \001(\tB\003\340A\001\"\204\001\n\035ListTopicSu" + + "bscriptionsRequest\0222\n\005topic\030\001 \001(\tB#\340A\002\372A" + + "\035\n\033pubsub.googleapis.com/Topic\022\026\n\tpage_s" + + "ize\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"" + + "\201\001\n\036ListTopicSubscriptionsResponse\022A\n\rsu" + + "bscriptions\030\001 \003(\tB*\340A\001\372A$\n\"pubsub.google" + + "apis.com/Subscription\022\034\n\017next_page_token" + + "\030\002 \001(\tB\003\340A\001\"\200\001\n\031ListTopicSnapshotsReques" + + "t\0222\n\005topic\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub.googlea" + + "pis.com/Topic\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n" + + "\npage_token\030\003 \001(\tB\003\340A\001\"R\n\032ListTopicSnaps" + + "hotsResponse\022\026\n\tsnapshots\030\001 \003(\tB\003\340A\001\022\034\n\017" + + "next_page_token\030\002 \001(\tB\003\340A\001\"H\n\022DeleteTopi" + + "cRequest\0222\n\005topic\030\001 \001(\tB#\340A\002\372A\035\n\033pubsub." + + "googleapis.com/Topic\"]\n\031DetachSubscripti" + + "onRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\"\034\n\032D" + + "etachSubscriptionResponse\"\360\n\n\014Subscripti" + + "on\022\021\n\004name\030\001 \001(\tB\003\340A\002\0222\n\005topic\030\002 \001(\tB#\340A" + + "\002\372A\035\n\033pubsub.googleapis.com/Topic\0226\n\013pus" + + "h_config\030\004 \001(\0132\034.google.pubsub.v1.PushCo" + + "nfigB\003\340A\001\022>\n\017bigquery_config\030\022 \001(\0132 .goo" + + "gle.pubsub.v1.BigQueryConfigB\003\340A\001\022G\n\024clo" + + "ud_storage_config\030\026 \001(\0132$.google.pubsub." + + "v1.CloudStorageConfigB\003\340A\001\022!\n\024ack_deadli" + + "ne_seconds\030\005 \001(\005B\003\340A\001\022\"\n\025retain_acked_me" + + "ssages\030\007 \001(\010B\003\340A\001\022B\n\032message_retention_d" + + "uration\030\010 \001(\0132\031.google.protobuf.Duration" + + "B\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\021expirati" + + "on_policy\030\013 \001(\0132\".google.pubsub.v1.Expir" + + "ationPolicyB\003\340A\001\022\023\n\006filter\030\014 \001(\tB\003\340A\001\022C\n" + + "\022dead_letter_policy\030\r \001(\0132\".google.pubsu" + + "b.v1.DeadLetterPolicyB\003\340A\001\0228\n\014retry_poli" + + "cy\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_ex" + + "actly_once_delivery\030\020 \001(\010B\003\340A\001\022H\n topic_" + + "message_retention_duration\030\021 \001(\0132\031.googl" + + "e.protobuf.DurationB\003\340A\003\0228\n\005state\030\023 \001(\0162" + + "$.google.pubsub.v1.Subscription.StateB\003\340" + + "A\003\022i\n\037analytics_hub_subscription_info\030\027 " + + "\001(\0132;.google.pubsub.v1.Subscription.Anal" + + "yticsHubSubscriptionInfoB\003\340A\003\022C\n\022message" + + "_transforms\030\031 \003(\0132\".google.pubsub.v1.Mes" + + "sageTransformB\003\340A\001\032O\n\034AnalyticsHubSubscr" + + "iptionInfo\022\024\n\007listing\030\001 \001(\tB\003\340A\001\022\031\n\014subs" + + "cription\030\002 \001(\tB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\">\n\005State\022\025\n\021S" + + "TATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\022\n\016RESOUR" + + "CE_ERROR\020\002:X\352AU\n\"pubsub.googleapis.com/S" + + "ubscription\022/projects/{project}/subscrip" + + "tions/{subscription}\"\177\n\013RetryPolicy\0227\n\017m" + + "inimum_backoff\030\001 \001(\0132\031.google.protobuf.D" + + "urationB\003\340A\001\0227\n\017maximum_backoff\030\002 \001(\0132\031." + + "google.protobuf.DurationB\003\340A\001\"V\n\020DeadLet" + + "terPolicy\022\036\n\021dead_letter_topic\030\001 \001(\tB\003\340A" + + "\001\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\nPushConfig\022\032\n" + + "\rpush_endpoint\030\001 \001(\tB\003\340A\001\022E\n\nattributes\030" + + "\002 \003(\0132,.google.pubsub.v1.PushConfig.Attr" + + "ibutesEntryB\003\340A\001\022A\n\noidc_token\030\003 \001(\0132&.g" + + "oogle.pubsub.v1.PushConfig.OidcTokenB\003\340A" + + "\001H\000\022I\n\016pubsub_wrapper\030\004 \001(\0132*.google.pub" + + "sub.v1.PushConfig.PubsubWrapperB\003\340A\001H\001\022A" + + "\n\nno_wrapper\030\005 \001(\0132&.google.pubsub.v1.Pu" + + "shConfig.NoWrapperB\003\340A\001H\001\032F\n\tOidcToken\022\"" + + "\n\025service_account_email\030\001 \001(\tB\003\340A\001\022\025\n\010au" + + "dience\030\002 \001(\tB\003\340A\001\032\017\n\rPubsubWrapper\032(\n\tNo" + + "Wrapper\022\033\n\016write_metadata\030\001 \001(\010B\003\340A\001\0321\n\017" + + "AttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001B\027\n\025authentication_methodB\t\n\007wrap" + + "per\"\216\003\n\016BigQueryConfig\022\022\n\005table\030\001 \001(\tB\003\340" + + "A\001\022\035\n\020use_topic_schema\030\002 \001(\010B\003\340A\001\022\033\n\016wri" + + "te_metadata\030\003 \001(\010B\003\340A\001\022 \n\023drop_unknown_f" + + "ields\030\004 \001(\010B\003\340A\001\022:\n\005state\030\005 \001(\0162&.google" + + ".pubsub.v1.BigQueryConfig.StateB\003\340A\003\022\035\n\020" + + "use_table_schema\030\006 \001(\010B\003\340A\001\022\"\n\025service_a" + + "ccount_email\030\007 \001(\tB\003\340A\001\"\212\001\n\005State\022\025\n\021STA" + + "TE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\025\n\021PERMISSI" + + "ON_DENIED\020\002\022\r\n\tNOT_FOUND\020\003\022\023\n\017SCHEMA_MIS" + + "MATCH\020\004\022#\n\037IN_TRANSIT_LOCATION_RESTRICTI" + + "ON\020\005\"\351\005\n\022CloudStorageConfig\022\023\n\006bucket\030\001 " + + "\001(\tB\003\340A\002\022\034\n\017filename_prefix\030\002 \001(\tB\003\340A\001\022\034" + + "\n\017filename_suffix\030\003 \001(\tB\003\340A\001\022%\n\030filename" + + "_datetime_format\030\n \001(\tB\003\340A\001\022K\n\013text_conf" + + "ig\030\004 \001(\0132/.google.pubsub.v1.CloudStorage" + + "Config.TextConfigB\003\340A\001H\000\022K\n\013avro_config\030" + + "\005 \001(\0132/.google.pubsub.v1.CloudStorageCon" + + "fig.AvroConfigB\003\340A\001H\000\0224\n\014max_duration\030\006 " + + "\001(\0132\031.google.protobuf.DurationB\003\340A\001\022\026\n\tm" + + "ax_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\025servic" + + "e_account_email\030\013 \001(\tB\003\340A\001\032\014\n\nTextConfig" + + "\032H\n\nAvroConfig\022\033\n\016write_metadata\030\001 \001(\010B\003" + + "\340A\001\022\035\n\020use_topic_schema\030\002 \001(\010B\003\340A\001\"\212\001\n\005S" + + "tate\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022" + + "\025\n\021PERMISSION_DENIED\020\002\022\r\n\tNOT_FOUND\020\003\022#\n" + + "\037IN_TRANSIT_LOCATION_RESTRICTION\020\004\022\023\n\017SC" + + "HEMA_MISMATCH\020\005B\017\n\routput_format\"|\n\017Rece" + + "ivedMessage\022\023\n\006ack_id\030\001 \001(\tB\003\340A\001\0225\n\007mess" + + "age\030\002 \001(\0132\037.google.pubsub.v1.PubsubMessa" + + "geB\003\340A\001\022\035\n\020delivery_attempt\030\003 \001(\005B\003\340A\001\"Z" + + "\n\026GetSubscriptionRequest\022@\n\014subscription" + + "\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Su" + + "bscription\"\214\001\n\031UpdateSubscriptionRequest" + + "\0229\n\014subscription\030\001 \001(\0132\036.google.pubsub.v" + + "1.SubscriptionB\003\340A\002\0224\n\013update_mask\030\002 \001(\013" + + "2\032.google.protobuf.FieldMaskB\003\340A\002\"\221\001\n\030Li" + + "stSubscriptionsRequest\022D\n\007project\030\001 \001(\tB" + + "3\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\"u\n\031ListSubscriptio" + + "nsResponse\022:\n\rsubscriptions\030\001 \003(\0132\036.goog" + + "le.pubsub.v1.SubscriptionB\003\340A\001\022\034\n\017next_p" + + "age_token\030\002 \001(\tB\003\340A\001\"]\n\031DeleteSubscripti" + + "onRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n" + + "\"pubsub.googleapis.com/Subscription\"\223\001\n\027" + + "ModifyPushConfigRequest\022@\n\014subscription\030" + "\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Sub" - + "scription\"\214\001\n\031UpdateSubscriptionRequest\022" - + "9\n\014subscription\030\001 \001(\0132\036.google.pubsub.v1" - + ".SubscriptionB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132" - + "\032.google.protobuf.FieldMaskB\003\340A\002\"\221\001\n\030Lis" - + "tSubscriptionsRequest\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\np" - + "age_token\030\003 \001(\tB\003\340A\001\"u\n\031ListSubscription" - + "sResponse\022:\n\rsubscriptions\030\001 \003(\0132\036.googl" - + "e.pubsub.v1.SubscriptionB\003\340A\001\022\034\n\017next_pa" - + "ge_token\030\002 \001(\tB\003\340A\001\"]\n\031DeleteSubscriptio" - + "nRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"" - + "pubsub.googleapis.com/Subscription\"\223\001\n\027M" - + "odifyPushConfigRequest\022@\n\014subscription\030\001" - + " \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subs" - + "cription\0226\n\013push_config\030\002 \001(\0132\034.google.p" - + "ubsub.v1.PushConfigB\003\340A\002\"\215\001\n\013PullRequest" - + "\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.g" - + "oogleapis.com/Subscription\022!\n\022return_imm" - + "ediately\030\002 \001(\010B\005\030\001\340A\001\022\031\n\014max_messages\030\003 " - + "\001(\005B\003\340A\002\"Q\n\014PullResponse\022A\n\021received_mes" - + "sages\030\001 \003(\0132!.google.pubsub.v1.ReceivedM" - + "essageB\003\340A\001\"\225\001\n\030ModifyAckDeadlineRequest" - + "\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.g" - + "oogleapis.com/Subscription\022\024\n\007ack_ids\030\004 " - + "\003(\tB\003\340A\002\022!\n\024ack_deadline_seconds\030\003 \001(\005B\003" - + "\340A\002\"l\n\022AcknowledgeRequest\022@\n\014subscriptio" - + "n\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/S" - + "ubscription\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\002\"\307\002\n\024St" - + "reamingPullRequest\022@\n\014subscription\030\001 \001(\t" - + "B*\340A\002\372A$\n\"pubsub.googleapis.com/Subscrip" - + "tion\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\001\022$\n\027modify_dea" - + "dline_seconds\030\003 \003(\005B\003\340A\001\022$\n\027modify_deadl" - + "ine_ack_ids\030\004 \003(\tB\003\340A\001\022(\n\033stream_ack_dea" - + "dline_seconds\030\005 \001(\005B\003\340A\002\022\026\n\tclient_id\030\006 " - + "\001(\tB\003\340A\001\022%\n\030max_outstanding_messages\030\007 \001" - + "(\003B\003\340A\001\022\"\n\025max_outstanding_bytes\030\010 \001(\003B\003" - + "\340A\001\"\236\006\n\025StreamingPullResponse\022A\n\021receive" - + "d_messages\030\001 \003(\0132!.google.pubsub.v1.Rece" - + "ivedMessageB\003\340A\001\022f\n\030acknowledge_confirma" - + "tion\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.Subscri" - + "ptionPropertiesB\003\340A\001\032\224\001\n\027AcknowledgeConf" - + "irmation\022\024\n\007ack_ids\030\001 \003(\tB\003\340A\001\022\034\n\017invali" - + "d_ack_ids\030\002 \003(\tB\003\340A\001\022\036\n\021unordered_ack_id" - + "s\030\003 \003(\tB\003\340A\001\022%\n\030temporary_failed_ack_ids" - + "\030\004 \003(\tB\003\340A\001\032z\n\035ModifyAckDeadlineConfirma" - + "tion\022\024\n\007ack_ids\030\001 \003(\tB\003\340A\001\022\034\n\017invalid_ac" - + "k_ids\030\002 \003(\tB\003\340A\001\022%\n\030temporary_failed_ack" - + "_ids\030\003 \003(\tB\003\340A\001\032k\n\026SubscriptionPropertie" - + "s\022*\n\035exactly_once_delivery_enabled\030\001 \001(\010" - + "B\003\340A\001\022%\n\030message_ordering_enabled\030\002 \001(\010B" - + "\003\340A\001\"\210\002\n\025CreateSnapshotRequest\0224\n\004name\030\001" - + " \001(\tB&\340A\002\372A \n\036pubsub.googleapis.com/Snap" - + "shot\022@\n\014subscription\030\002 \001(\tB*\340A\002\372A$\n\"pubs" - + "ub.googleapis.com/Subscription\022H\n\006labels" - + "\030\003 \003(\01323.google.pubsub.v1.CreateSnapshot" - + "Request.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\"\200\001\n\025Upda" - + "teSnapshotRequest\0221\n\010snapshot\030\001 \001(\0132\032.go" - + "ogle.pubsub.v1.SnapshotB\003\340A\002\0224\n\013update_m" - + "ask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340" - + "A\002\"\301\002\n\010Snapshot\022\021\n\004name\030\001 \001(\tB\003\340A\001\0222\n\005to" - + "pic\030\002 \001(\tB#\340A\001\372A\035\n\033pubsub.googleapis.com" - + "/Topic\0224\n\013expire_time\030\003 \001(\0132\032.google.pro" - + "tobuf.TimestampB\003\340A\001\022;\n\006labels\030\004 \003(\0132&.g" - + "oogle.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:L\352AI\n\036pubsub.googleapis.com/Sna" - + "pshot\022\'projects/{project}/snapshots/{sna" - + "pshot}\"N\n\022GetSnapshotRequest\0228\n\010snapshot" - + "\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis.com/Sn" - + "apshot\"\215\001\n\024ListSnapshotsRequest\022D\n\007proje" - + "ct\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.g" - + "oogleapis.com/Project\022\026\n\tpage_size\030\002 \001(\005" - + "B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"i\n\025ListSn" - + "apshotsResponse\0222\n\tsnapshots\030\001 \003(\0132\032.goo" - + "gle.pubsub.v1.SnapshotB\003\340A\001\022\034\n\017next_page" - + "_token\030\002 \001(\tB\003\340A\001\"Q\n\025DeleteSnapshotReque" - + "st\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub.goo" - + "gleapis.com/Snapshot\"\306\001\n\013SeekRequest\022@\n\014" - + "subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googl" - + "eapis.com/Subscription\022/\n\004time\030\002 \001(\0132\032.g" - + "oogle.protobuf.TimestampB\003\340A\001H\000\022:\n\010snaps" - + "hot\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.pubs" - + "ub.v1.Topic\032\027.google.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.v" - + "1.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\007P" - + "ublish\022 .google.pubsub.v1.PublishRequest" - + "\032!.google.pubsub.v1.PublishResponse\"C\332A\016" - + "topic,messages\202\323\344\223\002,\"\'/v1/{topic=project" - + "s/*/topics/*}:publish:\001*\022w\n\010GetTopic\022!.g" - + "oogle.pubsub.v1.GetTopicRequest\032\027.google" - + ".pubsub.v1.Topic\"/\332A\005topic\202\323\344\223\002!\022\037/v1/{t" - + "opic=projects/*/topics/*}\022\212\001\n\nListTopics" - + "\022#.google.pubsub.v1.ListTopicsRequest\032$." - + "google.pubsub.v1.ListTopicsResponse\"1\332A\007" - + "project\202\323\344\223\002!\022\037/v1/{project=projects/*}/" - + "topics\022\272\001\n\026ListTopicSubscriptions\022/.goog" - + "le.pubsub.v1.ListTopicSubscriptionsReque" - + "st\0320.google.pubsub.v1.ListTopicSubscript" - + "ionsResponse\"=\332A\005topic\202\323\344\223\002/\022-/v1/{topic" - + "=projects/*/topics/*}/subscriptions\022\252\001\n\022" - + "ListTopicSnapshots\022+.google.pubsub.v1.Li" - + "stTopicSnapshotsRequest\032,.google.pubsub." - + "v1.ListTopicSnapshotsResponse\"9\332A\005topic\202" - + "\323\344\223\002+\022)/v1/{topic=projects/*/topics/*}/s" - + "napshots\022|\n\013DeleteTopic\022$.google.pubsub." - + "v1.DeleteTopicRequest\032\026.google.protobuf." - + "Empty\"/\332A\005topic\202\323\344\223\002!*\037/v1/{topic=projec" - + "ts/*/topics/*}\022\255\001\n\022DetachSubscription\022+." - + "google.pubsub.v1.DetachSubscriptionReque", - "st\032,.google.pubsub.v1.DetachSubscription" - + "Response\"<\202\323\344\223\0026\"4/v1/{subscription=proj" - + "ects/*/subscriptions/*}:detach\032p\312A\025pubsu" - + "b.googleapis.com\322AUhttps://www.googleapi" - + "s.com/auth/cloud-platform,https://www.go" - + "ogleapis.com/auth/pubsub2\322\025\n\nSubscriber\022" - + "\264\001\n\022CreateSubscription\022\036.google.pubsub.v" - + "1.Subscription\032\036.google.pubsub.v1.Subscr" - + "iption\"^\332A+name,topic,push_config,ack_de" - + "adline_seconds\202\323\344\223\002*\032%/v1/{name=projects" - + "/*/subscriptions/*}:\001*\022\241\001\n\017GetSubscripti" - + "on\022(.google.pubsub.v1.GetSubscriptionReq" - + "uest\032\036.google.pubsub.v1.Subscription\"D\332A" - + "\014subscription\202\323\344\223\002/\022-/v1/{subscription=p" - + "rojects/*/subscriptions/*}\022\273\001\n\022UpdateSub" - + "scription\022+.google.pubsub.v1.UpdateSubsc" - + "riptionRequest\032\036.google.pubsub.v1.Subscr" - + "iption\"X\332A\030subscription,update_mask\202\323\344\223\002" - + "722/v1/{subscription.name=projects/*/sub" - + "scriptions/*}:\001*\022\246\001\n\021ListSubscriptions\022*" - + ".google.pubsub.v1.ListSubscriptionsReque" - + "st\032+.google.pubsub.v1.ListSubscriptionsR" - + "esponse\"8\332A\007project\202\323\344\223\002(\022&/v1/{project=" - + "projects/*}/subscriptions\022\237\001\n\022DeleteSubs" - + "cription\022+.google.pubsub.v1.DeleteSubscr" - + "iptionRequest\032\026.google.protobuf.Empty\"D\332" - + "A\014subscription\202\323\344\223\002/*-/v1/{subscription=" - + "projects/*/subscriptions/*}\022\317\001\n\021ModifyAc" - + "kDeadline\022*.google.pubsub.v1.ModifyAckDe" - + "adlineRequest\032\026.google.protobuf.Empty\"v\332" - + "A)subscription,ack_ids,ack_deadline_seco" - + "nds\202\323\344\223\002D\"?/v1/{subscription=projects/*/" - + "subscriptions/*}:modifyAckDeadline:\001*\022\250\001" - + "\n\013Acknowledge\022$.google.pubsub.v1.Acknowl" - + "edgeRequest\032\026.google.protobuf.Empty\"[\332A\024" - + "subscription,ack_ids\202\323\344\223\002>\"9/v1/{subscri" - + "ption=projects/*/subscriptions/*}:acknow" - + "ledge:\001*\022\320\001\n\004Pull\022\035.google.pubsub.v1.Pul" - + "lRequest\032\036.google.pubsub.v1.PullResponse" - + "\"\210\001\332A,subscription,return_immediately,ma" - + "x_messages\332A\031subscription,max_messages\202\323" - + "\344\223\0027\"2/v1/{subscription=projects/*/subsc" - + "riptions/*}:pull:\001*\022f\n\rStreamingPull\022&.g" - + "oogle.pubsub.v1.StreamingPullRequest\032\'.g" - + "oogle.pubsub.v1.StreamingPullResponse\"\000(" - + "\0010\001\022\273\001\n\020ModifyPushConfig\022).google.pubsub" - + ".v1.ModifyPushConfigRequest\032\026.google.pro" - + "tobuf.Empty\"d\332A\030subscription,push_config" - + "\202\323\344\223\002C\">/v1/{subscription=projects/*/sub" - + "scriptions/*}:modifyPushConfig:\001*\022\211\001\n\013Ge" - + "tSnapshot\022$.google.pubsub.v1.GetSnapshot" - + "Request\032\032.google.pubsub.v1.Snapshot\"8\332A\010" - + "snapshot\202\323\344\223\002\'\022%/v1/{snapshot=projects/*" - + "/snapshots/*}\022\226\001\n\rListSnapshots\022&.google" - + ".pubsub.v1.ListSnapshotsRequest\032\'.google" - + ".pubsub.v1.ListSnapshotsResponse\"4\332A\007pro" - + "ject\202\323\344\223\002$\022\"/v1/{project=projects/*}/sna" - + "pshots\022\227\001\n\016CreateSnapshot\022\'.google.pubsu" - + "b.v1.CreateSnapshotRequest\032\032.google.pubs" - + "ub.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.U" - + "pdateSnapshotRequest\032\032.google.pubsub.v1." - + "Snapshot\"L\332A\024snapshot,update_mask\202\323\344\223\002/2" - + "*/v1/{snapshot.name=projects/*/snapshots" - + "/*}:\001*\022\213\001\n\016DeleteSnapshot\022\'.google.pubsu" - + "b.v1.DeleteSnapshotRequest\032\026.google.prot" - + "obuf.Empty\"8\332A\010snapshot\202\323\344\223\002\'*%/v1/{snap" - + "shot=projects/*/snapshots/*}\022\204\001\n\004Seek\022\035." - + "google.pubsub.v1.SeekRequest\032\036.google.pu" - + "bsub.v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subsc" - + "ription=projects/*/subscriptions/*}:seek" - + ":\001*\032p\312A\025pubsub.googleapis.com\322AUhttps://" - + "www.googleapis.com/auth/cloud-platform,h" - + "ttps://www.googleapis.com/auth/pubsubB\252\001" - + "\n\024com.google.pubsub.v1B\013PubsubProtoP\001Z2c" - + "loud.google.com/go/pubsub/apiv1/pubsubpb" - + ";pubsubpb\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026" - + "Google\\Cloud\\PubSub\\V1\352\002\031Google::Cloud::" - + "PubSub::V1b\006proto3" + + "scription\0226\n\013push_config\030\002 \001(\0132\034.google." + + "pubsub.v1.PushConfigB\003\340A\002\"\215\001\n\013PullReques" + + "t\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub." + + "googleapis.com/Subscription\022!\n\022return_im" + + "mediately\030\002 \001(\010B\005\030\001\340A\001\022\031\n\014max_messages\030\003" + + " \001(\005B\003\340A\002\"Q\n\014PullResponse\022A\n\021received_me" + + "ssages\030\001 \003(\0132!.google.pubsub.v1.Received" + + "MessageB\003\340A\001\"\225\001\n\030ModifyAckDeadlineReques" + + "t\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub." + + "googleapis.com/Subscription\022\024\n\007ack_ids\030\004" + + " \003(\tB\003\340A\002\022!\n\024ack_deadline_seconds\030\003 \001(\005B" + + "\003\340A\002\"l\n\022AcknowledgeRequest\022@\n\014subscripti" + + "on\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/" + + "Subscription\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\002\"\307\002\n\024S" + + "treamingPullRequest\022@\n\014subscription\030\001 \001(" + + "\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subscri" + + "ption\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\001\022$\n\027modify_de" + + "adline_seconds\030\003 \003(\005B\003\340A\001\022$\n\027modify_dead" + + "line_ack_ids\030\004 \003(\tB\003\340A\001\022(\n\033stream_ack_de" + + "adline_seconds\030\005 \001(\005B\003\340A\002\022\026\n\tclient_id\030\006" + + " \001(\tB\003\340A\001\022%\n\030max_outstanding_messages\030\007 " + + "\001(\003B\003\340A\001\022\"\n\025max_outstanding_bytes\030\010 \001(\003B" + + "\003\340A\001\"\236\006\n\025StreamingPullResponse\022A\n\021receiv" + + "ed_messages\030\001 \003(\0132!.google.pubsub.v1.Rec" + + "eivedMessageB\003\340A\001\022f\n\030acknowledge_confirm" + + "ation\030\005 \001(\0132?.google.pubsub.v1.Streaming" + + "PullResponse.AcknowledgeConfirmationB\003\340A" + + "\001\022t\n modify_ack_deadline_confirmation\030\003 " + + "\001(\0132E.google.pubsub.v1.StreamingPullResp" + + "onse.ModifyAckDeadlineConfirmationB\003\340A\001\022" + + "d\n\027subscription_properties\030\004 \001(\0132>.googl" + + "e.pubsub.v1.StreamingPullResponse.Subscr" + + "iptionPropertiesB\003\340A\001\032\224\001\n\027AcknowledgeCon" + + "firmation\022\024\n\007ack_ids\030\001 \003(\tB\003\340A\001\022\034\n\017inval" + + "id_ack_ids\030\002 \003(\tB\003\340A\001\022\036\n\021unordered_ack_i" + + "ds\030\003 \003(\tB\003\340A\001\022%\n\030temporary_failed_ack_id" + + "s\030\004 \003(\tB\003\340A\001\032z\n\035ModifyAckDeadlineConfirm" + + "ation\022\024\n\007ack_ids\030\001 \003(\tB\003\340A\001\022\034\n\017invalid_a" + + "ck_ids\030\002 \003(\tB\003\340A\001\022%\n\030temporary_failed_ac" + + "k_ids\030\003 \003(\tB\003\340A\001\032k\n\026SubscriptionProperti" + + "es\022*\n\035exactly_once_delivery_enabled\030\001 \001(" + + "\010B\003\340A\001\022%\n\030message_ordering_enabled\030\002 \001(\010" + + "B\003\340A\001\"\210\002\n\025CreateSnapshotRequest\0224\n\004name\030" + + "\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis.com/Sna" + + "pshot\022@\n\014subscription\030\002 \001(\tB*\340A\002\372A$\n\"pub" + + "sub.googleapis.com/Subscription\022H\n\006label" + + "s\030\003 \003(\01323.google.pubsub.v1.CreateSnapsho" + + "tRequest.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\"\200\001\n\025Upd" + + "ateSnapshotRequest\0221\n\010snapshot\030\001 \001(\0132\032.g" + + "oogle.pubsub.v1.SnapshotB\003\340A\002\0224\n\013update_" + + "mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003" + + "\340A\002\"\301\002\n\010Snapshot\022\021\n\004name\030\001 \001(\tB\003\340A\001\0222\n\005t" + + "opic\030\002 \001(\tB#\340A\001\372A\035\n\033pubsub.googleapis.co" + + "m/Topic\0224\n\013expire_time\030\003 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\001\022;\n\006labels\030\004 \003(\0132&." + + "google.pubsub.v1.Snapshot.LabelsEntryB\003\340" + + "A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001:L\352AI\n\036pubsub.googleapis.com/Sn" + + "apshot\022\'projects/{project}/snapshots/{sn" + + "apshot}\"N\n\022GetSnapshotRequest\0228\n\010snapsho" + + "t\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis.com/S" + + "napshot\"\215\001\n\024ListSnapshotsRequest\022D\n\007proj" + + "ect\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\npage_token\030\003 \001(\tB\003\340A\001\"i\n\025ListS" + + "napshotsResponse\0222\n\tsnapshots\030\001 \003(\0132\032.go" + + "ogle.pubsub.v1.SnapshotB\003\340A\001\022\034\n\017next_pag" + + "e_token\030\002 \001(\tB\003\340A\001\"Q\n\025DeleteSnapshotRequ" + + "est\0228\n\010snapshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub.go" + + "ogleapis.com/Snapshot\"\306\001\n\013SeekRequest\022@\n" + + "\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.goog" + + "leapis.com/Subscription\022/\n\004time\030\002 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\001H\000\022:\n\010snap" + + "shot\030\003 \001(\tB&\340A\001\372A \n\036pubsub.googleapis.co" + + "m/SnapshotH\000B\010\n\006target\"\016\n\014SeekResponse2\270" + + "\013\n\tPublisher\022q\n\013CreateTopic\022\027.google.pub" + + "sub.v1.Topic\032\027.google.pubsub.v1.Topic\"0\332" + + "A\004name\202\323\344\223\002#\032\036/v1/{name=projects/*/topic" + + "s/*}:\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\007" + + "Publish\022 .google.pubsub.v1.PublishReques" + + "t\032!.google.pubsub.v1.PublishResponse\"C\332A" + + "\016topic,messages\202\323\344\223\002,\"\'/v1/{topic=projec" + + "ts/*/topics/*}:publish:\001*\022w\n\010GetTopic\022!." + + "google.pubsub.v1.GetTopicRequest\032\027.googl" + + "e.pubsub.v1.Topic\"/\332A\005topic\202\323\344\223\002!\022\037/v1/{" + + "topic=projects/*/topics/*}\022\212\001\n\nListTopic" + + "s\022#.google.pubsub.v1.ListTopicsRequest\032$" + + ".google.pubsub.v1.ListTopicsResponse\"1\332A" + + "\007project\202\323\344\223\002!\022\037/v1/{project=projects/*}" + + "/topics\022\272\001\n\026ListTopicSubscriptions\022/.goo" + + "gle.pubsub.v1.ListTopicSubscriptionsRequ" + + "est\0320.google.pubsub.v1.ListTopicSubscrip" + + "tionsResponse\"=\332A\005topic\202\323\344\223\002/\022-/v1/{topi" + + "c=projects/*/topics/*}/subscriptions\022\252\001\n" + + "\022ListTopicSnapshots\022+.google.pubsub.v1.L", + "istTopicSnapshotsRequest\032,.google.pubsub" + + ".v1.ListTopicSnapshotsResponse\"9\332A\005topic" + + "\202\323\344\223\002+\022)/v1/{topic=projects/*/topics/*}/" + + "snapshots\022|\n\013DeleteTopic\022$.google.pubsub" + + ".v1.DeleteTopicRequest\032\026.google.protobuf" + + ".Empty\"/\332A\005topic\202\323\344\223\002!*\037/v1/{topic=proje" + + "cts/*/topics/*}\022\255\001\n\022DetachSubscription\022+" + + ".google.pubsub.v1.DetachSubscriptionRequ" + + "est\032,.google.pubsub.v1.DetachSubscriptio" + + "nResponse\"<\202\323\344\223\0026\"4/v1/{subscription=pro" + + "jects/*/subscriptions/*}:detach\032p\312A\025pubs" + + "ub.googleapis.com\322AUhttps://www.googleap" + + "is.com/auth/cloud-platform,https://www.g" + + "oogleapis.com/auth/pubsub2\322\025\n\nSubscriber" + + "\022\264\001\n\022CreateSubscription\022\036.google.pubsub." + + "v1.Subscription\032\036.google.pubsub.v1.Subsc" + + "ription\"^\332A+name,topic,push_config,ack_d" + + "eadline_seconds\202\323\344\223\002*\032%/v1/{name=project" + + "s/*/subscriptions/*}:\001*\022\241\001\n\017GetSubscript" + + "ion\022(.google.pubsub.v1.GetSubscriptionRe" + + "quest\032\036.google.pubsub.v1.Subscription\"D\332" + + "A\014subscription\202\323\344\223\002/\022-/v1/{subscription=" + + "projects/*/subscriptions/*}\022\273\001\n\022UpdateSu" + + "bscription\022+.google.pubsub.v1.UpdateSubs" + + "criptionRequest\032\036.google.pubsub.v1.Subsc" + + "ription\"X\332A\030subscription,update_mask\202\323\344\223" + + "\002722/v1/{subscription.name=projects/*/su" + + "bscriptions/*}:\001*\022\246\001\n\021ListSubscriptions\022" + + "*.google.pubsub.v1.ListSubscriptionsRequ" + + "est\032+.google.pubsub.v1.ListSubscriptions" + + "Response\"8\332A\007project\202\323\344\223\002(\022&/v1/{project" + + "=projects/*}/subscriptions\022\237\001\n\022DeleteSub" + + "scription\022+.google.pubsub.v1.DeleteSubsc" + + "riptionRequest\032\026.google.protobuf.Empty\"D" + + "\332A\014subscription\202\323\344\223\002/*-/v1/{subscription" + + "=projects/*/subscriptions/*}\022\317\001\n\021ModifyA" + + "ckDeadline\022*.google.pubsub.v1.ModifyAckD" + + "eadlineRequest\032\026.google.protobuf.Empty\"v" + + "\332A)subscription,ack_ids,ack_deadline_sec" + + "onds\202\323\344\223\002D\"?/v1/{subscription=projects/*" + + "/subscriptions/*}:modifyAckDeadline:\001*\022\250" + + "\001\n\013Acknowledge\022$.google.pubsub.v1.Acknow" + + "ledgeRequest\032\026.google.protobuf.Empty\"[\332A" + + "\024subscription,ack_ids\202\323\344\223\002>\"9/v1/{subscr" + + "iption=projects/*/subscriptions/*}:ackno" + + "wledge:\001*\022\320\001\n\004Pull\022\035.google.pubsub.v1.Pu" + + "llRequest\032\036.google.pubsub.v1.PullRespons" + + "e\"\210\001\332A,subscription,return_immediately,m" + + "ax_messages\332A\031subscription,max_messages\202" + + "\323\344\223\0027\"2/v1/{subscription=projects/*/subs" + + "criptions/*}:pull:\001*\022f\n\rStreamingPull\022&." + + "google.pubsub.v1.StreamingPullRequest\032\'." + + "google.pubsub.v1.StreamingPullResponse\"\000" + + "(\0010\001\022\273\001\n\020ModifyPushConfig\022).google.pubsu" + + "b.v1.ModifyPushConfigRequest\032\026.google.pr" + + "otobuf.Empty\"d\332A\030subscription,push_confi" + + "g\202\323\344\223\002C\">/v1/{subscription=projects/*/su" + + "bscriptions/*}:modifyPushConfig:\001*\022\211\001\n\013G" + + "etSnapshot\022$.google.pubsub.v1.GetSnapsho" + + "tRequest\032\032.google.pubsub.v1.Snapshot\"8\332A" + + "\010snapshot\202\323\344\223\002\'\022%/v1/{snapshot=projects/" + + "*/snapshots/*}\022\226\001\n\rListSnapshots\022&.googl" + + "e.pubsub.v1.ListSnapshotsRequest\032\'.googl" + + "e.pubsub.v1.ListSnapshotsResponse\"4\332A\007pr" + + "oject\202\323\344\223\002$\022\"/v1/{project=projects/*}/sn" + + "apshots\022\227\001\n\016CreateSnapshot\022\'.google.pubs" + + "ub.v1.CreateSnapshotRequest\032\032.google.pub" + + "sub.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." + + "UpdateSnapshotRequest\032\032.google.pubsub.v1" + + ".Snapshot\"L\332A\024snapshot,update_mask\202\323\344\223\002/" + + "2*/v1/{snapshot.name=projects/*/snapshot" + + "s/*}:\001*\022\213\001\n\016DeleteSnapshot\022\'.google.pubs" + + "ub.v1.DeleteSnapshotRequest\032\026.google.pro" + + "tobuf.Empty\"8\332A\010snapshot\202\323\344\223\002\'*%/v1/{sna" + + "pshot=projects/*/snapshots/*}\022\204\001\n\004Seek\022\035" + + ".google.pubsub.v1.SeekRequest\032\036.google.p" + + "ubsub.v1.SeekResponse\"=\202\323\344\223\0027\"2/v1/{subs" + + "cription=projects/*/subscriptions/*}:see" + + "k:\001*\032p\312A\025pubsub.googleapis.com\322AUhttps:/" + + "/www.googleapis.com/auth/cloud-platform," + + "https://www.googleapis.com/auth/pubsubB\247" + + "\001\n\024com.google.pubsub.v1B\013PubsubProtoP\001Z2" + + "cloud.google.com/go/pubsub/apiv1/pubsubp" + + "b;pubsubpb\252\002\026Google.Cloud.PubSub.V1\312\002\026Go" + + "ogle\\Cloud\\PubSub\\V1\352\002\031Google::Cloud::Pu" + + "bSub::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1040,7 +1056,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ClusterId", "KafkaTopic", "PartitionId", "Offset", "ApiViolationReason", "Reason", }); - internal_static_google_pubsub_v1_Topic_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_google_pubsub_v1_JavaScriptUDF_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_pubsub_v1_JavaScriptUDF_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_JavaScriptUDF_descriptor, + new java.lang.String[] { + "FunctionName", "Code", + }); + internal_static_google_pubsub_v1_MessageTransform_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_pubsub_v1_MessageTransform_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_MessageTransform_descriptor, + new java.lang.String[] { + "JavascriptUdf", "Enabled", "Transform", + }); + internal_static_google_pubsub_v1_Topic_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_google_pubsub_v1_Topic_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Topic_descriptor, @@ -1054,6 +1086,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MessageRetentionDuration", "State", "IngestionDataSourceSettings", + "MessageTransforms", }); internal_static_google_pubsub_v1_Topic_LabelsEntry_descriptor = internal_static_google_pubsub_v1_Topic_descriptor.getNestedTypes().get(0); @@ -1064,7 +1097,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_PubsubMessage_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(8); internal_static_google_pubsub_v1_PubsubMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PubsubMessage_descriptor, @@ -1080,7 +1113,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_GetTopicRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(9); internal_static_google_pubsub_v1_GetTopicRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_GetTopicRequest_descriptor, @@ -1088,7 +1121,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Topic", }); internal_static_google_pubsub_v1_UpdateTopicRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(10); internal_static_google_pubsub_v1_UpdateTopicRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateTopicRequest_descriptor, @@ -1096,7 +1129,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Topic", "UpdateMask", }); internal_static_google_pubsub_v1_PublishRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(11); internal_static_google_pubsub_v1_PublishRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PublishRequest_descriptor, @@ -1104,7 +1137,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Topic", "Messages", }); internal_static_google_pubsub_v1_PublishResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(12); internal_static_google_pubsub_v1_PublishResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PublishResponse_descriptor, @@ -1112,7 +1145,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MessageIds", }); internal_static_google_pubsub_v1_ListTopicsRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(13); internal_static_google_pubsub_v1_ListTopicsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicsRequest_descriptor, @@ -1120,7 +1153,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListTopicsResponse_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(14); internal_static_google_pubsub_v1_ListTopicsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicsResponse_descriptor, @@ -1128,7 +1161,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Topics", "NextPageToken", }); internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(15); internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor, @@ -1136,7 +1169,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Topic", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(16); internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor, @@ -1144,7 +1177,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscriptions", "NextPageToken", }); internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(17); internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicSnapshotsRequest_descriptor, @@ -1152,7 +1185,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Topic", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(18); internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListTopicSnapshotsResponse_descriptor, @@ -1160,7 +1193,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshots", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(19); internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor, @@ -1168,7 +1201,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Topic", }); internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(20); internal_static_google_pubsub_v1_DetachSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DetachSubscriptionRequest_descriptor, @@ -1176,13 +1209,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", }); internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(21); internal_static_google_pubsub_v1_DetachSubscriptionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DetachSubscriptionResponse_descriptor, new java.lang.String[] {}); internal_static_google_pubsub_v1_Subscription_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(22); internal_static_google_pubsub_v1_Subscription_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Subscription_descriptor, @@ -1206,6 +1239,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TopicMessageRetentionDuration", "State", "AnalyticsHubSubscriptionInfo", + "MessageTransforms", }); internal_static_google_pubsub_v1_Subscription_AnalyticsHubSubscriptionInfo_descriptor = internal_static_google_pubsub_v1_Subscription_descriptor.getNestedTypes().get(0); @@ -1224,7 +1258,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_RetryPolicy_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(23); internal_static_google_pubsub_v1_RetryPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_RetryPolicy_descriptor, @@ -1232,7 +1266,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MinimumBackoff", "MaximumBackoff", }); internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(24); internal_static_google_pubsub_v1_DeadLetterPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeadLetterPolicy_descriptor, @@ -1240,7 +1274,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DeadLetterTopic", "MaxDeliveryAttempts", }); internal_static_google_pubsub_v1_ExpirationPolicy_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(25); internal_static_google_pubsub_v1_ExpirationPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ExpirationPolicy_descriptor, @@ -1248,7 +1282,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Ttl", }); internal_static_google_pubsub_v1_PushConfig_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(26); internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PushConfig_descriptor, @@ -1292,7 +1326,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_BigQueryConfig_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(27); internal_static_google_pubsub_v1_BigQueryConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_BigQueryConfig_descriptor, @@ -1306,7 +1340,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ServiceAccountEmail", }); internal_static_google_pubsub_v1_CloudStorageConfig_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(28); internal_static_google_pubsub_v1_CloudStorageConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_CloudStorageConfig_descriptor, @@ -1339,7 +1373,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WriteMetadata", "UseTopicSchema", }); internal_static_google_pubsub_v1_ReceivedMessage_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(29); internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ReceivedMessage_descriptor, @@ -1347,7 +1381,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AckId", "Message", "DeliveryAttempt", }); internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(30); internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor, @@ -1355,7 +1389,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", }); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(31); internal_static_google_pubsub_v1_UpdateSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSubscriptionRequest_descriptor, @@ -1363,7 +1397,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "UpdateMask", }); internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(32); internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor, @@ -1371,7 +1405,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(33); internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor, @@ -1379,7 +1413,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscriptions", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(34); internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor, @@ -1387,7 +1421,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", }); internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(35); internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor, @@ -1395,7 +1429,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "PushConfig", }); internal_static_google_pubsub_v1_PullRequest_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(36); internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PullRequest_descriptor, @@ -1403,7 +1437,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "ReturnImmediately", "MaxMessages", }); internal_static_google_pubsub_v1_PullResponse_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(37); internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_PullResponse_descriptor, @@ -1411,7 +1445,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReceivedMessages", }); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(38); internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor, @@ -1419,7 +1453,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "AckIds", "AckDeadlineSeconds", }); internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(39); internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor, @@ -1427,7 +1461,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "AckIds", }); internal_static_google_pubsub_v1_StreamingPullRequest_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(40); internal_static_google_pubsub_v1_StreamingPullRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullRequest_descriptor, @@ -1442,7 +1476,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MaxOutstandingBytes", }); internal_static_google_pubsub_v1_StreamingPullResponse_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(41); internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullResponse_descriptor, @@ -1477,7 +1511,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExactlyOnceDeliveryEnabled", "MessageOrderingEnabled", }); internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(42); internal_static_google_pubsub_v1_CreateSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor, @@ -1493,7 +1527,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(43); internal_static_google_pubsub_v1_UpdateSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_UpdateSnapshotRequest_descriptor, @@ -1501,7 +1535,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", "UpdateMask", }); internal_static_google_pubsub_v1_Snapshot_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(44); internal_static_google_pubsub_v1_Snapshot_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_Snapshot_descriptor, @@ -1517,7 +1551,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(45); internal_static_google_pubsub_v1_GetSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_GetSnapshotRequest_descriptor, @@ -1525,7 +1559,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", }); internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(46); internal_static_google_pubsub_v1_ListSnapshotsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsRequest_descriptor, @@ -1533,7 +1567,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Project", "PageSize", "PageToken", }); internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor = - getDescriptor().getMessageTypes().get(45); + getDescriptor().getMessageTypes().get(47); internal_static_google_pubsub_v1_ListSnapshotsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_ListSnapshotsResponse_descriptor, @@ -1541,7 +1575,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshots", "NextPageToken", }); internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(48); internal_static_google_pubsub_v1_DeleteSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_DeleteSnapshotRequest_descriptor, @@ -1549,7 +1583,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshot", }); internal_static_google_pubsub_v1_SeekRequest_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(49); internal_static_google_pubsub_v1_SeekRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_SeekRequest_descriptor, @@ -1557,7 +1591,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Subscription", "Time", "Snapshot", "Target", }); internal_static_google_pubsub_v1_SeekResponse_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(50); internal_static_google_pubsub_v1_SeekResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_SeekResponse_descriptor, new java.lang.String[] {}); 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 0fcf1b660..d5a4bcf69 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 @@ -137,7 +137,7 @@ public com.google.protobuf.ByteString getSubscriptionBytes() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1840 + * google/pubsub/v1/pubsub.proto;l=1901 * @return The returnImmediately. */ @java.lang.Override @@ -688,7 +688,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=1840 + * google/pubsub/v1/pubsub.proto;l=1901 * @return The returnImmediately. */ @java.lang.Override @@ -714,7 +714,7 @@ public boolean getReturnImmediately() { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1840 + * google/pubsub/v1/pubsub.proto;l=1901 * @param value The returnImmediately to set. * @return This builder for chaining. */ @@ -744,7 +744,7 @@ public Builder setReturnImmediately(boolean value) { * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1840 + * google/pubsub/v1/pubsub.proto;l=1901 * @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 6520bf9bd..7c808834b 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 @@ -72,7 +72,7 @@ public interface PullRequestOrBuilder * * * @deprecated google.pubsub.v1.PullRequest.return_immediately is deprecated. See - * google/pubsub/v1/pubsub.proto;l=1840 + * google/pubsub/v1/pubsub.proto;l=1901 * @return The returnImmediately. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaProto.java index debada97a..27f4675b1 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaProto.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaProto.java @@ -197,11 +197,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "alidateMessage:\001*\032p\312A\025pubsub.googleapis." + "com\322AUhttps://www.googleapis.com/auth/cl" + "oud-platform,https://www.googleapis.com/" - + "auth/pubsubB\252\001\n\024com.google.pubsub.v1B\013Sc" + + "auth/pubsubB\247\001\n\024com.google.pubsub.v1B\013Sc" + "hemaProtoP\001Z2cloud.google.com/go/pubsub/" - + "apiv1/pubsubpb;pubsubpb\370\001\001\252\002\026Google.Clou" - + "d.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V1\352\002\031G" - + "oogle::Cloud::PubSub::V1b\006proto3" + + "apiv1/pubsubpb;pubsubpb\252\002\026Google.Cloud.P" + + "ubSub.V1\312\002\026Google\\Cloud\\PubSub\\V1\352\002\031Goog" + + "le::Cloud::PubSub::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( 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 423ae5a49..31581f253 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 @@ -45,6 +45,7 @@ private Subscription() { topic_ = ""; filter_ = ""; state_ = 0; + messageTransforms_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -308,8 +309,8 @@ public interface AnalyticsHubSubscriptionInfoOrBuilder * * *
-   * Information about an associated Analytics Hub subscription
-   * (https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
+   * Information about an associated [Analytics Hub
+   * subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
    * 
* * Protobuf type {@code google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo} @@ -636,8 +637,8 @@ protected Builder newBuilderForType( * * *
-     * Information about an associated Analytics Hub subscription
-     * (https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
+     * Information about an associated [Analytics Hub
+     * subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).
      * 
* * Protobuf type {@code google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo} @@ -2192,6 +2193,92 @@ public boolean hasAnalyticsHubSubscriptionInfo() { : analyticsHubSubscriptionInfo_; } + public static final int MESSAGE_TRANSFORMS_FIELD_NUMBER = 25; + + @SuppressWarnings("serial") + private java.util.List messageTransforms_; + /** + * + * + *
+   * Optional. Transforms to be applied to messages before they are delivered to
+   * subscribers. Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getMessageTransformsList() { + return messageTransforms_; + } + /** + * + * + *
+   * Optional. Transforms to be applied to messages before they are delivered to
+   * subscribers. Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getMessageTransformsOrBuilderList() { + return messageTransforms_; + } + /** + * + * + *
+   * Optional. Transforms to be applied to messages before they are delivered to
+   * subscribers. Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getMessageTransformsCount() { + return messageTransforms_.size(); + } + /** + * + * + *
+   * Optional. Transforms to be applied to messages before they are delivered to
+   * subscribers. Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.MessageTransform getMessageTransforms(int index) { + return messageTransforms_.get(index); + } + /** + * + * + *
+   * Optional. Transforms to be applied to messages before they are delivered to
+   * subscribers. Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index) { + return messageTransforms_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2262,6 +2349,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000100) != 0)) { output.writeMessage(23, getAnalyticsHubSubscriptionInfo()); } + for (int i = 0; i < messageTransforms_.size(); i++) { + output.writeMessage(25, messageTransforms_.get(i)); + } getUnknownFields().writeTo(output); } @@ -2341,6 +2431,10 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 23, getAnalyticsHubSubscriptionInfo()); } + for (int i = 0; i < messageTransforms_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(25, messageTransforms_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2405,6 +2499,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAnalyticsHubSubscriptionInfo().equals(other.getAnalyticsHubSubscriptionInfo())) return false; } + if (!getMessageTransformsList().equals(other.getMessageTransformsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2474,6 +2569,10 @@ public int hashCode() { hash = (37 * hash) + ANALYTICS_HUB_SUBSCRIPTION_INFO_FIELD_NUMBER; hash = (53 * hash) + getAnalyticsHubSubscriptionInfo().hashCode(); } + if (getMessageTransformsCount() > 0) { + hash = (37 * hash) + MESSAGE_TRANSFORMS_FIELD_NUMBER; + hash = (53 * hash) + getMessageTransformsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2646,6 +2745,7 @@ private void maybeForceBuilderInitialization() { getRetryPolicyFieldBuilder(); getTopicMessageRetentionDurationFieldBuilder(); getAnalyticsHubSubscriptionInfoFieldBuilder(); + getMessageTransformsFieldBuilder(); } } @@ -2708,6 +2808,13 @@ public Builder clear() { analyticsHubSubscriptionInfoBuilder_.dispose(); analyticsHubSubscriptionInfoBuilder_ = null; } + if (messageTransformsBuilder_ == null) { + messageTransforms_ = java.util.Collections.emptyList(); + } else { + messageTransforms_ = null; + messageTransformsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00080000); return this; } @@ -2734,6 +2841,7 @@ public com.google.pubsub.v1.Subscription build() { @java.lang.Override public com.google.pubsub.v1.Subscription buildPartial() { com.google.pubsub.v1.Subscription result = new com.google.pubsub.v1.Subscription(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -2741,6 +2849,18 @@ public com.google.pubsub.v1.Subscription buildPartial() { return result; } + private void buildPartialRepeatedFields(com.google.pubsub.v1.Subscription result) { + if (messageTransformsBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0)) { + messageTransforms_ = java.util.Collections.unmodifiableList(messageTransforms_); + bitField0_ = (bitField0_ & ~0x00080000); + } + result.messageTransforms_ = messageTransforms_; + } else { + result.messageTransforms_ = messageTransformsBuilder_.build(); + } + } + private void buildPartial0(com.google.pubsub.v1.Subscription result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -2937,6 +3057,33 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other.hasAnalyticsHubSubscriptionInfo()) { mergeAnalyticsHubSubscriptionInfo(other.getAnalyticsHubSubscriptionInfo()); } + if (messageTransformsBuilder_ == null) { + if (!other.messageTransforms_.isEmpty()) { + if (messageTransforms_.isEmpty()) { + messageTransforms_ = other.messageTransforms_; + bitField0_ = (bitField0_ & ~0x00080000); + } else { + ensureMessageTransformsIsMutable(); + messageTransforms_.addAll(other.messageTransforms_); + } + onChanged(); + } + } else { + if (!other.messageTransforms_.isEmpty()) { + if (messageTransformsBuilder_.isEmpty()) { + messageTransformsBuilder_.dispose(); + messageTransformsBuilder_ = null; + messageTransforms_ = other.messageTransforms_; + bitField0_ = (bitField0_ & ~0x00080000); + messageTransformsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMessageTransformsFieldBuilder() + : null; + } else { + messageTransformsBuilder_.addAllMessages(other.messageTransforms_); + } + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3089,6 +3236,19 @@ public Builder mergeFrom( bitField0_ |= 0x00040000; break; } // case 186 + case 202: + { + com.google.pubsub.v1.MessageTransform m = + input.readMessage( + com.google.pubsub.v1.MessageTransform.parser(), extensionRegistry); + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(m); + } else { + messageTransformsBuilder_.addMessage(m); + } + break; + } // case 202 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6282,6 +6442,414 @@ public Builder clearAnalyticsHubSubscriptionInfo() { return analyticsHubSubscriptionInfoBuilder_; } + private java.util.List messageTransforms_ = + java.util.Collections.emptyList(); + + private void ensureMessageTransformsIsMutable() { + if (!((bitField0_ & 0x00080000) != 0)) { + messageTransforms_ = + new java.util.ArrayList(messageTransforms_); + bitField0_ |= 0x00080000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder> + messageTransformsBuilder_; + + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getMessageTransformsList() { + if (messageTransformsBuilder_ == null) { + return java.util.Collections.unmodifiableList(messageTransforms_); + } else { + return messageTransformsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getMessageTransformsCount() { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.size(); + } else { + return messageTransformsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform getMessageTransforms(int index) { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.get(index); + } else { + return messageTransformsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransforms(int index, com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.set(index, value); + onChanged(); + } else { + messageTransformsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransforms( + int index, com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.set(index, builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms(com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.add(value); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms(int index, com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.add(index, value); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms( + com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms( + int index, com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(index, builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllMessageTransforms( + java.lang.Iterable values) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messageTransforms_); + onChanged(); + } else { + messageTransformsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMessageTransforms() { + if (messageTransformsBuilder_ == null) { + messageTransforms_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00080000); + onChanged(); + } else { + messageTransformsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeMessageTransforms(int index) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.remove(index); + onChanged(); + } else { + messageTransformsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder getMessageTransformsBuilder(int index) { + return getMessageTransformsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index) { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.get(index); + } else { + return messageTransformsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getMessageTransformsOrBuilderList() { + if (messageTransformsBuilder_ != null) { + return messageTransformsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messageTransforms_); + } + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder addMessageTransformsBuilder() { + return getMessageTransformsFieldBuilder() + .addBuilder(com.google.pubsub.v1.MessageTransform.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder addMessageTransformsBuilder(int index) { + return getMessageTransformsFieldBuilder() + .addBuilder(index, com.google.pubsub.v1.MessageTransform.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages before they are delivered to
+     * subscribers. Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getMessageTransformsBuilderList() { + return getMessageTransformsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder> + getMessageTransformsFieldBuilder() { + if (messageTransformsBuilder_ == null) { + messageTransformsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder>( + messageTransforms_, + ((bitField0_ & 0x00080000) != 0), + getParentForChildren(), + isClean()); + messageTransforms_ = null; + } + return messageTransformsBuilder_; + } + @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 46c75a2b5..8e9b3000c 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 @@ -788,4 +788,71 @@ java.lang.String getLabelsOrDefault( */ com.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfoOrBuilder getAnalyticsHubSubscriptionInfoOrBuilder(); + + /** + * + * + *
+   * Optional. Transforms to be applied to messages before they are delivered to
+   * subscribers. Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getMessageTransformsList(); + /** + * + * + *
+   * Optional. Transforms to be applied to messages before they are delivered to
+   * subscribers. Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.MessageTransform getMessageTransforms(int index); + /** + * + * + *
+   * Optional. Transforms to be applied to messages before they are delivered to
+   * subscribers. Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getMessageTransformsCount(); + /** + * + * + *
+   * Optional. Transforms to be applied to messages before they are delivered to
+   * subscribers. Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getMessageTransformsOrBuilderList(); + /** + * + * + *
+   * Optional. Transforms to be applied to messages before they are delivered to
+   * subscribers. Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index); } 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 40872b062..5ee6a0772 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 @@ -42,6 +42,7 @@ private Topic() { name_ = ""; kmsKeyName_ = ""; state_ = 0; + messageTransforms_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -771,6 +772,92 @@ public com.google.pubsub.v1.IngestionDataSourceSettings getIngestionDataSourceSe : ingestionDataSourceSettings_; } + public static final int MESSAGE_TRANSFORMS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private java.util.List messageTransforms_; + /** + * + * + *
+   * Optional. Transforms to be applied to messages published to the topic.
+   * Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getMessageTransformsList() { + return messageTransforms_; + } + /** + * + * + *
+   * Optional. Transforms to be applied to messages published to the topic.
+   * Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getMessageTransformsOrBuilderList() { + return messageTransforms_; + } + /** + * + * + *
+   * Optional. Transforms to be applied to messages published to the topic.
+   * Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getMessageTransformsCount() { + return messageTransforms_.size(); + } + /** + * + * + *
+   * Optional. Transforms to be applied to messages published to the topic.
+   * Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.MessageTransform getMessageTransforms(int index) { + return messageTransforms_.get(index); + } + /** + * + * + *
+   * Optional. Transforms to be applied to messages published to the topic.
+   * Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index) { + return messageTransforms_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -811,6 +898,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(10, getIngestionDataSourceSettings()); } + for (int i = 0; i < messageTransforms_.size(); i++) { + output.writeMessage(13, messageTransforms_.get(i)); + } getUnknownFields().writeTo(output); } @@ -859,6 +949,10 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 10, getIngestionDataSourceSettings()); } + for (int i = 0; i < messageTransforms_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(13, messageTransforms_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -896,6 +990,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIngestionDataSourceSettings().equals(other.getIngestionDataSourceSettings())) return false; } + if (!getMessageTransformsList().equals(other.getMessageTransformsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -935,6 +1030,10 @@ public int hashCode() { hash = (37 * hash) + INGESTION_DATA_SOURCE_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getIngestionDataSourceSettings().hashCode(); } + if (getMessageTransformsCount() > 0) { + hash = (37 * hash) + MESSAGE_TRANSFORMS_FIELD_NUMBER; + hash = (53 * hash) + getMessageTransformsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1098,6 +1197,7 @@ private void maybeForceBuilderInitialization() { getSchemaSettingsFieldBuilder(); getMessageRetentionDurationFieldBuilder(); getIngestionDataSourceSettingsFieldBuilder(); + getMessageTransformsFieldBuilder(); } } @@ -1130,6 +1230,13 @@ public Builder clear() { ingestionDataSourceSettingsBuilder_.dispose(); ingestionDataSourceSettingsBuilder_ = null; } + if (messageTransformsBuilder_ == null) { + messageTransforms_ = java.util.Collections.emptyList(); + } else { + messageTransforms_ = null; + messageTransformsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -1155,6 +1262,7 @@ public com.google.pubsub.v1.Topic build() { @java.lang.Override public com.google.pubsub.v1.Topic buildPartial() { com.google.pubsub.v1.Topic result = new com.google.pubsub.v1.Topic(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -1162,6 +1270,18 @@ public com.google.pubsub.v1.Topic buildPartial() { return result; } + private void buildPartialRepeatedFields(com.google.pubsub.v1.Topic result) { + if (messageTransformsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + messageTransforms_ = java.util.Collections.unmodifiableList(messageTransforms_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.messageTransforms_ = messageTransforms_; + } else { + result.messageTransforms_ = messageTransformsBuilder_.build(); + } + } + private void buildPartial0(com.google.pubsub.v1.Topic result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -1285,6 +1405,33 @@ public Builder mergeFrom(com.google.pubsub.v1.Topic other) { if (other.hasIngestionDataSourceSettings()) { mergeIngestionDataSourceSettings(other.getIngestionDataSourceSettings()); } + if (messageTransformsBuilder_ == null) { + if (!other.messageTransforms_.isEmpty()) { + if (messageTransforms_.isEmpty()) { + messageTransforms_ = other.messageTransforms_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureMessageTransformsIsMutable(); + messageTransforms_.addAll(other.messageTransforms_); + } + onChanged(); + } + } else { + if (!other.messageTransforms_.isEmpty()) { + if (messageTransformsBuilder_.isEmpty()) { + messageTransformsBuilder_.dispose(); + messageTransformsBuilder_ = null; + messageTransforms_ = other.messageTransforms_; + bitField0_ = (bitField0_ & ~0x00000200); + messageTransformsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMessageTransformsFieldBuilder() + : null; + } else { + messageTransformsBuilder_.addAllMessages(other.messageTransforms_); + } + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1374,6 +1521,19 @@ public Builder mergeFrom( bitField0_ |= 0x00000100; break; } // case 82 + case 106: + { + com.google.pubsub.v1.MessageTransform m = + input.readMessage( + com.google.pubsub.v1.MessageTransform.parser(), extensionRegistry); + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(m); + } else { + messageTransformsBuilder_.addMessage(m); + } + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2876,6 +3036,414 @@ public Builder clearIngestionDataSourceSettings() { return ingestionDataSourceSettingsBuilder_; } + private java.util.List messageTransforms_ = + java.util.Collections.emptyList(); + + private void ensureMessageTransformsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + messageTransforms_ = + new java.util.ArrayList(messageTransforms_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder> + messageTransformsBuilder_; + + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getMessageTransformsList() { + if (messageTransformsBuilder_ == null) { + return java.util.Collections.unmodifiableList(messageTransforms_); + } else { + return messageTransformsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getMessageTransformsCount() { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.size(); + } else { + return messageTransformsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform getMessageTransforms(int index) { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.get(index); + } else { + return messageTransformsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransforms(int index, com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.set(index, value); + onChanged(); + } else { + messageTransformsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMessageTransforms( + int index, com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.set(index, builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms(com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.add(value); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms(int index, com.google.pubsub.v1.MessageTransform value) { + if (messageTransformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessageTransformsIsMutable(); + messageTransforms_.add(index, value); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms( + com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addMessageTransforms( + int index, com.google.pubsub.v1.MessageTransform.Builder builderForValue) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.add(index, builderForValue.build()); + onChanged(); + } else { + messageTransformsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllMessageTransforms( + java.lang.Iterable values) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messageTransforms_); + onChanged(); + } else { + messageTransformsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMessageTransforms() { + if (messageTransformsBuilder_ == null) { + messageTransforms_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + messageTransformsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeMessageTransforms(int index) { + if (messageTransformsBuilder_ == null) { + ensureMessageTransformsIsMutable(); + messageTransforms_.remove(index); + onChanged(); + } else { + messageTransformsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder getMessageTransformsBuilder(int index) { + return getMessageTransformsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index) { + if (messageTransformsBuilder_ == null) { + return messageTransforms_.get(index); + } else { + return messageTransformsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getMessageTransformsOrBuilderList() { + if (messageTransformsBuilder_ != null) { + return messageTransformsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messageTransforms_); + } + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder addMessageTransformsBuilder() { + return getMessageTransformsFieldBuilder() + .addBuilder(com.google.pubsub.v1.MessageTransform.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.pubsub.v1.MessageTransform.Builder addMessageTransformsBuilder(int index) { + return getMessageTransformsFieldBuilder() + .addBuilder(index, com.google.pubsub.v1.MessageTransform.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Transforms to be applied to messages published to the topic.
+     * Transforms are applied in the order specified.
+     * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getMessageTransformsBuilderList() { + return getMessageTransformsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder> + getMessageTransformsFieldBuilder() { + if (messageTransformsBuilder_ == null) { + messageTransformsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.pubsub.v1.MessageTransform, + com.google.pubsub.v1.MessageTransform.Builder, + com.google.pubsub.v1.MessageTransformOrBuilder>( + messageTransforms_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + messageTransforms_ = null; + } + return messageTransformsBuilder_; + } + @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 8f58e61bd..3af29ee9f 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 @@ -388,4 +388,71 @@ java.lang.String getLabelsOrDefault( */ com.google.pubsub.v1.IngestionDataSourceSettingsOrBuilder getIngestionDataSourceSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. Transforms to be applied to messages published to the topic.
+   * Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getMessageTransformsList(); + /** + * + * + *
+   * Optional. Transforms to be applied to messages published to the topic.
+   * Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.MessageTransform getMessageTransforms(int index); + /** + * + * + *
+   * Optional. Transforms to be applied to messages published to the topic.
+   * Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getMessageTransformsCount(); + /** + * + * + *
+   * Optional. Transforms to be applied to messages published to the topic.
+   * Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getMessageTransformsOrBuilderList(); + /** + * + * + *
+   * Optional. Transforms to be applied to messages published to the topic.
+   * Transforms are applied in the order specified.
+   * 
+ * + * + * repeated .google.pubsub.v1.MessageTransform message_transforms = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.pubsub.v1.MessageTransformOrBuilder getMessageTransformsOrBuilder(int index); } 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 6ed87cbba..d63cd0a35 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 @@ -26,7 +26,6 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/pubsub/v1/schema.proto"; -option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.PubSub.V1"; option go_package = "cloud.google.com/go/pubsub/apiv1/pubsubpb;pubsubpb"; option java_multiple_files = true; @@ -674,6 +673,58 @@ message IngestionFailureEvent { } } +// User-defined JavaScript function that can transform or filter a Pub/Sub +// message. +message JavaScriptUDF { + // Required. Name of the JavasScript function that should applied to Pub/Sub + // messages. + string function_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. JavaScript code that contains a function `function_name` with the + // below signature: + // + // /** + // * Transforms a Pub/Sub message. + // + // * @return {(Object)>|null)} - To + // * filter a message, return `null`. To transform a message return a map + // * with the following keys: + // * - (required) 'data' : {string} + // * - (optional) 'attributes' : {Object} + // * Returning empty `attributes` will remove all attributes from the + // * message. + // * + // * @param {(Object)>} Pub/Sub + // * message. Keys: + // * - (required) 'data' : {string} + // * - (required) 'attributes' : {Object} + // * + // * @param {Object} metadata - Pub/Sub message metadata. + // * Keys: + // * - (required) 'message_id' : {string} + // * - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format + // * - (optional) 'ordering_key': {string} + // */ + // + // function (message, metadata) { + // } + string code = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// All supported message transforms types. +message MessageTransform { + // The type of transform to apply to messages. + oneof transform { + // Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's + // are specified on a resource, each must have a unique `function_name`. + JavaScriptUDF javascript_udf = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. If set to true, the transform is enabled. If false, the transform + // is disabled and will not be applied to messages. Defaults to `true`. + bool enabled = 3 [(google.api.field_behavior) = OPTIONAL]; +} + // A topic resource. message Topic { option (google.api.resource) = { @@ -745,6 +796,11 @@ message Topic { // Optional. Settings for ingestion from a data source into this topic. IngestionDataSourceSettings ingestion_data_source_settings = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Transforms to be applied to messages published to the topic. + // Transforms are applied in the order specified. + repeated MessageTransform message_transforms = 13 + [(google.api.field_behavior) = OPTIONAL]; } // A message that is published by publishers and consumed by subscribers. The @@ -1204,8 +1260,8 @@ message Subscription { RESOURCE_ERROR = 2; } - // Information about an associated Analytics Hub subscription - // (https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions). + // Information about an associated [Analytics Hub + // subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions). message AnalyticsHubSubscriptionInfo { // Optional. The name of the associated Analytics Hub listing resource. // Pattern: @@ -1371,6 +1427,11 @@ message Subscription { // Only set if the subscritpion is created by Analytics Hub. AnalyticsHubSubscriptionInfo analytics_hub_subscription_info = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Transforms to be applied to messages before they are delivered to + // subscribers. Transforms are applied in the order specified. + repeated MessageTransform message_transforms = 25 + [(google.api.field_behavior) = OPTIONAL]; } // A policy that specifies how Pub/Sub retries message delivery. diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/schema.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/schema.proto index d52c678c5..81d56bd7f 100644 --- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/schema.proto +++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/schema.proto @@ -23,7 +23,6 @@ import "google/api/resource.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; -option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.PubSub.V1"; option go_package = "cloud.google.com/go/pubsub/apiv1/pubsubpb;pubsubpb"; option java_multiple_files = true;