':param project: the GCP project name or ID in which to work
(templated)
:type project: string
:param topic: the topic to which to publish. Do not include the
full topic path. In other words, instead of
``projects/{project}/topics/{topic}``, provide only
``{topic}``. (templated)
:type topic: string
:param messages: a list of messages to be published to the
topic. Each message is a dict with one or more of the
following keys-value mappings:
* \'data\': a base64-encoded string
* \'attributes\': {\'key1\': \'value1\', ...}
Each message must contain at least a non-empty \'data\' value
or an attribute dict with at least one key. See
https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage
(templated)
:type messages: list
:param gcp_conn_id: The connection ID to use connecting to
Google Cloud Platform.
:type gcp_conn_id: string
:param delegate_to: The account to impersonate, if any.
For this to work, the service account making the request
must have domain-wide delegation enabled.
:type delegate_to: string'

@apply_defaults
def __init__(self, project, topic, messages, gcp_conn_id='google_cloud_default', delegate_to=None, *args, **kwargs):

    super(PubSubPublishOperator, self).__init__(*args, **kwargs)
    self.gcp_conn_id = gcp_conn_id
    self.delegate_to = delegate_to
    self.project = project
    self.topic = topic
    self.messages = messages
