aws-sdk-cloudwatchlogs 1.81.0

AWS SDK for Amazon CloudWatch Logs
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 TestTransformerOutput {
    /// <p>An array where each member of the array includes both the original version and the transformed version of one of the log events that you input.</p>
    pub transformed_logs: ::std::option::Option<::std::vec::Vec<crate::types::TransformedLogRecord>>,
    _request_id: Option<String>,
}
impl TestTransformerOutput {
    /// <p>An array where each member of the array includes both the original version and the transformed version of one of the log events that you input.</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 `.transformed_logs.is_none()`.
    pub fn transformed_logs(&self) -> &[crate::types::TransformedLogRecord] {
        self.transformed_logs.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for TestTransformerOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl TestTransformerOutput {
    /// Creates a new builder-style object to manufacture [`TestTransformerOutput`](crate::operation::test_transformer::TestTransformerOutput).
    pub fn builder() -> crate::operation::test_transformer::builders::TestTransformerOutputBuilder {
        crate::operation::test_transformer::builders::TestTransformerOutputBuilder::default()
    }
}

/// A builder for [`TestTransformerOutput`](crate::operation::test_transformer::TestTransformerOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TestTransformerOutputBuilder {
    pub(crate) transformed_logs: ::std::option::Option<::std::vec::Vec<crate::types::TransformedLogRecord>>,
    _request_id: Option<String>,
}
impl TestTransformerOutputBuilder {
    /// Appends an item to `transformed_logs`.
    ///
    /// To override the contents of this collection use [`set_transformed_logs`](Self::set_transformed_logs).
    ///
    /// <p>An array where each member of the array includes both the original version and the transformed version of one of the log events that you input.</p>
    pub fn transformed_logs(mut self, input: crate::types::TransformedLogRecord) -> Self {
        let mut v = self.transformed_logs.unwrap_or_default();
        v.push(input);
        self.transformed_logs = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array where each member of the array includes both the original version and the transformed version of one of the log events that you input.</p>
    pub fn set_transformed_logs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TransformedLogRecord>>) -> Self {
        self.transformed_logs = input;
        self
    }
    /// <p>An array where each member of the array includes both the original version and the transformed version of one of the log events that you input.</p>
    pub fn get_transformed_logs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TransformedLogRecord>> {
        &self.transformed_logs
    }
    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 [`TestTransformerOutput`](crate::operation::test_transformer::TestTransformerOutput).
    pub fn build(self) -> crate::operation::test_transformer::TestTransformerOutput {
        crate::operation::test_transformer::TestTransformerOutput {
            transformed_logs: self.transformed_logs,
            _request_id: self._request_id,
        }
    }
}