{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-pubsub/json-schema/google-cloud-pubsub-subscription-schema.json",
  "title": "Subscription",
  "description": "A subscription resource. If none of `push_config`, `bigquery_config`, `cloud_storage_config`, or `bigtable_config` is set, then the subscriber will pull and ack messages using API methods. At most one of these fields may be set.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-pubsub-pubsub-projects-api-openapi.yml#/components/schemas/Subscription",
  "type": "object",
  "properties": {
    "detached": {
      "description": "Optional. 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.",
      "type": "boolean"
    },
    "bigtableConfig": {
      "$ref": "#/$defs/BigtableConfig",
      "description": "Optional. If delivery to Bigtable is used with this subscription, this field is used to configure it."
    },
    "cloudStorageConfig": {
      "$ref": "#/$defs/CloudStorageConfig",
      "description": "Optional. If delivery to Google Cloud Storage is used with this subscription, this field is used to configure it."
    },
    "retainAckedMessages": {
      "description": "Optional. 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.",
      "type": "boolean"
    },
    "enableExactlyOnceDelivery": {
      "type": "boolean",
      "description": "Optional. 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 acknowledgment 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."
    },
    "filter": {
      "description": "Optional. 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.",
      "type": "string"
    },
    "expirationPolicy": {
      "$ref": "#/$defs/ExpirationPolicy",
      "description": "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."
    },
    "topic": {
      "description": "Required. The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be `_deleted-topic_` if the topic has been deleted.",
      "type": "string"
    },
    "state": {
      "readOnly": true,
      "type": "string",
      "enum": [
        "STATE_UNSPECIFIED",
        "ACTIVE",
        "RESOURCE_ERROR"
      ],
      "description": "Output only. An output-only field indicating whether or not the subscription can receive messages."
    },
    "enableMessageOrdering": {
      "type": "boolean",
      "description": "Optional. 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."
    },
    "deadLetterPolicy": {
      "$ref": "#/$defs/DeadLetterPolicy",
      "description": "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."
    },
    "bigqueryConfig": {
      "$ref": "#/$defs/BigQueryConfig",
      "description": "Optional. If delivery to BigQuery is used with this subscription, this field is used to configure it."
    },
    "messageTransforms": {
      "items": {
        "$ref": "#/$defs/MessageTransform"
      },
      "description": "Optional. Transforms to be applied to messages before they are delivered to subscribers. Transforms are applied in the order specified.",
      "type": "array"
    },
    "tags": {
      "description": "Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\" See https://{$universe.dns_names.final_documentation_domain}/pubsub/docs/tags for more information on using tags with Pub/Sub resources.",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "ackDeadlineSeconds": {
      "type": "integer",
      "format": "int32",
      "description": "Optional. 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."
    },
    "analyticsHubSubscriptionInfo": {
      "$ref": "#/$defs/AnalyticsHubSubscriptionInfo",
      "description": "Output only. Information about the associated Analytics Hub subscription. Only set if the subscription is created by Analytics Hub."
    },
    "retryPolicy": {
      "$ref": "#/$defs/RetryPolicy",
      "description": "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 acknowledgment deadline exceeded events for a given message."
    },
    "name": {
      "type": "string",
      "description": "Required. Identifier. The name of the subscription. It must have the format `\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`."
    },
    "pushConfig": {
      "$ref": "#/$defs/PushConfig",
      "description": "Optional. If push delivery is used with this subscription, this field is used to configure it."
    },
    "labels": {
      "description": "Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "messageRetentionDuration": {
      "description": "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.",
      "format": "google-duration",
      "type": "string"
    },
    "topicMessageRetentionDuration": {
      "description": "Output only. Indicates the minimum duration for which a message is retained after it is published to the subscription's topic. If this field is set, messages published to the subscription's topic in the last `topic_message_retention_duration` are always available to subscribers. See the `message_retention_duration` field in `Topic`. This field is set only in responses from the server; it is ignored if it is set in any requests.",
      "type": "string",
      "format": "google-duration",
      "readOnly": true
    }
  },
  "$defs": {
    "AIInference": {
      "type": "object",
      "properties": {
        "serviceAccountEmail": {
          "description": "Optional. The service account to use to make prediction requests against endpoints. The resource 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.",
          "type": "string"
        },
        "unstructuredInference": {
          "$ref": "#/$defs/UnstructuredInference",
          "description": "Optional. Requests and responses can be any arbitrary JSON object."
        },
        "endpoint": {
          "type": "string",
          "description": "Required. An endpoint to a Vertex AI model of the form `projects/{project}/locations/{location}/endpoints/{endpoint}` or `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`. Vertex AI API requests will be sent to this endpoint."
        }
      },
      "description": "Configuration for making inference requests against Vertex AI models."
    },
    "AnalyticsHubSubscriptionInfo": {
      "description": "Information about an associated [Analytics Hub subscription](https://cloud.google.com/bigquery/docs/analytics-hub-manage-subscriptions).",
      "type": "object",
      "properties": {
        "listing": {
          "description": "Optional. The name of the associated Analytics Hub listing resource. Pattern: \"projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}\"",
          "type": "string"
        },
        "subscription": {
          "type": "string",
          "description": "Optional. The name of the associated Analytics Hub subscription resource. Pattern: \"projects/{project}/locations/{location}/subscriptions/{subscription}\""
        }
      }
    },
    "AvroConfig": {
      "type": "object",
      "properties": {
        "writeMetadata": {
          "description": "Optional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key as additional fields in the output. The subscription name, message_id, and publish_time fields are put in their own fields while all other message properties other than data (for example, an ordering_key, if present) are added as entries in the attributes map.",
          "type": "boolean"
        },
        "useTopicSchema": {
          "description": "Optional. When true, the output Cloud Storage file will be serialized using the topic schema, if it exists.",
          "type": "boolean"
        }
      },
      "description": "Configuration for writing message data in Avro format. Message payloads and metadata will be written to files as an Avro binary."
    },
    "BigQueryConfig": {
      "properties": {
        "table": {
          "description": "Optional. The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}",
          "type": "string"
        },
        "useTableSchema": {
          "description": "Optional. 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.",
          "type": "boolean"
        },
        "state": {
          "enum": [
            "STATE_UNSPECIFIED",
            "ACTIVE",
            "PERMISSION_DENIED",
            "NOT_FOUND",
            "SCHEMA_MISMATCH",
            "IN_TRANSIT_LOCATION_RESTRICTION",
            "VERTEX_AI_LOCATION_RESTRICTION"
          ],
          "type": "string",
          "readOnly": true,
          "description": "Output only. An output-only field that indicates whether or not the subscription can receive messages."
        },
        "serviceAccountEmail": {
          "description": "Optional. 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.",
          "type": "string"
        },
        "useTopicSchema": {
          "type": "boolean",
          "description": "Optional. 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."
        },
        "dropUnknownFields": {
          "description": "Optional. If true and `use_topic_schema` is true, drops any fields that are part of the topic schema that are not part of the BigQuery table schema 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. If true and `use_table_schema` is true, drops any fields in the message that are not part of the BigQuery table schema when writing to BigQuery. Otherwise, the write to BigQuery will fail.",
          "type": "boolean"
        },
        "writeMetadata": {
          "type": "boolean",
          "description": "Optional. 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."
        }
      },
      "description": "Configuration for a BigQuery subscription.",
      "type": "object"
    },
    "BigtableConfig": {
      "type": "object",
      "properties": {
        "writeMetadata": {
          "description": "Optional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key to additional columns in the table under the pubsub_metadata column family. 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.",
          "type": "boolean"
        },
        "appProfileId": {
          "description": "Optional. The app profile to use for the Bigtable writes. If not specified, the \"default\" application profile will be used. The app profile must use single-cluster routing.",
          "type": "string"
        },
        "serviceAccountEmail": {
          "type": "string",
          "description": "Optional. The service account to use to write to Bigtable. 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."
        },
        "state": {
          "readOnly": true,
          "enum": [
            "STATE_UNSPECIFIED",
            "ACTIVE",
            "NOT_FOUND",
            "APP_PROFILE_MISCONFIGURED",
            "PERMISSION_DENIED",
            "SCHEMA_MISMATCH",
            "IN_TRANSIT_LOCATION_RESTRICTION",
            "VERTEX_AI_LOCATION_RESTRICTION"
          ],
          "type": "string",
          "description": "Output only. An output-only field that indicates whether or not the subscription can receive messages."
        },
        "columnFamilyMapping": {
          "$ref": "#/$defs/ColumnFamilyMapping",
          "description": "Optional. Configuration that allows writing row keys and/or columns based on fields in the input message. The input message format must be JSON if this field is set."
        },
        "table": {
          "description": "Optional. The unique name of the table to write messages to. Values are of the form `projects//instances//tables/`.",
          "type": "string"
        }
      },
      "description": "Configuration for a Bigtable subscription, which will write a Pub/Sub message to a Bigtable row. See the ColumnFamilyMapping documentation below for details on how the row keys and columns will be written."
    },
    "CloudStorageConfig": {
      "properties": {
        "textConfig": {
          "$ref": "#/$defs/TextConfig",
          "description": "Optional. If set, message data will be written to Cloud Storage in text format."
        },
        "filenameDatetimeFormat": {
          "type": "string",
          "description": "Optional. 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)."
        },
        "bucket": {
          "description": "Required. 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).",
          "type": "string"
        },
        "maxMessages": {
          "type": "string",
          "description": "Optional. The maximum number of messages that can be written to a Cloud Storage file before a new file is created. Min 1000 messages.",
          "format": "int64"
        },
        "avroConfig": {
          "$ref": "#/$defs/AvroConfig",
          "description": "Optional. If set, message data will be written to Cloud Storage in Avro format."
        },
        "filenameSuffix": {
          "description": "Optional. User-provided suffix for Cloud Storage filename. See the [object naming requirements](https://cloud.google.com/storage/docs/objects#naming). Must not end in \"/\".",
          "type": "string"
        },
        "filenamePrefix": {
          "description": "Optional. User-provided prefix for Cloud Storage filename. See the [object naming requirements](https://cloud.google.com/storage/docs/objects#naming).",
          "type": "string"
        },
        "serviceAccountEmail": {
          "description": "Optional. 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.",
          "type": "string"
        },
        "state": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. An output-only field that indicates whether or not the subscription can receive messages.",
          "enum": [
            "STATE_UNSPECIFIED",
            "ACTIVE",
            "PERMISSION_DENIED",
            "NOT_FOUND",
            "IN_TRANSIT_LOCATION_RESTRICTION",
            "SCHEMA_MISMATCH",
            "VERTEX_AI_LOCATION_RESTRICTION"
          ]
        },
        "maxDuration": {
          "description": "Optional. 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 acknowledgment deadline.",
          "format": "google-duration",
          "type": "string"
        },
        "maxBytes": {
          "format": "int64",
          "type": "string",
          "description": "Optional. 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."
        }
      },
      "description": "Configuration for a Cloud Storage subscription.",
      "type": "object"
    },
    "ColumnFamilyMapping": {
      "description": "Configuration for writing a Pub/Sub message to a Bigtable row with a user-defined key and writing to column families. If this field is set: - The subscription messages must be formatted as JSON. - The row key mapping is configured in the `key_definition` section. - The top-level fields will be written either: - By default, they will be written to the `data` column family with the field name as the column qualifier. - But if the field name matches an existing column family (except for the default `data` column), then that field will be written to that column family, either as a scalar or its next level nested fields if it's a JSON object. - The cell timestamp will be the message publish timestamp. If the field is not set, the default behavior is to write: - row key: subscription name, message ID hash, and message ID delimited by `#`. - columns: message bytes written to a single column family `data` with an empty-string column qualifier. - cell timestamp: the message publish timestamp.",
      "type": "object",
      "properties": {
        "rowKeySchema": {
          "$ref": "#/$defs/RowKeySchema",
          "description": "Optional. If set, the row key is constructed from the field names of the table's structured row key ({$universe.dns_names.final_documentation_domain}/bigtable/docs/manage-row-key-schemas). Note that if the field is nullable in the structured row key, then it need not be present in the message; null will be used instead."
        },
        "delimitedKey": {
          "$ref": "#/$defs/DelimitedKey",
          "description": "Optional. If set, the row key is constructed from the given key fields and delimiter. All key fields must be present in the message; otherwise, the message remains in the subscription backlog."
        }
      }
    },
    "Compression": {
      "description": "Configuration for compressing/decompressing message data using a user-specified compression algorithm.",
      "type": "object",
      "properties": {
        "compressionAlgorithm": {
          "description": "Required. Specifies the compression algorithm to use.",
          "type": "string",
          "enum": [
            "COMPRESSION_ALGORITHM_UNSPECIFIED",
            "ZLIB"
          ]
        },
        "compressionMode": {
          "type": "string",
          "enum": [
            "COMPRESSION_MODE_UNSPECIFIED",
            "COMPRESS",
            "DECOMPRESS"
          ],
          "description": "Required. Specifies whether to compress or decompress the message."
        }
      }
    },
    "DeadLetterPolicy": {
      "type": "object",
      "description": "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.",
      "properties": {
        "deadLetterTopic": {
          "description": "Optional. 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.",
          "type": "string"
        },
        "maxDeliveryAttempts": {
          "format": "int32",
          "type": "integer",
          "description": "Optional. 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 acknowledgment 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."
        }
      }
    },
    "DelimitedKey": {
      "type": "object",
      "description": "Row key definition based on fields from the message.",
      "properties": {
        "keyFields": {
          "type": "array",
          "description": "Required. The key fields to construct from the row key. The fields must be present in the message as a top-level field, i.e. JSON path expressions will not traverse into nested objects.",
          "items": {
            "type": "string"
          }
        },
        "delimiter": {
          "description": "Optional. Byte sequence used to delimit concatenated fields. Must be specified if multiple key fields are used. The delimiter must contain at least 1 character and at most 50 characters.",
          "type": "string",
          "format": "byte"
        }
      }
    },
    "ExpirationPolicy": {
      "properties": {
        "ttl": {
          "format": "google-duration",
          "description": "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.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "A policy that specifies the conditions for resource expiration (i.e., automatic resource deletion)."
    },
    "JavaScriptUDF": {
      "description": "User-defined JavaScript function that can transform or filter a Pub/Sub message.",
      "type": "object",
      "properties": {
        "code": {
          "description": "Required. JavaScript code that contains a function `function_name` with the below signature: ``` /** * Transforms a Pub/Sub message. * @return {(Object)>|null)} - To * filter a message, return `null`. To transform a message return a map * with the following keys: * - (required) 'data' : {string} * - (optional) 'attributes' : {Object} * Returning empty `attributes` will remove all attributes from the * message. * * @param {(Object)>} Pub/Sub * message. Keys: * - (required) 'data' : {string} * - (required) 'attributes' : {Object} * * @param {Object} metadata - Pub/Sub message metadata. * Keys: * - (optional) 'message_id' : {string} * - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string} */ function (message, metadata) { } ```",
          "type": "string"
        },
        "functionName": {
          "description": "Required. Name of the JavasScript function that should applied to Pub/Sub messages.",
          "type": "string"
        }
      }
    },
    "MessageTransform": {
      "properties": {
        "javascriptUdf": {
          "$ref": "#/$defs/JavaScriptUDF",
          "description": "Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's are specified on a resource, each must have a unique `function_name`."
        },
        "enabled": {
          "type": "boolean",
          "description": "Optional. This field is deprecated, use the `disabled` field to disable transforms.",
          "deprecated": true
        },
        "disabled": {
          "type": "boolean",
          "description": "Optional. If true, the transform is disabled and will not be applied to messages. Defaults to `false`."
        },
        "compression": {
          "$ref": "#/$defs/Compression",
          "description": "Optional. Compression/Decompression."
        },
        "aiInference": {
          "$ref": "#/$defs/AIInference",
          "description": "Optional. AI Inference. Specifies the Vertex AI endpoint that inference requests built from the Pub/Sub message data and provided parameters will be sent to."
        }
      },
      "description": "All supported message transforms types.",
      "type": "object"
    },
    "NoWrapper": {
      "type": "object",
      "properties": {
        "writeMetadata": {
          "description": "Optional. When true, writes the Pub/Sub message metadata to `x-goog-pubsub-:` headers of the HTTP request. Writes the Pub/Sub message attributes to `:` headers of the HTTP request.",
          "type": "boolean"
        }
      },
      "description": "Sets the `data` field as the HTTP body for delivery."
    },
    "OidcToken": {
      "properties": {
        "audience": {
          "description": "Optional. Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.",
          "type": "string"
        },
        "serviceAccountEmail": {
          "description": "Optional. [Service account email](https://cloud.google.com/iam/docs/service-accounts) used for generating the OIDC token. For more information on setting up authentication, see [Push subscriptions](https://cloud.google.com/pubsub/docs/push).",
          "type": "string"
        }
      },
      "description": "Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect).",
      "type": "object"
    },
    "PubsubWrapper": {
      "description": "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).",
      "type": "object",
      "properties": {}
    },
    "PushConfig": {
      "description": "Configuration for a push delivery endpoint.",
      "properties": {
        "attributes": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "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\" }`"
        },
        "oidcToken": {
          "$ref": "#/$defs/OidcToken",
          "description": "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."
        },
        "pubsubWrapper": {
          "$ref": "#/$defs/PubsubWrapper",
          "description": "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)."
        },
        "noWrapper": {
          "$ref": "#/$defs/NoWrapper",
          "description": "Optional. When set, the payload to the push endpoint is not wrapped."
        },
        "pushEndpoint": {
          "description": "Optional. A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use `https://example.com/push`.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "RetryPolicy": {
      "properties": {
        "minimumBackoff": {
          "type": "string",
          "description": "Optional. The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.",
          "format": "google-duration"
        },
        "maximumBackoff": {
          "format": "google-duration",
          "type": "string",
          "description": "Optional. The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds."
        }
      },
      "description": "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 acknowledgment 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.",
      "type": "object"
    },
    "RowKeySchema": {
      "properties": {},
      "type": "object",
      "description": "Row key definition that reads the input message fields based on the field names of the table's structured row key ({$universe.dns_names.final_documentation_domain}/bigtable/docs/manage-row-key-schemas). Note that if the field is nullable in the structured row key, then it need not be present in the message; null will be used instead."
    },
    "TextConfig": {
      "description": "Configuration for writing message data in text format. Message payloads will be written to files as raw text, separated by a newline.",
      "type": "object",
      "properties": {}
    },
    "UnstructuredInference": {
      "type": "object",
      "description": "Configuration for making inferences using arbitrary JSON payloads.",
      "properties": {
        "parameters": {
          "type": "object",
          "description": "Optional. A parameters object to be included in each inference request. The parameters object is combined with the data field of the Pub/Sub message to form the inference request.",
          "additionalProperties": {
            "description": "Properties of the object."
          }
        }
      }
    }
  }
}