#[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
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.
§Example
use wkt::Timestamp;
let x = Subscription::new().set_creation_time(Timestamp::default()/* use setters */);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.
§Example
use wkt::Timestamp;
let x = Subscription::new().set_or_clear_creation_time(Some(Timestamp::default()/* use setters */));
let x = Subscription::new().set_or_clear_creation_time(None::<Timestamp>);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.
§Example
use wkt::Timestamp;
let x = Subscription::new().set_last_modify_time(Timestamp::default()/* use setters */);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.
§Example
use wkt::Timestamp;
let x = Subscription::new().set_or_clear_last_modify_time(Some(Timestamp::default()/* use setters */));
let x = Subscription::new().set_or_clear_last_modify_time(None::<Timestamp>);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.
§Example
let x = Subscription::new().set_organization_id("example");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.
§Example
let x = Subscription::new().set_organization_display_name("example");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.
§Example
use google_cloud_bigquery_analyticshub_v1::model::subscription::LinkedResource;
let x = Subscription::new().set_linked_dataset_map([
("key0", LinkedResource::default()/* use setters */),
("key1", LinkedResource::default()/* use (different) setters */),
]);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.
§Example
let x = Subscription::new().set_subscriber_contact("example");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.
§Example
use google_cloud_bigquery_analyticshub_v1::model::subscription::LinkedResource;
let x = Subscription::new()
.set_linked_resources([
LinkedResource::default()/* use setters */,
LinkedResource::default()/* use (different) setters */,
]);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.
§Example
use google_cloud_bigquery_analyticshub_v1::model::SharedResourceType;
let x0 = Subscription::new().set_resource_type(SharedResourceType::BigqueryDataset);
let x1 = Subscription::new().set_resource_type(SharedResourceType::PubsubTopic);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.
§Example
use google_cloud_bigquery_analyticshub_v1::model::subscription::CommercialInfo;
let x = Subscription::new().set_commercial_info(CommercialInfo::default()/* use setters */);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.
§Example
use google_cloud_bigquery_analyticshub_v1::model::subscription::CommercialInfo;
let x = Subscription::new().set_or_clear_commercial_info(Some(CommercialInfo::default()/* use setters */));
let x = Subscription::new().set_or_clear_commercial_info(None::<CommercialInfo>);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.
§Example
let x = Subscription::new().set_log_linked_dataset_query_user_email(true);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.
§Example
let x = Subscription::new().set_or_clear_log_linked_dataset_query_user_email(Some(false));
let x = Subscription::new().set_or_clear_log_linked_dataset_query_user_email(None::<bool>);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.
§Example
use google_cloud_bigquery_analyticshub_v1::model::DestinationDataset;
let x = Subscription::new().set_destination_dataset(DestinationDataset::default()/* use setters */);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.
§Example
use google_cloud_bigquery_analyticshub_v1::model::DestinationDataset;
let x = Subscription::new().set_or_clear_destination_dataset(Some(DestinationDataset::default()/* use setters */));
let x = Subscription::new().set_or_clear_destination_dataset(None::<DestinationDataset>);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.
§Example
use google_cloud_bigquery_analyticshub_v1::model::subscription::ResourceName;
let x = Subscription::new().set_resource_name(Some(ResourceName::Listing("example".to_string())));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.
§Example
let x = Subscription::new().set_listing("example");
assert!(x.listing().is_some());
assert!(x.data_exchange().is_none());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.
§Example
let x = Subscription::new().set_data_exchange("example");
assert!(x.data_exchange().is_some());
assert!(x.listing().is_none());Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§fn clone(&self) -> Subscription
fn clone(&self) -> Subscription
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Subscription
impl Debug for Subscription
Source§impl Default for Subscription
impl Default for Subscription
Source§fn default() -> Subscription
fn default() -> Subscription
Source§impl Message for Subscription
impl Message for Subscription
Source§impl PartialEq for Subscription
impl PartialEq for Subscription
impl StructuralPartialEq for Subscription
Auto Trait Implementations§
impl Freeze for Subscription
impl RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnsafeUnpin for Subscription
impl UnwindSafe for Subscription
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request