Skip to main content

Listing

Struct Listing 

Source
#[non_exhaustive]
pub struct Listing {
Show 19 fields pub name: String, pub display_name: String, pub description: String, pub primary_contact: String, pub documentation: String, pub state: State, pub icon: Bytes, pub data_provider: Option<DataProvider>, pub categories: Vec<Category>, pub publisher: Option<Publisher>, pub request_access: String, pub restricted_export_config: Option<RestrictedExportConfig>, pub stored_procedure_config: Option<StoredProcedureConfig>, pub discovery_type: Option<DiscoveryType>, pub resource_type: SharedResourceType, pub commercial_info: Option<CommercialInfo>, pub log_linked_dataset_query_user_email: Option<bool>, pub allow_only_metadata_sharing: Option<bool>, pub source: Option<Source>, /* private fields */
}
Expand description

A listing is what gets published into a data exchange that a subscriber can subscribe to. It contains a reference to the data source along with descriptive information that will help subscribers find and subscribe the data.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

Output only. The resource name of the listing. e.g. projects/myproject/locations/us/dataExchanges/123/listings/456

§display_name: String

Required. Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can’t start or end with spaces. Default value is an empty string. Max length: 63 bytes.

§description: String

Optional. Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.

§primary_contact: String

Optional. Email or URL of the primary point of contact of the listing. Max Length: 1000 bytes.

§documentation: String

Optional. Documentation describing the listing.

§state: State

Output only. Current state of the listing.

§icon: Bytes

Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API only performs validation on size of the encoded data. Note: For byte fields, the contents of the field are base64-encoded (which increases the size of the data by 33-36%) when using JSON on the wire.

§data_provider: Option<DataProvider>

Optional. Details of the data provider who owns the source data.

§categories: Vec<Category>

Optional. Categories of the listing. Up to five categories are allowed.

§publisher: Option<Publisher>

Optional. Details of the publisher who owns the listing and who can share the source data.

§request_access: String

Optional. Email or URL of the request access of the listing. Subscribers can use this reference to request access. Max Length: 1000 bytes.

§restricted_export_config: Option<RestrictedExportConfig>

Optional. If set, restricted export configuration will be propagated and enforced on the linked dataset.

§stored_procedure_config: Option<StoredProcedureConfig>

Optional. If set, stored procedure configuration will be propagated and enforced on the linked dataset.

§discovery_type: Option<DiscoveryType>

Optional. Type of discovery of the listing on the discovery page.

§resource_type: SharedResourceType

Output only. Listing shared asset type.

§commercial_info: Option<CommercialInfo>

Output only. Commercial info contains the information about the commercial data products associated with the listing.

§log_linked_dataset_query_user_email: Option<bool>

Optional. By default, false. If true, the Listing has an email sharing mandate enabled.

§allow_only_metadata_sharing: Option<bool>

Optional. If true, the listing is only available to get the resource metadata. Listing is non subscribable.

§source: Option<Source>

Listing source.

Implementations§

Source§

impl Listing

Source

pub fn new() -> Self

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

§Example
let x = Listing::new().set_name("example");
Source

pub fn set_display_name<T: Into<String>>(self, v: T) -> Self

Sets the value of display_name.

§Example
let x = Listing::new().set_display_name("example");
Source

pub fn set_description<T: Into<String>>(self, v: T) -> Self

Sets the value of description.

§Example
let x = Listing::new().set_description("example");
Source

pub fn set_primary_contact<T: Into<String>>(self, v: T) -> Self

Sets the value of primary_contact.

§Example
let x = Listing::new().set_primary_contact("example");
Source

pub fn set_documentation<T: Into<String>>(self, v: T) -> Self

Sets the value of documentation.

§Example
let x = Listing::new().set_documentation("example");
Source

pub fn set_state<T: Into<State>>(self, v: T) -> Self

Sets the value of state.

§Example
use google_cloud_bigquery_analyticshub_v1::model::listing::State;
let x0 = Listing::new().set_state(State::Active);
Source

pub fn set_icon<T: Into<Bytes>>(self, v: T) -> Self

Sets the value of icon.

§Example
let x = Listing::new().set_icon(bytes::Bytes::from_static(b"example"));
Source

pub fn set_data_provider<T>(self, v: T) -> Self
where T: Into<DataProvider>,

