Skip to content

Commit

Permalink
feat: add BigQuery configuration for subscriptions (#1133)
Browse files Browse the repository at this point in the history
* feat: add BigQuery configuration for subscriptions

PiperOrigin-RevId: 449031535

Source-Link: googleapis/googleapis@feec34d

Source-Link: googleapis/googleapis-gen@89664e9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODk2NjRlOTcwOGMxOWQ1MzJjNjNmN2ExNmZkNzljYjYzMWQ4N2FhMSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed May 23, 2022
1 parent b5b004b commit 6f271db
Show file tree
Hide file tree
Showing 10 changed files with 2,591 additions and 300 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ public SubscriberStub getStub() {
* messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be
* `_deleted-topic_` if the topic has been deleted.
* @param pushConfig If push delivery is used with this subscription, this field is used to
* configure it. An empty `pushConfig` signifies that the subscriber will pull and ack
* messages using API methods.
* configure it. Either `pushConfig` or `bigQueryConfig` can be set, but not both. If both are
* empty, then the subscriber will pull and ack messages using API methods.
* @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits
* for the subscriber to acknowledge receipt before resending the message. In the interval
* after the message is delivered and before it is acknowledged, it is considered to be
Expand Down Expand Up @@ -303,8 +303,8 @@ public final Subscription createSubscription(
* messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be
* `_deleted-topic_` if the topic has been deleted.
* @param pushConfig If push delivery is used with this subscription, this field is used to
* configure it. An empty `pushConfig` signifies that the subscriber will pull and ack
* messages using API methods.
* configure it. Either `pushConfig` or `bigQueryConfig` can be set, but not both. If both are
* empty, then the subscriber will pull and ack messages using API methods.
* @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits
* for the subscriber to acknowledge receipt before resending the message. In the interval
* after the message is delivered and before it is acknowledged, it is considered to be
Expand Down Expand Up @@ -371,8 +371,8 @@ public final Subscription createSubscription(
* messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be
* `_deleted-topic_` if the topic has been deleted.
* @param pushConfig If push delivery is used with this subscription, this field is used to
* configure it. An empty `pushConfig` signifies that the subscriber will pull and ack
* messages using API methods.
* configure it. Either `pushConfig` or `bigQueryConfig` can be set, but not both. If both are
* empty, then the subscriber will pull and ack messages using API methods.
* @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits
* for the subscriber to acknowledge receipt before resending the message. In the interval
* after the message is delivered and before it is acknowledged, it is considered to be
Expand Down Expand Up @@ -439,8 +439,8 @@ public final Subscription createSubscription(
* messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be
* `_deleted-topic_` if the topic has been deleted.
* @param pushConfig If push delivery is used with this subscription, this field is used to
* configure it. An empty `pushConfig` signifies that the subscriber will pull and ack
* messages using API methods.
* configure it. Either `pushConfig` or `bigQueryConfig` can be set, but not both. If both are
* empty, then the subscriber will pull and ack messages using API methods.
* @param ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits
* for the subscriber to acknowledge receipt before resending the message. In the interval
* after the message is delivered and before it is acknowledged, it is considered to be
Expand Down Expand Up @@ -494,6 +494,7 @@ public final Subscription createSubscription(
* .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
* .setPushConfig(PushConfig.newBuilder().build())
* .setBigqueryConfig(BigQueryConfig.newBuilder().build())
* .setAckDeadlineSeconds(2135351438)
* .setRetainAckedMessages(true)
* .setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -752,6 +753,7 @@ public final Subscription createSubscription(
* .setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
* .setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
* .setPushConfig(PushConfig.newBuilder().build())
* .setBigqueryConfig(BigQueryConfig.newBuilder().build())
* .setAckDeadlineSeconds(2135351438)
* .setRetainAckedMessages(true)
* .setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import com.google.protobuf.FieldMask;
import com.google.protobuf.Timestamp;
import com.google.pubsub.v1.AcknowledgeRequest;
import com.google.pubsub.v1.BigQueryConfig;
import com.google.pubsub.v1.CreateSnapshotRequest;
import com.google.pubsub.v1.DeadLetterPolicy;
import com.google.pubsub.v1.DeleteSnapshotRequest;
Expand Down Expand Up @@ -140,6 +141,7 @@ public void createSubscriptionTest() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -202,6 +204,7 @@ public void createSubscriptionTest2() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -264,6 +267,7 @@ public void createSubscriptionTest3() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -326,6 +330,7 @@ public void createSubscriptionTest4() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -388,6 +393,7 @@ public void getSubscriptionTest() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -440,6 +446,7 @@ public void getSubscriptionTest2() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down Expand Up @@ -492,6 +499,7 @@ public void updateSubscriptionTest() throws Exception {
.setName(SubscriptionName.of("[PROJECT]", "[SUBSCRIPTION]").toString())
.setTopic(TopicName.ofProjectTopicName("[PROJECT]", "[TOPIC]").toString())
.setPushConfig(PushConfig.newBuilder().build())
.setBigqueryConfig(BigQueryConfig.newBuilder().build())
.setAckDeadlineSeconds(2135351438)
.setRetainAckedMessages(true)
.setMessageRetentionDuration(Duration.newBuilder().build())
Expand Down
Loading

0 comments on commit 6f271db

Please sign in to comment.