aws-sdk-observabilityadmin 1.54.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 UpdateTelemetryRuleInput {
    /// <p>The identifier (name or ARN) of the telemetry rule to update.</p>
    pub rule_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The new configuration details for the telemetry rule.</p>
    pub rule: ::std::option::Option<crate::types::TelemetryRule>,
}
impl UpdateTelemetryRuleInput {
    /// <p>The identifier (name or ARN) of the telemetry rule to update.</p>
    pub fn rule_identifier(&self) -> ::std::option::Option<&str> {
        self.rule_identifier.as_deref()
    }
    /// <p>The new configuration details for the telemetry rule.</p>
    pub fn rule(&self) -> ::std::option::Option<&crate::types::TelemetryRule> {
        self.rule.as_ref()
    }
}
impl UpdateTelemetryRuleInput {
    /// Creates a new builder-style object to manufacture [`UpdateTelemetryRuleInput`](crate::operation::update_telemetry_rule::UpdateTelemetryRuleInput).
    pub fn builder() -> crate::operation::update_telemetry_rule::builders::UpdateTelemetryRuleInputBuilder {
        crate::operation::update_telemetry_rule::builders::UpdateTelemetryRuleInputBuilder::default()
    }
}

/// A builder for [`UpdateTelemetryRuleInput`](crate::operation::update_telemetry_rule::UpdateTelemetryRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateTelemetryRuleInputBuilder {
    pub(crate) rule_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) rule: ::std::option::Option<crate::types::TelemetryRule>,
}
impl UpdateTelemetryRuleInputBuilder {
    /// <p>The identifier (name or ARN) of the telemetry rule to update.</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 update.</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 update.</p>
    pub fn get_rule_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_identifier
    }
    /// <p>The new configuration details for the telemetry rule.</p>
    /// This field is required.
    pub fn rule(mut self, input: crate::types::TelemetryRule) -> Self {
        self.rule = ::std::option::Option::Some(input);
        self
    }
    /// <p>The new configuration details for the telemetry rule.</p>
    pub fn set_rule(mut self, input: ::std::option::Option<crate::types::TelemetryRule>) -> Self {
        self.rule = input;
        self
    }
    /// <p>The new configuration details for the telemetry rule.</p>
    pub fn get_rule(&self) -> &::std::option::Option<crate::types::TelemetryRule> {
        &self.rule
    }
    /// Consumes the builder and constructs a [`UpdateTelemetryRuleInput`](crate::operation::update_telemetry_rule::UpdateTelemetryRuleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_telemetry_rule::UpdateTelemetryRuleInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_telemetry_rule::UpdateTelemetryRuleInput {
            rule_identifier: self.rule_identifier,
            rule: self.rule,
        })
    }
}