Sets the value of data_provider.

§Example
use google_cloud_bigquery_analyticshub_v1::model::DataProvider;
let x = Listing::new().set_data_provider(DataProvider::default()/* use setters */);
Source

pub fn set_or_clear_data_provider<T>(self, v: Option<T>) -> Self
where T: Into<DataProvider>,

Sets or clears the value of data_provider.

§Example
use google_cloud_bigquery_analyticshub_v1::model::DataProvider;
let x = Listing::new().set_or_clear_data_provider(Some(DataProvider::default()/* use setters */));
let x = Listing::new().set_or_clear_data_provider(None::<DataProvider>);
Source

pub fn set_categories<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<Category>,

Sets the value of categories.

§Example
use google_cloud_bigquery_analyticshub_v1::model::listing::Category;
let x = Listing::new().set_categories([
    Category::Others,
    Category::AdvertisingAndMarketing,
    Category::Commerce,
]);
Source

pub fn set_publisher<T>(self, v: T) -> Self
where T: Into<Publisher>,

Sets the value of publisher.

§Example
use google_cloud_bigquery_analyticshub_v1::model::Publisher;
let x = Listing::new().set_publisher(Publisher::default()/* use setters */);
Source

pub fn set_or_clear_publisher<T>(self, v: Option<T>) -> Self
where T: Into<Publisher>,

Sets or clears the value of publisher.

§Example
use google_cloud_bigquery_analyticshub_v1::model::Publisher;
let x = Listing::new().set_or_clear_publisher(Some(Publisher::default()/* use setters */));
let x = Listing::new().set_or_clear_publisher(None::<Publisher>);
Source

pub fn set_request_access<T: Into<String>>(self, v: T) -> Self

Sets the value of request_access.

§Example
let x = Listing::new().set_request_access("example");
Source

pub fn set_restricted_export_config<T>(self, v: T) -> Self

Sets the value of restricted_export_config.

§Example
use google_cloud_bigquery_analyticshub_v1::model::listing::RestrictedExportConfig;
let x = Listing::new().set_restricted_export_config(RestrictedExportConfig::default()/* use setters */);
Source

pub fn set_or_clear_restricted_export_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of restricted_export_config.

§Example
use google_cloud_bigquery_analyticshub_v1::model::listing::RestrictedExportConfig;
let x = Listing::new().set_or_clear_restricted_export_config(Some(RestrictedExportConfig::default()/* use setters */));
let x = Listing::new().set_or_clear_restricted_export_config(None::<RestrictedExportConfig>);
Source

pub fn set_stored_procedure_config<T>(self, v: T) -> Self

Sets the value of stored_procedure_config.

§Example
use google_cloud_bigquery_analyticshub_v1::model::StoredProcedureConfig;
let x = Listing::new().set_stored_procedure_config(StoredProcedureConfig::default()/* use setters */);
Source

pub fn set_or_clear_stored_procedure_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of stored_procedure_config.

§Example
use google_cloud_bigquery_analyticshub_v1::model::StoredProcedureConfig;
let x = Listing::new().set_or_clear_stored_procedure_config(Some(StoredProcedureConfig::default()/* use setters */));
let x = Listing::new().set_or_clear_stored_procedure_config(None::<StoredProcedureConfig>);
Source

pub fn set_discovery_type<T>(self, v: T) -> Self
where T: Into<DiscoveryType>,

Sets the value of discovery_type.

§Example
use google_cloud_bigquery_analyticshub_v1::model::DiscoveryType;
let x0 = Listing::new().set_discovery_type(DiscoveryType::Private);
let x1 = Listing::new().set_discovery_type(DiscoveryType::Public);
Source

pub fn set_or_clear_discovery_type<T>(self, v: Option<T>) -> Self
where T: Into<DiscoveryType>,

Sets or clears the value of discovery_type.

§Example
use google_cloud_bigquery_analyticshub_v1::model::DiscoveryType;
let x0 = Listing::new().set_or_clear_discovery_type(Some(DiscoveryType::Private));
let x1 = Listing::new().set_or_clear_discovery_type(Some(DiscoveryType::Public));
let x_none = Listing::new().set_or_clear_discovery_type(None::<DiscoveryType>);
Source

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 = Listing::new().set_resource_type(SharedResourceType::BigqueryDataset);
let x1 = Listing::new().set_resource_type(SharedResourceType::PubsubTopic);
Source

