#[non_exhaustive]pub struct BigQueryConfig {
pub table: String,
pub use_topic_schema: bool,
pub write_metadata: bool,
pub drop_unknown_fields: bool,
pub state: State,
pub use_table_schema: bool,
pub service_account_email: String,
/* private fields */
}Expand description
Configuration for a BigQuery subscription.
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.table: StringOptional. The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}
use_topic_schema: boolOptional. When true, use the topic’s schema as the columns to write to in
BigQuery, if it exists. use_topic_schema and use_table_schema cannot be
enabled at the same time.
write_metadata: boolOptional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key to additional columns in the table. The subscription name, message_id, and publish_time fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.
drop_unknown_fields: boolOptional. When true and use_topic_schema is true, any fields that are a part of the topic schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription’s backlog.
state: StateOutput only. An output-only field that indicates whether or not the subscription can receive messages.
use_table_schema: boolOptional. When true, use the BigQuery table’s schema as the columns to
write to in BigQuery. use_table_schema and use_topic_schema cannot be
enabled at the same time.
service_account_email: StringOptional. The service account to use to write to BigQuery. The subscription
creator or updater that specifies this field must have
iam.serviceAccounts.actAs permission on the service account. If not
specified, the Pub/Sub service
agent,
service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
Implementations§
Source§impl BigQueryConfig
impl BigQueryConfig
pub fn new() -> Self
Sourcepub fn set_use_topic_schema<T: Into<bool>>(self, v: T) -> Self
pub fn set_use_topic_schema<T: Into<bool>>(self, v: T) -> Self
Sets the value of use_topic_schema.
§Example
let x = BigQueryConfig::new().set_use_topic_schema(true);Sourcepub fn set_write_metadata<T: Into<bool>>(self, v: T) -> Self
pub fn set_write_metadata<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_drop_unknown_fields<T: Into<bool>>(self, v: T) -> Self
pub fn set_drop_unknown_fields<T: Into<bool>>(self, v: T) -> Self
Sets the value of drop_unknown_fields.
§Example
let x = BigQueryConfig::new().set_drop_unknown_fields(true);Sourcepub fn set_use_table_schema<T: Into<bool>>(self, v: T) -> Self
pub fn set_use_table_schema<T: Into<bool>>(self, v: T) -> Self
Sets the value of use_table_schema.
§Example
let x = BigQueryConfig::new().set_use_table_schema(true);Sourcepub fn set_service_account_email<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account_email<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account_email.
§Example
let x = BigQueryConfig::new().set_service_account_email("example");Trait Implementations§
Source§impl Clone for BigQueryConfig
impl Clone for BigQueryConfig
Source§fn clone(&self) -> BigQueryConfig
fn clone(&self) -> BigQueryConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BigQueryConfig
impl Debug for BigQueryConfig
Source§impl Default for BigQueryConfig
impl Default for BigQueryConfig
Source§fn default() -> BigQueryConfig
fn default() -> BigQueryConfig
Source§impl Message for BigQueryConfig
impl Message for BigQueryConfig
Source§impl PartialEq for BigQueryConfig
impl PartialEq for BigQueryConfig
impl StructuralPartialEq for BigQueryConfig
Auto Trait Implementations§
impl Freeze for BigQueryConfig
impl RefUnwindSafe for BigQueryConfig
impl Send for BigQueryConfig
impl Sync for BigQueryConfig
impl Unpin for BigQueryConfig
impl UnwindSafe for BigQueryConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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