#[non_exhaustive]pub struct PartitionKeyBuilder { /* private fields */ }
Expand description
A builder for PartitionKey
.
Implementations§
source§impl PartitionKeyBuilder
impl PartitionKeyBuilder
sourcepub fn type(self, input: PartitionKeyType) -> Self
pub fn type(self, input: PartitionKeyType) -> Self
The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).
This field is required.sourcepub fn set_type(self, input: Option<PartitionKeyType>) -> Self
pub fn set_type(self, input: Option<PartitionKeyType>) -> Self
The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).
sourcepub fn get_type(&self) -> &Option<PartitionKeyType>
pub fn get_type(&self) -> &Option<PartitionKeyType>
The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the attribute used for a dimension key.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The name of the attribute used for a dimension key.
sourcepub fn enforcement_in_record(self, input: PartitionKeyEnforcementLevel) -> Self
pub fn enforcement_in_record(self, input: PartitionKeyEnforcementLevel) -> Self
The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).
sourcepub fn set_enforcement_in_record(
self,
input: Option<PartitionKeyEnforcementLevel>
) -> Self
pub fn set_enforcement_in_record( self, input: Option<PartitionKeyEnforcementLevel> ) -> Self
The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).
sourcepub fn get_enforcement_in_record(&self) -> &Option<PartitionKeyEnforcementLevel>
pub fn get_enforcement_in_record(&self) -> &Option<PartitionKeyEnforcementLevel>
The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).
sourcepub fn build(self) -> Result<PartitionKey, BuildError>
pub fn build(self) -> Result<PartitionKey, BuildError>
Consumes the builder and constructs a PartitionKey
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for PartitionKeyBuilder
impl Clone for PartitionKeyBuilder
source§fn clone(&self) -> PartitionKeyBuilder
fn clone(&self) -> PartitionKeyBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PartitionKeyBuilder
impl Debug for PartitionKeyBuilder
source§impl Default for PartitionKeyBuilder
impl Default for PartitionKeyBuilder
source§fn default() -> PartitionKeyBuilder
fn default() -> PartitionKeyBuilder
source§impl PartialEq for PartitionKeyBuilder
impl PartialEq for PartitionKeyBuilder
source§fn eq(&self, other: &PartitionKeyBuilder) -> bool
fn eq(&self, other: &PartitionKeyBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.