aws-sdk-observabilityadmin 1.55.0

AWS SDK for CloudWatch Observability Admin Service
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 GetTelemetryRuleInput {
    /// <p>The identifier (name or ARN) of the telemetry rule to retrieve.</p>
    pub rule_identifier: ::std::option::Option<::std::string::String>,
}
impl GetTelemetryRuleInput {
    /// <p>The identifier (name or ARN) of the telemetry rule to retrieve.</p>
    pub fn rule_identifier(&self) -> ::std::option::Option<&str> {
        self.rule_identifier.as_deref()
    }
}
impl GetTelemetryRuleInput {
    /// Creates a new builder-style object to manufacture [`GetTelemetryRuleInput`](crate::operation::get_telemetry_rule::GetTelemetryRuleInput).
    pub fn builder() -> crate::operation::get_telemetry_rule::builders::GetTelemetryRuleInputBuilder {
        crate::operation::get_telemetry_rule::builders::GetTelemetryRuleInputBuilder::default()
    }
}

/// A builder for [`GetTelemetryRuleInput`](crate::operation::get_telemetry_rule::GetTelemetryRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetTelemetryRuleInputBuilder {
    pub(crate) rule_identifier: ::std::option::Option<::std::string::String>,
}
impl GetTelemetryRuleInputBuilder {
    /// <p>The identifier (name or ARN) of the telemetry rule to retrieve.</p>
    /// This field is required.
    pub fn rule_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier (name or ARN) of the telemetry rule to retrieve.</p>
    pub fn set_rule_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_identifier = input;
        self
    }
    /// <p>The identifier (name or ARN) of the telemetry rule to retrieve.</p>
    pub fn get_rule_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_identifier
    }
    /// Consumes the builder and constructs a [`GetTelemetryRuleInput`](crate::operation::get_telemetry_rule::GetTelemetryRuleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_telemetry_rule::GetTelemetryRuleInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_telemetry_rule::GetTelemetryRuleInput {
            rule_identifier: self.rule_identifier,
        })
    }
}