aws-sdk-cloudwatchomni 1.2.0

AWS SDK for CloudWatch Omni
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 CreateAlertOutput {
    /// Deprecated. Use `alert.alertArn`, which carries the same value. Kept so an existing caller keeps working while it moves to `alert`.
    pub alert_arn: ::std::option::Option<::std::string::String>,
    /// The alert that was created. The same `Alert` shape GetAlert returns, so a caller need not read the alert back to learn its timestamps or its minted alert id. {@code alert.state} is absent here — see the `state` member of `Alert`. Every other member is populated exactly as GetAlert populates it.
    pub alert: ::std::option::Option<crate::types::Alert>,
    _request_id: Option<String>,
}
impl CreateAlertOutput {
    /// Deprecated. Use `alert.alertArn`, which carries the same value. Kept so an existing caller keeps working while it moves to `alert`.
    pub fn alert_arn(&self) -> ::std::option::Option<&str> {
        self.alert_arn.as_deref()
    }
    /// The alert that was created. The same `Alert` shape GetAlert returns, so a caller need not read the alert back to learn its timestamps or its minted alert id. {@code alert.state} is absent here — see the `state` member of `Alert`. Every other member is populated exactly as GetAlert populates it.
    pub fn alert(&self) -> ::std::option::Option<&crate::types::Alert> {
        self.alert.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for CreateAlertOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateAlertOutput {
    /// Creates a new builder-style object to manufacture [`CreateAlertOutput`](crate::operation::create_alert::CreateAlertOutput).
    pub fn builder() -> crate::operation::create_alert::builders::CreateAlertOutputBuilder {
        crate::operation::create_alert::builders::CreateAlertOutputBuilder::default()
    }
}

/// A builder for [`CreateAlertOutput`](crate::operation::create_alert::CreateAlertOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateAlertOutputBuilder {
    pub(crate) alert_arn: ::std::option::Option<::std::string::String>,
    pub(crate) alert: ::std::option::Option<crate::types::Alert>,
    _request_id: Option<String>,
}
impl CreateAlertOutputBuilder {
    /// Deprecated. Use `alert.alertArn`, which carries the same value. Kept so an existing caller keeps working while it moves to `alert`.
    pub fn alert_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.alert_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// Deprecated. Use `alert.alertArn`, which carries the same value. Kept so an existing caller keeps working while it moves to `alert`.
    pub fn set_alert_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.alert_arn = input;
        self
    }
    /// Deprecated. Use `alert.alertArn`, which carries the same value. Kept so an existing caller keeps working while it moves to `alert`.
    pub fn get_alert_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.alert_arn
    }
    /// The alert that was created. The same `Alert` shape GetAlert returns, so a caller need not read the alert back to learn its timestamps or its minted alert id. {@code alert.state} is absent here — see the `state` member of `Alert`. Every other member is populated exactly as GetAlert populates it.
    /// This field is required.
    pub fn alert(mut self, input: crate::types::Alert) -> Self {
        self.alert = ::std::option::Option::Some(input);
        self
    }
    /// The alert that was created. The same `Alert` shape GetAlert returns, so a caller need not read the alert back to learn its timestamps or its minted alert id. {@code alert.state} is absent here — see the `state` member of `Alert`. Every other member is populated exactly as GetAlert populates it.
    pub fn set_alert(mut self, input: ::std::option::Option<crate::types::Alert>) -> Self {
        self.alert = input;
        self
    }
    /// The alert that was created. The same `Alert` shape GetAlert returns, so a caller need not read the alert back to learn its timestamps or its minted alert id. {@code alert.state} is absent here — see the `state` member of `Alert`. Every other member is populated exactly as GetAlert populates it.
    pub fn get_alert(&self) -> &::std::option::Option<crate::types::Alert> {
        &self.alert
    }
    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 [`CreateAlertOutput`](crate::operation::create_alert::CreateAlertOutput).
    pub fn build(self) -> crate::operation::create_alert::CreateAlertOutput {
        crate::operation::create_alert::CreateAlertOutput {
            alert_arn: self.alert_arn,
            alert: self.alert,
            _request_id: self._request_id,
        }
    }
}