#[non_exhaustive]pub struct StorageFormat {
pub format: Format,
pub compression_format: CompressionFormat,
pub mime_type: String,
pub options: Option<Options>,
/* private fields */
}Expand description
Describes the format of the data within its storage location.
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.format: FormatOutput only. The data format associated with the stored data, which represents content type values. The value is inferred from mime type.
compression_format: CompressionFormatOptional. The compression type associated with the stored data. If unspecified, the data is uncompressed.
mime_type: StringRequired. The mime type descriptor for the data. Must match the pattern {type}/{subtype}. Supported values:
- application/x-parquet
- application/x-avro
- application/x-orc
- application/x-tfrecord
- application/x-parquet+iceberg
- application/x-avro+iceberg
- application/x-orc+iceberg
- application/json
- application/{subtypes}
- text/csv
- text/<subtypes>
- image/{image subtype}
- video/{video subtype}
- audio/{audio subtype}
options: Option<Options>Additional format-specific options.
Implementations§
Source§impl StorageFormat
impl StorageFormat
Sourcepub fn set_format<T: Into<Format>>(self, v: T) -> Self
pub fn set_format<T: Into<Format>>(self, v: T) -> Self
Sourcepub fn set_compression_format<T: Into<CompressionFormat>>(self, v: T) -> Self
pub fn set_compression_format<T: Into<CompressionFormat>>(self, v: T) -> Self
Sets the value of compression_format.
§Example
use google_cloud_dataplex_v1::model::storage_format::CompressionFormat;
let x0 = StorageFormat::new().set_compression_format(CompressionFormat::Gzip);
let x1 = StorageFormat::new().set_compression_format(CompressionFormat::Bzip2);Sourcepub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
pub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_options<T: Into<Option<Options>>>(self, v: T) -> Self
pub fn set_options<T: Into<Option<Options>>>(self, v: T) -> Self
Sets the value of options.
Note that all the setters affecting options are mutually
exclusive.
§Example
use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
let x = StorageFormat::new().set_options(Some(
google_cloud_dataplex_v1::model::storage_format::Options::Csv(CsvOptions::default().into())));Sourcepub fn csv(&self) -> Option<&Box<CsvOptions>>
pub fn csv(&self) -> Option<&Box<CsvOptions>>
The value of options
if it holds a Csv, None if the field is not set or
holds a different branch.
Sourcepub fn set_csv<T: Into<Box<CsvOptions>>>(self, v: T) -> Self
pub fn set_csv<T: Into<Box<CsvOptions>>>(self, v: T) -> Self
Sets the value of options
to hold a Csv.
Note that all the setters affecting options are
mutually exclusive.
§Example
use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
let x = StorageFormat::new().set_csv(CsvOptions::default()/* use setters */);
assert!(x.csv().is_some());
assert!(x.json().is_none());
assert!(x.iceberg().is_none());Sourcepub fn json(&self) -> Option<&Box<JsonOptions>>
pub fn json(&self) -> Option<&Box<JsonOptions>>
The value of options
if it holds a Json, None if the field is not set or
holds a different branch.
Sourcepub fn set_json<T: Into<Box<JsonOptions>>>(self, v: T) -> Self
pub fn set_json<T: Into<Box<JsonOptions>>>(self, v: T) -> Self
Sets the value of options
to hold a Json.
Note that all the setters affecting options are
mutually exclusive.
§Example
use google_cloud_dataplex_v1::model::storage_format::JsonOptions;
let x = StorageFormat::new().set_json(JsonOptions::default()/* use setters */);
assert!(x.json().is_some());
assert!(x.csv().is_none());
assert!(x.iceberg().is_none());Sourcepub fn iceberg(&self) -> Option<&Box<IcebergOptions>>
pub fn iceberg(&self) -> Option<&Box<IcebergOptions>>
The value of options
if it holds a Iceberg, None if the field is not set or
holds a different branch.
Sourcepub fn set_iceberg<T: Into<Box<IcebergOptions>>>(self, v: T) -> Self
pub fn set_iceberg<T: Into<Box<IcebergOptions>>>(self, v: T) -> Self
Sets the value of options
to hold a Iceberg.
Note that all the setters affecting options are
mutually exclusive.
§Example
use google_cloud_dataplex_v1::model::storage_format::IcebergOptions;
let x = StorageFormat::new().set_iceberg(IcebergOptions::default()/* use setters */);
assert!(x.iceberg().is_some());
assert!(x.csv().is_none());
assert!(x.json().is_none());Trait Implementations§
Source§impl Clone for StorageFormat
impl Clone for StorageFormat
Source§fn clone(&self) -> StorageFormat
fn clone(&self) -> StorageFormat
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 StorageFormat
impl Debug for StorageFormat
Source§impl Default for StorageFormat
impl Default for StorageFormat
Source§fn default() -> StorageFormat
fn default() -> StorageFormat
Source§impl Message for StorageFormat
impl Message for StorageFormat
Source§impl PartialEq for StorageFormat
impl PartialEq for StorageFormat
impl StructuralPartialEq for StorageFormat
Auto Trait Implementations§
impl Freeze for StorageFormat
impl RefUnwindSafe for StorageFormat
impl Send for StorageFormat
impl Sync for StorageFormat
impl Unpin for StorageFormat
impl UnsafeUnpin for StorageFormat
impl UnwindSafe for StorageFormat
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