NAME
Google::Cloud::Bigquery::Analyticshub::V1::Pubsub - Compiled Protocol Buffers messages for google/cloud/bigquery/analyticshub/v1/pubsub.proto
SYNOPSIS
use Google::Cloud::Bigquery::Analyticshub::V1::Pubsub;
my $msg = Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::PubSubSubscription->new({
name => $name,
push_config => $push_config,
bigquery_config => $bigquery_config,
cloud_storage_config => $cloud_storage_config,
});
# Read or update a field
my $val = $msg->name();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::PubSubSubscription->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/bigquery/analyticshub/v1/pubsub.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::PubSubSubscription
Defines the destination Pub/Sub subscription. If none of `push_config`, `bigquery_config`, `cloud_storage_config`, `pubsub_export_config`, or `pubsublite_export_config` is set, then the subscriber will pull and ack messages using API methods. At most one of these fields may be set.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. Name of the subscription. Format is `projects/{project}/subscriptions/{sub}`.
$msg->push_config()/$msg->push_config($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::PushConfig)Optional. If push delivery is used with this subscription, this field is used to configure it.
$msg->bigquery_config()/$msg->bigquery_config($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::BigQueryConfig)Optional. If delivery to BigQuery is used with this subscription, this field is used to configure it.
$msg->cloud_storage_config()/$msg->cloud_storage_config($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::CloudStorageConfig)Optional. If delivery to Google Cloud Storage is used with this subscription, this field is used to configure it.
$msg->ack_deadline_seconds()/$msg->ack_deadline_seconds($value)Type:
Int32Optional. 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 _outstanding_. During that time period, the message will not be redelivered (on a best-effort basis).
For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id` if using non-streaming pull or send the `ack_id` in a `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used.
For push delivery, this value is also used to set the request timeout for the call to the push endpoint.
If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.
$msg->retain_acked_messages()/$msg->retain_acked_messages($value)Type:
BoolOptional. Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the `message_retention_duration` window. This must be true if you would like to [`Seek` to a timestamp] (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in the past to replay previously-acknowledged messages.
$msg->message_retention_duration()/$msg->message_retention_duration($value)Type:
Message(Google::Protobuf::Duration::Duration)Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 31 days or less than 10 minutes.
$msg->labels()/$msg->labels($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::PubSubSubscription::LabelsEntry)Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
$msg->enable_message_ordering()/$msg->enable_message_ordering($value)Type:
BoolOptional. If true, messages published with the same `ordering_key` in `PubsubMessage` will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order.
$msg->expiration_policy()/$msg->expiration_policy($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::ExpirationPolicy)Optional. A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If `expiration_policy` is not set, a *default policy* with `ttl` of 31 days will be used. The minimum allowed value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set, but `expiration_policy.ttl` is not set, the subscription never expires.
$msg->filter()/$msg->filter($value)Type:
StringOptional. An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only `PubsubMessage`s whose `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.
$msg->dead_letter_policy()/$msg->dead_letter_policy($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::DeadLetterPolicy)Optional. A policy that specifies the conditions for dead lettering messages in this subscription. If dead_letter_policy is not set, dead lettering is disabled.
The Pub/Sub service account associated with this subscriptions's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription.
$msg->retry_policy()/$msg->retry_policy($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::RetryPolicy)Optional. A policy that specifies how Pub/Sub retries message delivery for this subscription.
If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.
$msg->detached()/$msg->detached($value)Type:
BoolOptional. Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. `Pull` and `StreamingPull` requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made.
$msg->enable_exactly_once_delivery()/$msg->enable_exactly_once_delivery($value)Type:
BoolOptional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription:
* The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires. * An acknowledged message will not be resent to a subscriber.
Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values.
$msg->message_transforms()/$msg->message_transforms($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::MessageTransform)Optional. Transforms to be applied to messages before they are delivered to subscribers. Transforms are applied in the order specified.
$msg->tags()/$msg->tags($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::PubSubSubscription::TagsEntry)Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::RetryPolicy
A policy that specifies how Pub/Sub retries message delivery.
Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.
Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.
Inherits from Protobuf::Message.
Accessors
$msg->minimum_backoff()/$msg->minimum_backoff($value)Type:
Message(Google::Protobuf::Duration::Duration)Optional. The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.
$msg->maximum_backoff()/$msg->maximum_backoff($value)Type:
Message(Google::Protobuf::Duration::Duration)Optional. The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.
Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::DeadLetterPolicy
Dead lettering is done on a best effort basis. The same message might be dead lettered multiple times.
If validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail.
Inherits from Protobuf::Message.
Accessors
$msg->dead_letter_topic()/$msg->dead_letter_topic($value)Type:
StringOptional. The name of the topic to which dead letter messages should be published. Format is `projects/{project}/topics/{topic}`.The Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic.
The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.
$msg->max_delivery_attempts()/$msg->max_delivery_attempts($value)Type:
Int32Optional. The maximum number of delivery attempts for any message. The value must be between 5 and 100.
The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message).
A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines.
This field will be honored on a best effort basis.
If this parameter is 0, a default value of 5 is used.
Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::ExpirationPolicy
A policy that specifies the conditions for resource expiration (i.e., automatic resource deletion).
Inherits from Protobuf::Message.
Accessors
$msg->ttl()/$msg->ttl($value)Type:
Message(Google::Protobuf::Duration::Duration)Optional. Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of `ttl`. The definition of "activity" depends on the type of the associated resource. The minimum and maximum allowed values for `ttl` depend on the type of the associated resource, as well. If `ttl` is not set, the associated resource never expires.
Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::PushConfig
Configuration for a push delivery endpoint.
Inherits from Protobuf::Message.
Accessors
$msg->oidc_token()/$msg->oidc_token($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::PushConfig::OidcToken)Optional. If specified, Pub/Sub will generate and attach an OIDC JWT token as an `Authorization` header in the HTTP request for every pushed message.
$msg->pubsub_wrapper()/$msg->pubsub_wrapper($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::PushConfig::PubsubWrapper)Optional. 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).
$msg->no_wrapper()/$msg->no_wrapper($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::PushConfig::NoWrapper)Optional. When set, the payload to the push endpoint is not wrapped.
$msg->push_endpoint()/$msg->push_endpoint($value)Type:
StringOptional. A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use `https://example.com/push`.
$msg->attributes()/$msg->attributes($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::PushConfig::AttributesEntry)Optional. Endpoint configuration attributes that can be used to control different aspects of the message delivery.
The only currently supported attribute is `x-goog-version`, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata).
If not present during the `CreateSubscription` call, it will default to the version of the Pub/Sub API used to make such call. If not present in a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute.
The only supported values for the `x-goog-version` attribute are:
* `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
For example: `attributes { "x-goog-version": "v1" }`
Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::BigQueryConfig
Configuration for a BigQuery subscription.
Inherits from Protobuf::Message.
Accessors
$msg->table()/$msg->table($value)Type:
StringOptional. The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}
$msg->use_topic_schema()/$msg->use_topic_schema($value)Type:
BoolOptional. When true, use the topic's schema as the columns to write to in BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be enabled at the same time.
$msg->write_metadata()/$msg->write_metadata($value)Type:
BoolOptional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key to additional columns in the table. The subscription name, message_id, and publish_time fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.
$msg->drop_unknown_fields()/$msg->drop_unknown_fields($value)Type:
BoolOptional. When true and use_topic_schema is true, any fields that are a part of the topic schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.
$msg->use_table_schema()/$msg->use_table_schema($value)Type:
BoolOptional. When true, use the BigQuery table's schema as the columns to write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be enabled at the same time.
$msg->service_account_email()/$msg->service_account_email($value)Type:
StringOptional. The service account to use to write to BigQuery. The subscription creator or updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the service account. If not specified, the Pub/Sub [service agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::CloudStorageConfig
Configuration for a Cloud Storage subscription.
Inherits from Protobuf::Message.
Accessors
$msg->text_config()/$msg->text_config($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::CloudStorageConfig::TextConfig)Optional. If set, message data will be written to Cloud Storage in text format.
$msg->avro_config()/$msg->avro_config($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::CloudStorageConfig::AvroConfig)Optional. If set, message data will be written to Cloud Storage in Avro format.
$msg->bucket()/$msg->bucket($value)Type:
StringRequired. User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://". See the [bucket naming requirements] (https://cloud.google.com/storage/docs/buckets#naming).
$msg->filename_prefix()/$msg->filename_prefix($value)Type:
StringOptional. User-provided prefix for Cloud Storage filename. See the [object naming requirements](https://cloud.google.com/storage/docs/objects#naming).
$msg->filename_suffix()/$msg->filename_suffix($value)Type:
StringOptional. User-provided suffix for Cloud Storage filename. See the [object naming requirements](https://cloud.google.com/storage/docs/objects#naming). Must not end in "/".
$msg->filename_datetime_format()/$msg->filename_datetime_format($value)Type:
StringOptional. User-provided format string specifying how to represent datetimes in Cloud Storage filenames. See the [datetime format guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).
$msg->max_duration()/$msg->max_duration($value)Type:
Message(Google::Protobuf::Duration::Duration)Optional. File batching settings. If no max_duration setting is specified, a max_duration of 5 minutes will be set by default. max_duration is required regardless of whether other file batching settings are specified.
The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.
$msg->max_bytes()/$msg->max_bytes($value)Type:
Int64Optional. The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are larger than the limit.
$msg->max_messages()/$msg->max_messages($value)Type:
Int64Optional. The maximum number of messages that can be written to a Cloud Storage file before a new file is created. Min 1000 messages.
$msg->service_account_email()/$msg->service_account_email($value)Type:
StringOptional. The service account to use to write to Cloud Storage. The subscription creator or updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the service account. If not specified, the Pub/Sub [service agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::MessageTransform
All supported message transforms types.
Inherits from Protobuf::Message.
Accessors
$msg->javascript_udf()/$msg->javascript_udf($value)Type:
Message(Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::JavaScriptUDF)Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's are specified on a resource, each must have a unique `function_name`.
$msg->enabled()/$msg->enabled($value)Type:
BoolOptional. This field is deprecated, use the `disabled` field to disable transforms.
$msg->disabled()/$msg->disabled($value)Type:
BoolOptional. If true, the transform is disabled and will not be applied to messages. Defaults to `false`.
Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::JavaScriptUDF
User-defined JavaScript function that can transform or filter a Pub/Sub message.
Inherits from Protobuf::Message.
Accessors
$msg->function_name()/$msg->function_name($value)Type:
StringRequired. Name of the JavasScript function that should applied to Pub/Sub messages.
$msg->code()/$msg->code($value)Type:
StringRequired. 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) { } ```
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Bigquery::Analyticshub::V1::Pubsub::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.