#[non_exhaustive]pub struct Subscription {Show 14 fields
pub name: String,
pub creation_time: Option<Timestamp>,
pub last_modify_time: Option<Timestamp>,
pub organization_id: String,
pub organization_display_name: String,
pub state: State,
pub linked_dataset_map: HashMap<String, LinkedResource>,
pub subscriber_contact: String,
pub linked_resources: Vec<LinkedResource>,
pub resource_type: SharedResourceType,
pub commercial_info: Option<CommercialInfo>,
pub log_linked_dataset_query_user_email: Option<bool>,
pub destination_dataset: Option<DestinationDataset>,
pub resource_name: Option<ResourceName>,
/* private fields */
}Expand description
A subscription represents a subscribers’ access to a particular set of published data. It contains references to associated listings, data exchanges, and linked datasets.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. The resource name of the subscription.
e.g. projects/myproject/locations/us/subscriptions/123.
creation_time: Option<Timestamp>Output only. Timestamp when the subscription was created.
last_modify_time: Option<Timestamp>Output only. Timestamp when the subscription was last modified.
organization_id: StringOutput only. Organization of the project this subscription belongs to.
organization_display_name: StringOutput only. Display name of the project of this subscription.
state: StateOutput only. Current state of the subscription.
linked_dataset_map: HashMap<String, 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: StringOutput only. Email of the subscriber.
linked_resources: Vec<LinkedResource>Output only. Linked resources created in the subscription. Only contains values if state = STATE_ACTIVE.
resource_type: SharedResourceTypeOutput only. Listing shared asset type.
commercial_info: Option<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: Option<bool>Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for DataExchange/Listing.
destination_dataset: Option<DestinationDataset>Optional. BigQuery destination dataset to create for the subscriber.
resource_name: Option<ResourceName>Implementations§
Source§impl Subscription
impl Subscription
pub fn new() -> Self
Sourcepub fn set_creation_time<T>(self, v: T) -> Self
pub fn set_creation_time<T>(self, v: T) -> Self
Sets the value of creation_time.
Sourcepub fn set_or_clear_creation_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_time.
Sourcepub fn set_last_modify_time<T>(self, v: T) -> Self
pub fn set_last_modify_time<T>(self, v: T) -> Self
Sets the value of last_modify_time.
Sourcepub fn set_or_clear_last_modify_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_last_modify_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of last_modify_time.
Sourcepub fn set_organization_id<T: Into<String>>(self, v: T) -> Self
pub fn set_organization_id<T: Into<String>>(self, v: T) -> Self
Sets the value of organization_id.
Sourcepub fn set_organization_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_organization_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of organization_display_name.
Sourcepub fn set_linked_dataset_map<T, K, V>(self, v: T) -> Self
pub fn set_linked_dataset_map<T, K, V>(self, v: T) -> Self
Sets the value of linked_dataset_map.
Sourcepub fn set_subscriber_contact<T: Into<String>>(self, v: T) -> Self
pub fn set_subscriber_contact<T: Into<String>>(self, v: T) -> Self
Sets the value of subscriber_contact.
Sourcepub fn set_linked_resources<T, V>(self, v: T) -> Self
pub fn set_linked_resources<T, V>(self, v: T) -> Self
Sets the value of linked_resources.
Sourcepub fn set_resource_type<T: Into<SharedResourceType>>(self, v: T) -> Self
pub fn set_resource_type<T: Into<SharedResourceType>>(self, v: T) -> Self
Sets the value of resource_type.
Sourcepub fn set_commercial_info<T>(self, v: T) -> Selfwhere
T: Into<CommercialInfo>,
pub fn set_commercial_info<T>(self, v: T) -> Selfwhere
T: Into<CommercialInfo>,
Sets the value of commercial_info.
Sourcepub fn set_or_clear_commercial_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<CommercialInfo>,
pub fn set_or_clear_commercial_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<CommercialInfo>,
Sets or clears the value of commercial_info.
Sourcepub fn set_log_linked_dataset_query_user_email<T>(self, v: T) -> Self
pub fn set_log_linked_dataset_query_user_email<T>(self, v: T) -> Self
Sets the value of log_linked_dataset_query_user_email.
Sourcepub fn set_or_clear_log_linked_dataset_query_user_email<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_log_linked_dataset_query_user_email<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of log_linked_dataset_query_user_email.
Sourcepub fn set_destination_dataset<T>(self, v: T) -> Selfwhere
T: Into<DestinationDataset>,
pub fn set_destination_dataset<T>(self, v: T) -> Selfwhere
T: Into<DestinationDataset>,
Sets the value of destination_dataset.
Sourcepub fn set_or_clear_destination_dataset<T>(self, v: Option<T>) -> Selfwhere
T: Into<DestinationDataset>,
pub fn set_or_clear_destination_dataset<T>(self, v: Option<T>) -> Selfwhere
T: Into<DestinationDataset>,
Sets or clears the value of destination_dataset.
Sourcepub fn set_resource_name<T: Into<Option<ResourceName>>>(self, v: T) -> Self
pub fn set_resource_name<T: Into<Option<ResourceName>>>(self, v: T) -> Self
Sets the value of resource_name.
Note that all the setters affecting resource_name are mutually
exclusive.
Sourcepub fn listing(&self) -> Option<&String>
pub fn listing(&self) -> Option<&String>
The value of resource_name
if it holds a Listing, None if the field is not set or
holds a different branch.
Sourcepub fn set_listing<T: Into<String>>(self, v: T) -> Self
pub fn set_listing<T: Into<String>>(self, v: T) -> Self
Sets the value of resource_name
to hold a Listing.
Note that all the setters affecting resource_name are
mutually exclusive.
Sourcepub fn data_exchange(&self) -> Option<&String>
pub fn data_exchange(&self) -> Option<&String>
The value of resource_name
if it holds a DataExchange, None if the field is not set or
holds a different branch.
Sourcepub fn set_data_exchange<T: Into<String>>(self, v: T) -> Self
pub fn set_data_exchange<T: Into<String>>(self, v: T) -> Self
Sets the value of resource_name
to hold a DataExchange.
Note that all the setters affecting resource_name are
mutually exclusive.
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§fn clone(&self) -> Subscription
fn clone(&self) -> Subscription
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more