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 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>,
    /// <p>The Amazon Web Services Region where the telemetry rule was originally created. For replicated rules in spoke regions, this indicates the region that manages the rule. For rules created without multi-region scope, this field is not present.</p>
    pub home_region: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether this telemetry rule is a replica that was created in this region through multi-region fan-out from the home region. Replicated rules cannot be directly updated or deleted in the spoke region. To modify a replicated rule, make changes in the home region.</p>
    pub is_replicated: ::std::option::Option<bool>,
    /// <p>A list of per-region replication statuses for the telemetry rule. Each entry indicates the replication status of the rule in a specific spoke region. This field is only present for rules created with multi-region scope.</p>
    pub region_statuses: ::std::option::Option<::std::vec::Vec<crate::types::RegionStatus>>,
    _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()
    }
    /// <p>The Amazon Web Services Region where the telemetry rule was originally created. For replicated rules in spoke regions, this indicates the region that manages the rule. For rules created without multi-region scope, this field is not present.</p>
    pub fn home_region(&self) -> ::std::option::Option<&str> {
        self.home_region.as_deref()
    }
    /// <p>Indicates whether this telemetry rule is a replica that was created in this region through multi-region fan-out from the home region. Replicated rules cannot be directly updated or deleted in the spoke region. To modify a replicated rule, make changes in the home region.</p>
    pub fn is_replicated(&self) -> ::std::option::Option<bool> {
        self.is_replicated
    }
    /// <p>A list of per-region replication statuses for the telemetry rule. Each entry indicates the replication status of the rule in a specific spoke region. This field is only present for rules created with multi-region scope.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.region_statuses.is_none()`.
    pub fn region_statuses(&self) -> &[crate::types::RegionStatus] {
        self.region_statuses.as_deref().unwrap_or_default()
    }
}
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>,
    pub(crate) home_region: ::std::option::Option<::std::string::String>,
    pub(crate) is_replicated: ::std::option::Option<bool>,
    pub(crate) region_statuses: ::std::option::Option<::std::vec::Vec<crate::types::RegionStatus>>,
    _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
    }
    /// <p>The Amazon Web Services Region where the telemetry rule was originally created. For replicated rules in spoke regions, this indicates the region that manages the rule. For rules created without multi-region scope, this field is not present.</p>
    pub fn home_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.home_region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services Region where the telemetry rule was originally created. For replicated rules in spoke regions, this indicates the region that manages the rule. For rules created without multi-region scope, this field is not present.</p>
    pub fn set_home_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.home_region = input;
        self
    }
    /// <p>The Amazon Web Services Region where the telemetry rule was originally created. For replicated rules in spoke regions, this indicates the region that manages the rule. For rules created without multi-region scope, this field is not present.</p>
    pub fn get_home_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.home_region
    }
    /// <p>Indicates whether this telemetry rule is a replica that was created in this region through multi-region fan-out from the home region. Replicated rules cannot be directly updated or deleted in the spoke region. To modify a replicated rule, make changes in the home region.</p>
    pub fn is_replicated(mut self, input: bool) -> Self {
        self.is_replicated = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this telemetry rule is a replica that was created in this region through multi-region fan-out from the home region. Replicated rules cannot be directly updated or deleted in the spoke region. To modify a replicated rule, make changes in the home region.</p>
    pub fn set_is_replicated(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_replicated = input;
        self
    }
    /// <p>Indicates whether this telemetry rule is a replica that was created in this region through multi-region fan-out from the home region. Replicated rules cannot be directly updated or deleted in the spoke region. To modify a replicated rule, make changes in the home region.</p>
    pub fn get_is_replicated(&self) -> &::std::option::Option<bool> {
        &self.is_replicated
    }
    /// Appends an item to `region_statuses`.
    ///
    /// To override the contents of this collection use [`set_region_statuses`](Self::set_region_statuses).
    ///
    /// <p>A list of per-region replication statuses for the telemetry rule. Each entry indicates the replication status of the rule in a specific spoke region. This field is only present for rules created with multi-region scope.</p>
    pub fn region_statuses(mut self, input: crate::types::RegionStatus) -> Self {
        let mut v = self.region_statuses.unwrap_or_default();
        v.push(input);
        self.region_statuses = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of per-region replication statuses for the telemetry rule. Each entry indicates the replication status of the rule in a specific spoke region. This field is only present for rules created with multi-region scope.</p>
    pub fn set_region_statuses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RegionStatus>>) -> Self {
        self.region_statuses = input;
        self
    }
    /// <p>A list of per-region replication statuses for the telemetry rule. Each entry indicates the replication status of the rule in a specific spoke region. This field is only present for rules created with multi-region scope.</p>
    pub fn get_region_statuses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RegionStatus>> {
        &self.region_statuses
    }
    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,
            home_region: self.home_region,
            is_replicated: self.is_replicated,
            region_statuses: self.region_statuses,
            _request_id: self._request_id,
        }
    }
}