#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GcsDestinationConfig
impl Debug for GcsDestinationConfig
Source§impl Default for GcsDestinationConfig
impl Default for GcsDestinationConfig
Source§fn default() -> GcsDestinationConfig
fn default() -> GcsDestinationConfig
Source§impl Message for GcsDestinationConfig
impl Message for GcsDestinationConfig
Source§impl PartialEq for GcsDestinationConfig
impl PartialEq for GcsDestinationConfig
impl StructuralPartialEq for GcsDestinationConfig
Auto Trait Implementations§
impl Freeze for GcsDestinationConfig
impl RefUnwindSafe for GcsDestinationConfig
impl Send for GcsDestinationConfig
impl Sync for GcsDestinationConfig
impl Unpin for GcsDestinationConfig
impl UnsafeUnpin for GcsDestinationConfig
impl UnwindSafe for GcsDestinationConfig
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