#[non_exhaustive]pub struct GcsDestinationConfig {
pub path: String,
pub file_rotation_mb: i32,
pub file_rotation_interval: Option<Duration>,
pub file_format: Option<FileFormat>,
/* private fields */
}Expand description
Google Cloud Storage destination configuration
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.path: StringPath inside the Cloud Storage bucket to write data to.
file_rotation_mb: i32The maximum file size to be saved in the bucket.
file_rotation_interval: Option<Duration>The maximum duration for which new events are added before a file is closed and a new file is created. Values within the range of 15-60 seconds are allowed.
file_format: Option<FileFormat>File Format that the data should be written in.
Implementations§
Source§impl GcsDestinationConfig
impl GcsDestinationConfig
pub fn new() -> Self
Sourcepub fn set_file_rotation_mb<T: Into<i32>>(self, v: T) -> Self
pub fn set_file_rotation_mb<T: Into<i32>>(self, v: T) -> Self
Sets the value of file_rotation_mb.
§Example
let x = GcsDestinationConfig::new().set_file_rotation_mb(42);Sourcepub fn set_file_rotation_interval<T>(self, v: T) -> Self
pub fn set_file_rotation_interval<T>(self, v: T) -> Self
Sets the value of file_rotation_interval.
§Example
use wkt::Duration;
let x = GcsDestinationConfig::new().set_file_rotation_interval(Duration::default()/* use setters */);Sourcepub fn set_or_clear_file_rotation_interval<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_file_rotation_interval<T>(self, v: Option<T>) -> Self
Sets or clears the value of file_rotation_interval.
§Example
use wkt::Duration;
let x = GcsDestinationConfig::new().set_or_clear_file_rotation_interval(Some(Duration::default()/* use setters */));
let x = GcsDestinationConfig::new().set_or_clear_file_rotation_interval(None::<Duration>);Sourcepub fn set_file_format<T: Into<Option<FileFormat>>>(self, v: T) -> Self
pub fn set_file_format<T: Into<Option<FileFormat>>>(self, v: T) -> Self
Sets the value of file_format.
Note that all the setters affecting file_format are mutually
exclusive.
§Example
use google_cloud_datastream_v1::model::AvroFileFormat;
let x = GcsDestinationConfig::new().set_file_format(Some(
google_cloud_datastream_v1::model::gcs_destination_config::FileFormat::AvroFileFormat(AvroFileFormat::default().into())));Sourcepub fn avro_file_format(&self) -> Option<&Box<AvroFileFormat>>
pub fn avro_file_format(&self) -> Option<&Box<AvroFileFormat>>
The value of file_format
if it holds a AvroFileFormat, None if the field is not set or
holds a different branch.
Sourcepub fn set_avro_file_format<T: Into<Box<AvroFileFormat>>>(self, v: T) -> Self
pub fn set_avro_file_format<T: Into<Box<AvroFileFormat>>>(self, v: T) -> Self
Sets the value of file_format
to hold a AvroFileFormat.
Note that all the setters affecting file_format are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::AvroFileFormat;
let x = GcsDestinationConfig::new().set_avro_file_format(AvroFileFormat::default()/* use setters */);
assert!(x.avro_file_format().is_some());
assert!(x.json_file_format().is_none());Sourcepub fn json_file_format(&self) -> Option<&Box<JsonFileFormat>>
pub fn json_file_format(&self) -> Option<&Box<JsonFileFormat>>
The value of file_format
if it holds a JsonFileFormat, None if the field is not set or
holds a different branch.
Sourcepub fn set_json_file_format<T: Into<Box<JsonFileFormat>>>(self, v: T) -> Self
pub fn set_json_file_format<T: Into<Box<JsonFileFormat>>>(self, v: T) -> Self
Sets the value of file_format
to hold a JsonFileFormat.
Note that all the setters affecting file_format are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::JsonFileFormat;
let x = GcsDestinationConfig::new().set_json_file_format(JsonFileFormat::default()/* use setters */);
assert!(x.json_file_format().is_some());
assert!(x.avro_file_format().is_none());Trait Implementations§
Source§impl Clone for GcsDestinationConfig
impl Clone for GcsDestinationConfig
Source§fn clone(&self) -> GcsDestinationConfig
fn clone(&self) -> GcsDestinationConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more