#[non_exhaustive]pub struct ItemSourceBuilder { /* private fields */ }
Expand description
A builder for ItemSource
.
Implementations§
source§impl ItemSourceBuilder
impl ItemSourceBuilder
sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
A unique Id for the source item.
This field is required.sourcepub fn geometry(self, input: Geometry) -> Self
pub fn geometry(self, input: Geometry) -> Self
The item Geometry in GeoJson format.
This field is required.sourcepub fn set_geometry(self, input: Option<Geometry>) -> Self
pub fn set_geometry(self, input: Option<Geometry>) -> Self
The item Geometry in GeoJson format.
sourcepub fn get_geometry(&self) -> &Option<Geometry>
pub fn get_geometry(&self) -> &Option<Geometry>
The item Geometry in GeoJson format.
sourcepub fn assets(self, k: impl Into<String>, v: AssetValue) -> Self
pub fn assets(self, k: impl Into<String>, v: AssetValue) -> Self
Adds a key-value pair to assets
.
To override the contents of this collection use set_assets
.
This is a dictionary of Asset Objects data associated with the Item that can be downloaded or streamed, each with a unique key.
sourcepub fn set_assets(self, input: Option<HashMap<String, AssetValue>>) -> Self
pub fn set_assets(self, input: Option<HashMap<String, AssetValue>>) -> Self
This is a dictionary of Asset Objects data associated with the Item that can be downloaded or streamed, each with a unique key.
sourcepub fn get_assets(&self) -> &Option<HashMap<String, AssetValue>>
pub fn get_assets(&self) -> &Option<HashMap<String, AssetValue>>
This is a dictionary of Asset Objects data associated with the Item that can be downloaded or streamed, each with a unique key.
sourcepub fn date_time(self, input: DateTime) -> Self
pub fn date_time(self, input: DateTime) -> Self
The searchable date and time of the item, in UTC.
This field is required.sourcepub fn set_date_time(self, input: Option<DateTime>) -> Self
pub fn set_date_time(self, input: Option<DateTime>) -> Self
The searchable date and time of the item, in UTC.
sourcepub fn get_date_time(&self) -> &Option<DateTime>
pub fn get_date_time(&self) -> &Option<DateTime>
The searchable date and time of the item, in UTC.
sourcepub fn properties(self, input: Properties) -> Self
pub fn properties(self, input: Properties) -> Self
This field contains additional properties of the item.
sourcepub fn set_properties(self, input: Option<Properties>) -> Self
pub fn set_properties(self, input: Option<Properties>) -> Self
This field contains additional properties of the item.
sourcepub fn get_properties(&self) -> &Option<Properties>
pub fn get_properties(&self) -> &Option<Properties>
This field contains additional properties of the item.
sourcepub fn build(self) -> Result<ItemSource, BuildError>
pub fn build(self) -> Result<ItemSource, BuildError>
Consumes the builder and constructs a ItemSource
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for ItemSourceBuilder
impl Clone for ItemSourceBuilder
source§fn clone(&self) -> ItemSourceBuilder
fn clone(&self) -> ItemSourceBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ItemSourceBuilder
impl Debug for ItemSourceBuilder
source§impl Default for ItemSourceBuilder
impl Default for ItemSourceBuilder
source§fn default() -> ItemSourceBuilder
fn default() -> ItemSourceBuilder
source§impl PartialEq for ItemSourceBuilder
impl PartialEq for ItemSourceBuilder
source§fn eq(&self, other: &ItemSourceBuilder) -> bool
fn eq(&self, other: &ItemSourceBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.