#[non_exhaustive]pub struct MetricDefinitionConfigBuilder { /* private fields */ }
Expand description
A builder for MetricDefinitionConfig
.
Implementations§
source§impl MetricDefinitionConfigBuilder
impl MetricDefinitionConfigBuilder
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
A name for the metric.
This field is required.sourcepub fn entity_id_key(self, input: impl Into<String>) -> Self
pub fn entity_id_key(self, input: impl Into<String>) -> Self
The entity, such as a user or session, that does an action that causes a metric value to be recorded. An example is userDetails.userID
.
sourcepub fn set_entity_id_key(self, input: Option<String>) -> Self
pub fn set_entity_id_key(self, input: Option<String>) -> Self
The entity, such as a user or session, that does an action that causes a metric value to be recorded. An example is userDetails.userID
.
sourcepub fn get_entity_id_key(&self) -> &Option<String>
pub fn get_entity_id_key(&self) -> &Option<String>
The entity, such as a user or session, that does an action that causes a metric value to be recorded. An example is userDetails.userID
.
sourcepub fn value_key(self, input: impl Into<String>) -> Self
pub fn value_key(self, input: impl Into<String>) -> Self
The value that is tracked to produce the metric.
This field is required.sourcepub fn set_value_key(self, input: Option<String>) -> Self
pub fn set_value_key(self, input: Option<String>) -> Self
The value that is tracked to produce the metric.
sourcepub fn get_value_key(&self) -> &Option<String>
pub fn get_value_key(&self) -> &Option<String>
The value that is tracked to produce the metric.
sourcepub fn event_pattern(self, input: impl Into<String>) -> Self
pub fn event_pattern(self, input: impl Into<String>) -> Self
The EventBridge event pattern that defines how the metric is recorded.
For more information about EventBridge event patterns, see Amazon EventBridge event patterns.
sourcepub fn set_event_pattern(self, input: Option<String>) -> Self
pub fn set_event_pattern(self, input: Option<String>) -> Self
The EventBridge event pattern that defines how the metric is recorded.
For more information about EventBridge event patterns, see Amazon EventBridge event patterns.
sourcepub fn get_event_pattern(&self) -> &Option<String>
pub fn get_event_pattern(&self) -> &Option<String>
The EventBridge event pattern that defines how the metric is recorded.
For more information about EventBridge event patterns, see Amazon EventBridge event patterns.
sourcepub fn unit_label(self, input: impl Into<String>) -> Self
pub fn unit_label(self, input: impl Into<String>) -> Self
A label for the units that the metric is measuring.
sourcepub fn set_unit_label(self, input: Option<String>) -> Self
pub fn set_unit_label(self, input: Option<String>) -> Self
A label for the units that the metric is measuring.
sourcepub fn get_unit_label(&self) -> &Option<String>
pub fn get_unit_label(&self) -> &Option<String>
A label for the units that the metric is measuring.
sourcepub fn build(self) -> Result<MetricDefinitionConfig, BuildError>
pub fn build(self) -> Result<MetricDefinitionConfig, BuildError>
Consumes the builder and constructs a MetricDefinitionConfig
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for MetricDefinitionConfigBuilder
impl Clone for MetricDefinitionConfigBuilder
source§fn clone(&self) -> MetricDefinitionConfigBuilder
fn clone(&self) -> MetricDefinitionConfigBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for MetricDefinitionConfigBuilder
impl Default for MetricDefinitionConfigBuilder
source§fn default() -> MetricDefinitionConfigBuilder
fn default() -> MetricDefinitionConfigBuilder
source§impl PartialEq for MetricDefinitionConfigBuilder
impl PartialEq for MetricDefinitionConfigBuilder
source§fn eq(&self, other: &MetricDefinitionConfigBuilder) -> bool
fn eq(&self, other: &MetricDefinitionConfigBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MetricDefinitionConfigBuilder
Auto Trait Implementations§
impl Freeze for MetricDefinitionConfigBuilder
impl RefUnwindSafe for MetricDefinitionConfigBuilder
impl Send for MetricDefinitionConfigBuilder
impl Sync for MetricDefinitionConfigBuilder
impl Unpin for MetricDefinitionConfigBuilder
impl UnwindSafe for MetricDefinitionConfigBuilder
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> 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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more