# Class Subscription (0.6.0)

0.9.0 (latest) 0.8.0 0.7.0 0.6.0 0.5.20 0.4.20 0.3.2 0.2.1 0.1.1

    Subscription(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A subscription represents a subscribers' access to a
particular set of published data. It contains references to
associated listings, data exchanges, and linked datasets.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `listing` | `str` Output only. Resource name of the source Listing. e.g. projects/123/locations/us/dataExchanges/456/listings/789 This field is a member of `oneof`_ `resource_name`. |
| `data_exchange` | `str` Output only. Resource name of the source Data Exchange. e.g. projects/123/locations/us/dataExchanges/456 This field is a member of `oneof`_ `resource_name`. |
| `name` | `str` Output only. The resource name of the subscription. e.g. `projects/myproject/locations/us/subscriptions/123`. |
| `creation_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. Timestamp when the subscription was created. |
| `last_modify_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. Timestamp when the subscription was last modified. |
| `organization_id` | `str` Output only. Organization of the project this subscription belongs to. |
| `organization_display_name` | `str` Output only. Display name of the project of this subscription. |
| `state` | `https://docs.cloud.google.com/python/docs/reference/analyticshub/latest/google.cloud.bigquery_analyticshub_v1.types.Subscription.State` Output only. Current state of the subscription. |
| `linked_dataset_map` | `MutableMapping[str, https://docs.cloud.google.com/python/docs/reference/analyticshub/latest/google.cloud.bigquery_analyticshub_v1.types.Subscription.LinkedResource]` Output only. Map of listing resource names to associated linked resource, e.g. projects/123/locations/us/dataExchanges/456/listings/789 -\> projects/123/datasets/my_dataset For listing-level subscriptions, this is a map of size 1. Only contains values if state == STATE_ACTIVE. |
| `subscriber_contact` | `str` Output only. Email of the subscriber. |
| `linked_resources` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/analyticshub/latest/google.cloud.bigquery_analyticshub_v1.types.Subscription.LinkedResource]` Output only. Linked resources created in the subscription. Only contains values if state = STATE_ACTIVE. |
| `resource_type` | `https://docs.cloud.google.com/python/docs/reference/analyticshub/latest/google.cloud.bigquery_analyticshub_v1.types.SharedResourceType` Output only. Listing shared asset type. |
| `commercial_info` | `https://docs.cloud.google.com/python/docs/reference/analyticshub/latest/google.cloud.bigquery_analyticshub_v1.types.Subscription.CommercialInfo` Output only. This is set if this is a commercial subscription i.e. if this subscription was created from subscribing to a commercial listing. |
| `log_linked_dataset_query_user_email` | `bool` Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for DataExchange/Listing. This field is a member of `oneof`_ `_log_linked_dataset_query_user_email`. |
| `destination_dataset` | `https://docs.cloud.google.com/python/docs/reference/analyticshub/latest/google.cloud.bigquery_analyticshub_v1.types.DestinationDataset` Optional. BigQuery destination dataset to create for the subscriber. |

## Classes

### CommercialInfo

    CommercialInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Commercial info metadata for this subscription.

### LinkedDatasetMapEntry

    LinkedDatasetMapEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` A dictionary or message to be used to determine the values for this message. |
| `ignore_unknown_fields` | `Optional(bool)` If True, do not raise errors for unknown fields. Only applied if `mapping` is a mapping type or there are keyword parameters. |

### LinkedResource

    LinkedResource(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Reference to a linked resource tracked by this Subscription.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

### State

    State(value)

State of the subscription.