Skip to content

Commit

Permalink
feat: add push config wrapper fields
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 534994946
  • Loading branch information
Google APIs authored and Copybara-Service committed May 24, 2023
1 parent 2400fac commit 64ecfeb
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions google/pubsub/v1/pubsub.proto
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

0 comments on commit 64ecfeb

Please sign in to comment.