feat: add push config wrapper fields

PiperOrigin-RevId: 534994946
pull/807/head^2
Google APIs 2 years ago committed by Copybara-Service
parent 2400facb5e
commit 64ecfebcee
  1. 25
      google/pubsub/v1/pubsub.proto

@ -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;
@ -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.

Loading…
Cancel
Save