#[non_exhaustive]pub struct SamplingStatisticsDocumentBuilder { /* private fields */ }
Expand description
A builder for SamplingStatisticsDocument
.
Implementations§
source§impl SamplingStatisticsDocumentBuilder
impl SamplingStatisticsDocumentBuilder
sourcepub fn rule_name(self, input: impl Into<String>) -> Self
pub fn rule_name(self, input: impl Into<String>) -> Self
The name of the sampling rule.
This field is required.sourcepub fn set_rule_name(self, input: Option<String>) -> Self
pub fn set_rule_name(self, input: Option<String>) -> Self
The name of the sampling rule.
sourcepub fn get_rule_name(&self) -> &Option<String>
pub fn get_rule_name(&self) -> &Option<String>
The name of the sampling rule.
sourcepub fn client_id(self, input: impl Into<String>) -> Self
pub fn client_id(self, input: impl Into<String>) -> Self
A unique identifier for the service in hexadecimal.
This field is required.sourcepub fn set_client_id(self, input: Option<String>) -> Self
pub fn set_client_id(self, input: Option<String>) -> Self
A unique identifier for the service in hexadecimal.
sourcepub fn get_client_id(&self) -> &Option<String>
pub fn get_client_id(&self) -> &Option<String>
A unique identifier for the service in hexadecimal.
sourcepub fn set_timestamp(self, input: Option<DateTime>) -> Self
pub fn set_timestamp(self, input: Option<DateTime>) -> Self
The current time.
sourcepub fn get_timestamp(&self) -> &Option<DateTime>
pub fn get_timestamp(&self) -> &Option<DateTime>
The current time.
sourcepub fn request_count(self, input: i32) -> Self
pub fn request_count(self, input: i32) -> Self
The number of requests that matched the rule.
This field is required.sourcepub fn set_request_count(self, input: Option<i32>) -> Self
pub fn set_request_count(self, input: Option<i32>) -> Self
The number of requests that matched the rule.
sourcepub fn get_request_count(&self) -> &Option<i32>
pub fn get_request_count(&self) -> &Option<i32>
The number of requests that matched the rule.
sourcepub fn sampled_count(self, input: i32) -> Self
pub fn sampled_count(self, input: i32) -> Self
The number of requests recorded.
This field is required.sourcepub fn set_sampled_count(self, input: Option<i32>) -> Self
pub fn set_sampled_count(self, input: Option<i32>) -> Self
The number of requests recorded.
sourcepub fn get_sampled_count(&self) -> &Option<i32>
pub fn get_sampled_count(&self) -> &Option<i32>
The number of requests recorded.
sourcepub fn borrow_count(self, input: i32) -> Self
pub fn borrow_count(self, input: i32) -> Self
The number of requests recorded with borrowed reservoir quota.
sourcepub fn set_borrow_count(self, input: Option<i32>) -> Self
pub fn set_borrow_count(self, input: Option<i32>) -> Self
The number of requests recorded with borrowed reservoir quota.
sourcepub fn get_borrow_count(&self) -> &Option<i32>
pub fn get_borrow_count(&self) -> &Option<i32>
The number of requests recorded with borrowed reservoir quota.
sourcepub fn build(self) -> Result<SamplingStatisticsDocument, BuildError>
pub fn build(self) -> Result<SamplingStatisticsDocument, BuildError>
Consumes the builder and constructs a SamplingStatisticsDocument
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for SamplingStatisticsDocumentBuilder
impl Clone for SamplingStatisticsDocumentBuilder
source§fn clone(&self) -> SamplingStatisticsDocumentBuilder
fn clone(&self) -> SamplingStatisticsDocumentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for SamplingStatisticsDocumentBuilder
impl Default for SamplingStatisticsDocumentBuilder
source§fn default() -> SamplingStatisticsDocumentBuilder
fn default() -> SamplingStatisticsDocumentBuilder
source§impl PartialEq for SamplingStatisticsDocumentBuilder
impl PartialEq for SamplingStatisticsDocumentBuilder
source§fn eq(&self, other: &SamplingStatisticsDocumentBuilder) -> bool
fn eq(&self, other: &SamplingStatisticsDocumentBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.