#[non_exhaustive]pub struct CloudStorage {
pub state: State,
pub bucket: String,
pub minimum_object_create_time: Option<Timestamp>,
pub match_glob: String,
pub input_format: Option<InputFormat>,
/* private fields */
}Expand description
Ingestion settings for Cloud Storage.
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.state: StateOutput only. An output-only field that indicates the state of the Cloud Storage ingestion source.
bucket: StringOptional. Cloud Storage bucket. The bucket name must be without any prefix like “gs://”. See the [bucket naming requirements] (https://cloud.google.com/storage/docs/buckets#naming).
minimum_object_create_time: Option<Timestamp>Optional. Only objects with a larger or equal creation timestamp will be ingested.
match_glob: StringOptional. Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the supported patterns.
input_format: Option<InputFormat>Defaults to text format.
Implementations§
Source§impl CloudStorage
impl CloudStorage
pub fn new() -> Self
Sourcepub fn set_state<T: Into<State>>(self, v: T) -> Self
pub fn set_state<T: Into<State>>(self, v: T) -> Self
Sets the value of state.
§Example
use google_cloud_pubsub::model::ingestion_data_source_settings::cloud_storage::State;
let x0 = CloudStorage::new().set_state(State::Active);
let x1 = CloudStorage::new().set_state(State::CloudStoragePermissionDenied);
let x2 = CloudStorage::new().set_state(State::PublishPermissionDenied);Sourcepub fn set_bucket<T: Into<String>>(self, v: T) -> Self
pub fn set_bucket<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_minimum_object_create_time<T>(self, v: T) -> Self
pub fn set_minimum_object_create_time<T>(self, v: T) -> Self
Sets the value of minimum_object_create_time.
§Example
use wkt::Timestamp;
let x = CloudStorage::new().set_minimum_object_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_minimum_object_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_minimum_object_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of minimum_object_create_time.
§Example
use wkt::Timestamp;
let x = CloudStorage::new().set_or_clear_minimum_object_create_time(Some(Timestamp::default()/* use setters */));
let x = CloudStorage::new().set_or_clear_minimum_object_create_time(None::<Timestamp>);Sourcepub fn set_match_glob<T: Into<String>>(self, v: T) -> Self
pub fn set_match_glob<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_input_format<T: Into<Option<InputFormat>>>(self, v: T) -> Self
pub fn set_input_format<T: Into<Option<InputFormat>>>(self, v: T) -> Self
Sets the value of input_format.
Note that all the setters affecting input_format are mutually
exclusive.
§Example
use google_cloud_pubsub::model::ingestion_data_source_settings::cloud_storage::TextFormat;
let x = CloudStorage::new().set_input_format(Some(
google_cloud_pubsub::model::ingestion_data_source_settings::cloud_storage::InputFormat::TextFormat(TextFormat::default().into())));Sourcepub fn text_format(&self) -> Option<&Box<TextFormat>>
pub fn text_format(&self) -> Option<&Box<TextFormat>>
The value of input_format
if it holds a TextFormat, None if the field is not set or
holds a different branch.
Sourcepub fn set_text_format<T: Into<Box<TextFormat>>>(self, v: T) -> Self
pub fn set_text_format<T: Into<Box<TextFormat>>>(self, v: T) -> Self
Sets the value of input_format
to hold a TextFormat.
Note that all the setters affecting input_format are
mutually exclusive.
§Example
use google_cloud_pubsub::model::ingestion_data_source_settings::cloud_storage::TextFormat;
let x = CloudStorage::new().set_text_format(TextFormat::default()/* use setters */);
assert!(x.text_format().is_some());
assert!(x.avro_format().is_none());
assert!(x.pubsub_avro_format().is_none());Sourcepub fn avro_format(&self) -> Option<&Box<AvroFormat>>
pub fn avro_format(&self) -> Option<&Box<AvroFormat>>
The value of input_format
if it holds a AvroFormat, None if the field is not set or
holds a different branch.
Sourcepub fn set_avro_format<T: Into<Box<AvroFormat>>>(self, v: T) -> Self
pub fn set_avro_format<T: Into<Box<AvroFormat>>>(self, v: T) -> Self
Sets the value of input_format
to hold a AvroFormat.
Note that all the setters affecting input_format are
mutually exclusive.
§Example
use google_cloud_pubsub::model::ingestion_data_source_settings::cloud_storage::AvroFormat;
let x = CloudStorage::new().set_avro_format(AvroFormat::default()/* use setters */);
assert!(x.avro_format().is_some());
assert!(x.text_format().is_none());
assert!(x.pubsub_avro_format().is_none());Sourcepub fn pubsub_avro_format(&self) -> Option<&Box<PubSubAvroFormat>>
pub fn pubsub_avro_format(&self) -> Option<&Box<PubSubAvroFormat>>
The value of input_format
if it holds a PubsubAvroFormat, None if the field is not set or
holds a different branch.
Sourcepub fn set_pubsub_avro_format<T: Into<Box<PubSubAvroFormat>>>(
self,
v: T,
) -> Self
pub fn set_pubsub_avro_format<T: Into<Box<PubSubAvroFormat>>>( self, v: T, ) -> Self
Sets the value of input_format
to hold a PubsubAvroFormat.
Note that all the setters affecting input_format are
mutually exclusive.
§Example
use google_cloud_pubsub::model::ingestion_data_source_settings::cloud_storage::PubSubAvroFormat;
let x = CloudStorage::new().set_pubsub_avro_format(PubSubAvroFormat::default()/* use setters */);
assert!(x.pubsub_avro_format().is_some());
assert!(x.text_format().is_none());
assert!(x.avro_format().is_none());Trait Implementations§
Source§impl Clone for CloudStorage
impl Clone for CloudStorage
Source§fn clone(&self) -> CloudStorage
fn clone(&self) -> CloudStorage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CloudStorage
impl Debug for CloudStorage
Source§impl Default for CloudStorage
impl Default for CloudStorage
Source§fn default() -> CloudStorage
fn default() -> CloudStorage
Source§impl Message for CloudStorage
impl Message for CloudStorage
Source§impl PartialEq for CloudStorage
impl PartialEq for CloudStorage
impl StructuralPartialEq for CloudStorage
Auto Trait Implementations§
impl Freeze for CloudStorage
impl RefUnwindSafe for CloudStorage
impl Send for CloudStorage
impl Sync for CloudStorage
impl Unpin for CloudStorage
impl UnsafeUnpin for CloudStorage
impl UnwindSafe for CloudStorage
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