pub fn set_commercial_info<T>(self, v: T) -> Self
where T: Into<CommercialInfo>,

Sets the value of commercial_info.

§Example
use google_cloud_bigquery_analyticshub_v1::model::listing::CommercialInfo;
let x = Listing::new().set_commercial_info(CommercialInfo::default()/* use setters */);
Source

pub fn set_or_clear_commercial_info<T>(self, v: Option<T>) -> Self
where T: Into<CommercialInfo>,

Sets or clears the value of commercial_info.

§Example
use google_cloud_bigquery_analyticshub_v1::model::listing::CommercialInfo;
let x = Listing::new().set_or_clear_commercial_info(Some(CommercialInfo::default()/* use setters */));
let x = Listing::new().set_or_clear_commercial_info(None::<CommercialInfo>);
Source

pub fn set_log_linked_dataset_query_user_email<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of log_linked_dataset_query_user_email.

§Example
let x = Listing::new().set_log_linked_dataset_query_user_email(true);
Source

pub fn set_or_clear_log_linked_dataset_query_user_email<T>( self, v: Option<T>, ) -> Self
where T: Into<bool>,

Sets or clears the value of log_linked_dataset_query_user_email.

§Example
let x = Listing::new().set_or_clear_log_linked_dataset_query_user_email(Some(false));
let x = Listing::new().set_or_clear_log_linked_dataset_query_user_email(None::<bool>);
Source

pub fn set_allow_only_metadata_sharing<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of allow_only_metadata_sharing.

§Example
let x = Listing::new().set_allow_only_metadata_sharing(true);
Source

pub fn set_or_clear_allow_only_metadata_sharing<T>(self, v: Option<T>) -> Self
where T: Into<bool>,

Sets or clears the value of allow_only_metadata_sharing.

§Example
let x = Listing::new().set_or_clear_allow_only_metadata_sharing(Some(false));
let x = Listing::new().set_or_clear_allow_only_metadata_sharing(None::<bool>);
Source

pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self

Sets the value of source.

Note that all the setters affecting source are mutually exclusive.

§Example
use google_cloud_bigquery_analyticshub_v1::model::listing::BigQueryDatasetSource;
let x = Listing::new().set_source(Some(
    google_cloud_bigquery_analyticshub_v1::model::listing::Source::BigqueryDataset(BigQueryDatasetSource::default().into())));
Source

pub fn bigquery_dataset(&self) -> Option<&Box<BigQueryDatasetSource>>

The value of source if it holds a BigqueryDataset, None if the field is not set or holds a different branch.

Source

pub fn set_bigquery_dataset<T: Into<Box<BigQueryDatasetSource>>>( self, v: T, ) -> Self

Sets the value of source to hold a BigqueryDataset.

Note that all the setters affecting source are mutually exclusive.

§Example
use google_cloud_bigquery_analyticshub_v1::model::listing::BigQueryDatasetSource;
let x = Listing::new().set_bigquery_dataset(BigQueryDatasetSource::default()/* use setters */);
assert!(x.bigquery_dataset().is_some());
assert!(x.pubsub_topic().is_none());
Source

pub fn pubsub_topic(&self) -> Option<&Box<PubSubTopicSource>>

The value of source if it holds a PubsubTopic, None if the field is not set or holds a different branch.

Source

pub fn set_pubsub_topic<T: Into<Box<PubSubTopicSource>>>(self, v: T) -> Self

Sets the value of source to hold a PubsubTopic.

Note that all the setters affecting source are mutually exclusive.

§Example
use google_cloud_bigquery_analyticshub_v1::model::listing::PubSubTopicSource;
let x = Listing::new().set_pubsub_topic(PubSubTopicSource::default()/* use setters */);
assert!(x.pubsub_topic().is_some());
assert!(x.bigquery_dataset().is_none());

Trait Implementations§

Source§

impl Clone for Listing

Source§

fn clone(&self) -> Listing

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Listing

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Listing

Source§

fn default() -> Listing

Returns the “default value” for a type. Read more
Source§

impl Message for Listing

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Listing

Source§

fn eq(&self, other: &Listing) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Listing

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,