aws-sdk-observabilityadmin 1.52.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 GetTelemetryRuleOutput {
    /// <p>The name of the telemetry rule.</p>
    pub rule_name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the telemetry rule.</p>
    pub rule_arn: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp when the telemetry rule was created.</p>
    pub created_time_stamp: ::std::option::Option<i64>,
    /// <p>The timestamp when the telemetry rule was last updated.</p>
    pub last_update_time_stamp: ::std::option::Option<i64>,
    /// <p>The configuration details of the telemetry rule.</p>
    pub telemetry_rule: ::std::option::Option<crate::types::TelemetryRule>,
    _request_id: Option<String>,
}
impl GetTelemetryRuleOutput {
    /// <p>The name of the telemetry rule.</p>
    pub fn rule_name(&self) -> ::std::option::Option<&str> {
        self.rule_name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the telemetry rule.</p>
    pub fn rule_arn(&self) -> ::std::option::Option<&str> {
        self.rule_arn.as_deref()
    }
    /// <p>The timestamp when the telemetry rule was created.</p>
    pub fn created_time_stamp(&self) -> ::std::option::Option<i64> {
        self.created_time_stamp
    }
    /// <p>The timestamp when the telemetry rule was last updated.</p>
    pub fn last_update_time_stamp(&self) -> ::std::option::Option<i64> {
        self.last_update_time_stamp
    }
    /// <p>The configuration details of the telemetry rule.</p>
    pub fn telemetry_rule(&self) -> ::std::option::Option<&crate::types::TelemetryRule> {
        self.telemetry_rule.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetTelemetryRuleOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetTelemetryRuleOutput {
    /// Creates a new builder-style object to manufacture [`GetTelemetryRuleOutput`](crate::operation::get_telemetry_rule::GetTelemetryRuleOutput).
    pub fn builder() -> crate::operation::get_telemetry_rule::builders::GetTelemetryRuleOutputBuilder {
        crate::operation::get_telemetry_rule::builders::GetTelemetryRuleOutputBuilder::default()
    }
}

/// A builder for [`GetTelemetryRuleOutput`](crate::operation::get_telemetry_rule::GetTelemetryRuleOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetTelemetryRuleOutputBuilder {
    pub(crate) rule_name: ::std::option::Option<::std::string::String>,
    pub(crate) rule_arn: ::std::option::Option<::std::string::String>,
    pub(crate) created_time_stamp: ::std::option::Option<i64>,
    pub(crate) last_update_time_stamp: ::std::option::Option<i64>,
    pub(crate) telemetry_rule: ::std::option::Option<crate::types::TelemetryRule>,
    _request_id: Option<String>,
}
impl GetTelemetryRuleOutputBuilder {
    /// <p>The name of the telemetry rule.</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 telemetry rule.</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 telemetry rule.</p>
    pub fn get_rule_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_name
    }
    /// <p>The Amazon Resource Name (ARN) of the telemetry rule.</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 Amazon Resource Name (ARN) of the telemetry rule.</p>
    pub fn set_rule_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the telemetry rule.</p>
    pub fn get_rule_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_arn
    }
    /// <p>The timestamp when the telemetry rule was created.</p>
    pub fn created_time_stamp(mut self, input: i64) -> Self {
        self.created_time_stamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the telemetry rule was created.</p>
    pub fn set_created_time_stamp(mut self, input: ::std::option::Option<i64>) -> Self {
        self.created_time_stamp = input;
        self
    }
    /// <p>The timestamp when the telemetry rule was created.</p>
    pub fn get_created_time_stamp(&self) -> &::std::option::Option<i64> {
        &self.created_time_stamp
    }
    /// <p>The timestamp when the telemetry rule was last updated.</p>
    pub fn last_update_time_stamp(mut self, input: i64) -> Self {
        self.last_update_time_stamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the telemetry rule was last updated.</p>
    pub fn set_last_update_time_stamp(mut self, input: ::std::option::Option<i64>) -> Self {
        self.last_update_time_stamp = input;
        self
    }
    /// <p>The timestamp when the telemetry rule was last updated.</p>
    pub fn get_last_update_time_stamp(&self) -> &::std::option::Option<i64> {
        &self.last_update_time_stamp
    }
    /// <p>The configuration details of the telemetry rule.</p>
    pub fn telemetry_rule(mut self, input: crate::types::TelemetryRule) -> Self {
        self.telemetry_rule = ::std::option::Option::Some(input);
        self
    }
    /// <p>The configuration details of the telemetry rule.</p>
    pub fn set_telemetry_rule(mut self, input: ::std::option::Option<crate::types::TelemetryRule>) -> Self {
        self.telemetry_rule = input;
        self
    }
    /// <p>The configuration details of the telemetry rule.</p>
    pub fn get_telemetry_rule(&self) -> &::std::option::Option<crate::types::TelemetryRule> {
        &self.telemetry_rule
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetTelemetryRuleOutput`](crate::operation::get_telemetry_rule::GetTelemetryRuleOutput).
    pub fn build(self) -> crate::operation::get_telemetry_rule::GetTelemetryRuleOutput {
        crate::operation::get_telemetry_rule::GetTelemetryRuleOutput {
            rule_name: self.rule_name,
            rule_arn: self.rule_arn,
            created_time_stamp: self.created_time_stamp,
            last_update_time_stamp: self.last_update_time_stamp,
            telemetry_rule: self.telemetry_rule,
            _request_id: self._request_id,
        }
    }
}