aws-sdk-xray 1.96.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 DeleteSamplingRuleInput {
    /// <p>The name of the sampling rule. Specify a rule by either name or ARN, but not both.</p>
    pub rule_name: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.</p>
    pub rule_arn: ::std::option::Option<::std::string::String>,
}
impl DeleteSamplingRuleInput {
    /// <p>The name of the sampling rule. Specify a rule by either name or ARN, but not both.</p>
    pub fn rule_name(&self) -> ::std::option::Option<&str> {
        self.rule_name.as_deref()
    }
    /// <p>The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.</p>
    pub fn rule_arn(&self) -> ::std::option::Option<&str> {
        self.rule_arn.as_deref()
    }
}
impl DeleteSamplingRuleInput {
    /// Creates a new builder-style object to manufacture [`DeleteSamplingRuleInput`](crate::operation::delete_sampling_rule::DeleteSamplingRuleInput).
    pub fn builder() -> crate::operation::delete_sampling_rule::builders::DeleteSamplingRuleInputBuilder {
        crate::operation::delete_sampling_rule::builders::DeleteSamplingRuleInputBuilder::default()
    }
}

/// A builder for [`DeleteSamplingRuleInput`](crate::operation::delete_sampling_rule::DeleteSamplingRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteSamplingRuleInputBuilder {
    pub(crate) rule_name: ::std::option::Option<::std::string::String>,
    pub(crate) rule_arn: ::std::option::Option<::std::string::String>,
}
impl DeleteSamplingRuleInputBuilder {
    /// <p>The name of the sampling rule. Specify a rule by either name or ARN, but not both.</p>
    pub fn rule_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the sampling rule. Specify a rule by either name or ARN, but not both.</p>
    pub fn set_rule_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_name = input;
        self
    }
    /// <p>The name of the sampling rule. Specify a rule by either name or ARN, but not both.</p>
    pub fn get_rule_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_name
    }
    /// <p>The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.</p>
    pub fn rule_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.</p>
    pub fn set_rule_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_arn = input;
        self
    }
    /// <p>The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.</p>
    pub fn get_rule_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_arn
    }
    /// Consumes the builder and constructs a [`DeleteSamplingRuleInput`](crate::operation::delete_sampling_rule::DeleteSamplingRuleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_sampling_rule::DeleteSamplingRuleInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::delete_sampling_rule::DeleteSamplingRuleInput {
            rule_name: self.rule_name,
            rule_arn: self.rule_arn,
        })
    }
}