Skip to content

Commit

Permalink
feat: add push config wrapper fields (#1730)
Browse files Browse the repository at this point in the history
* feat: add push config wrapper fields

PiperOrigin-RevId: 534994946

Source-Link: googleapis/googleapis@64ecfeb

Source-Link: googleapis/googleapis-gen@03534b3
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDM1MzRiM2RkNGM5MjZmNzA2NzI5ZDk3OWQ4OTM0NThkYjdlMTc0ZCJ9

* 🦉 Updates from OwlBot post-processor

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

* 🦉 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] authored May 25, 2023
1 parent 146c028 commit a552719
Show file tree
Hide file tree
Showing 4 changed files with 710 additions and 0 deletions.
25 changes: 25 additions & 0 deletions protos/google/pubsub/v1/pubsub.proto
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,19 @@ message PushConfig {
string audience = 2;
}

// The payload to the push endpoint is in the form of the JSON representation
// of a PubsubMessage
// (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
message PubsubWrapper {}

// Sets the `data` field as the HTTP body for delivery.
message NoWrapper {
// When true, writes the Pub/Sub message metadata to
// `x-goog-pubsub-<KEY>:<VAL>` headers of the HTTP request. Writes the
// Pub/Sub message attributes to `<KEY>:<VAL>` headers of the HTTP request.
bool write_metadata = 1;
}

// A URL locating the endpoint to which messages should be pushed.
// For example, a Webhook endpoint might use `https://example.com/push`.
string push_endpoint = 1;
Expand Down Expand Up @@ -940,6 +953,18 @@ message PushConfig {
// `Authorization` header in the HTTP request for every pushed message.
OidcToken oidc_token = 3;
}

// The format of the delivered message to the push endpoint is defined by
// the chosen wrapper. When unset, `PubsubWrapper` is used.
oneof wrapper {
// When set, the payload to the push endpoint is in the form of the JSON
// representation of a PubsubMessage
// (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
PubsubWrapper pubsub_wrapper = 4;

// When set, the payload to the push endpoint is not wrapped.
NoWrapper no_wrapper = 5;
}
}

// Configuration for a BigQuery subscription.
Expand Down
203 changes: 203 additions & 0 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a552719

Please sign in to comment.