aws-sdk-xray 1.99.0

AWS SDK for AWS X-Ray
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateSamplingRuleInput {
    /// <p>The rule and fields to change.</p>
    pub sampling_rule_update: ::std::option::Option<crate::types::SamplingRuleUpdate>,
}
impl UpdateSamplingRuleInput {
    /// <p>The rule and fields to change.</p>
    pub fn sampling_rule_update(&self) -> ::std::option::Option<&crate::types::SamplingRuleUpdate> {
        self.sampling_rule_update.as_ref()
    }
}
impl UpdateSamplingRuleInput {
    /// Creates a new builder-style object to manufacture [`UpdateSamplingRuleInput`](crate::operation::update_sampling_rule::UpdateSamplingRuleInput).
    pub fn builder() -> crate::operation::update_sampling_rule::builders::UpdateSamplingRuleInputBuilder {
        crate::operation::update_sampling_rule::builders::UpdateSamplingRuleInputBuilder::default()
    }
}

/// A builder for [`UpdateSamplingRuleInput`](crate::operation::update_sampling_rule::UpdateSamplingRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSamplingRuleInputBuilder {
    pub(crate) sampling_rule_update: ::std::option::Option<crate::types::SamplingRuleUpdate>,
}
impl UpdateSamplingRuleInputBuilder {
    /// <p>The rule and fields to change.</p>
    /// This field is required.
    pub fn sampling_rule_update(mut self, input: crate::types::SamplingRuleUpdate) -> Self {
        self.sampling_rule_update = ::std::option::Option::Some(input);
        self
    }
    /// <p>The rule and fields to change.</p>
    pub fn set_sampling_rule_update(mut self, input: ::std::option::Option<crate::types::SamplingRuleUpdate>) -> Self {
        self.sampling_rule_update = input;
        self
    }
    /// <p>The rule and fields to change.</p>
    pub fn get_sampling_rule_update(&self) -> &::std::option::Option<crate::types::SamplingRuleUpdate> {
        &self.sampling_rule_update
    }
    /// Consumes the builder and constructs a [`UpdateSamplingRuleInput`](crate::operation::update_sampling_rule::UpdateSamplingRuleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_sampling_rule::UpdateSamplingRuleInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_sampling_rule::UpdateSamplingRuleInput {
            sampling_rule_update: self.sampling_rule_update,
        })
    }
}