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 TestTelemetryPipelineOutput {
    /// <p>The results of processing the test records through the pipeline configuration, including any outputs or errors.</p>
    pub results: ::std::option::Option<::std::vec::Vec<crate::types::PipelineOutput>>,
    _request_id: Option<String>,
}
impl TestTelemetryPipelineOutput {
    /// <p>The results of processing the test records through the pipeline configuration, including any outputs or errors.</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 `.results.is_none()`.
    pub fn results(&self) -> &[crate::types::PipelineOutput] {
        self.results.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for TestTelemetryPipelineOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl TestTelemetryPipelineOutput {
    /// Creates a new builder-style object to manufacture [`TestTelemetryPipelineOutput`](crate::operation::test_telemetry_pipeline::TestTelemetryPipelineOutput).
    pub fn builder() -> crate::operation::test_telemetry_pipeline::builders::TestTelemetryPipelineOutputBuilder {
        crate::operation::test_telemetry_pipeline::builders::TestTelemetryPipelineOutputBuilder::default()
    }
}

/// A builder for [`TestTelemetryPipelineOutput`](crate::operation::test_telemetry_pipeline::TestTelemetryPipelineOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TestTelemetryPipelineOutputBuilder {
    pub(crate) results: ::std::option::Option<::std::vec::Vec<crate::types::PipelineOutput>>,
    _request_id: Option<String>,
}
impl TestTelemetryPipelineOutputBuilder {
    /// Appends an item to `results`.
    ///
    /// To override the contents of this collection use [`set_results`](Self::set_results).
    ///
    /// <p>The results of processing the test records through the pipeline configuration, including any outputs or errors.</p>
    pub fn results(mut self, input: crate::types::PipelineOutput) -> Self {
        let mut v = self.results.unwrap_or_default();
        v.push(input);
        self.results = ::std::option::Option::Some(v);
        self
    }
    /// <p>The results of processing the test records through the pipeline configuration, including any outputs or errors.</p>
    pub fn set_results(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PipelineOutput>>) -> Self {
        self.results = input;
        self
    }
    /// <p>The results of processing the test records through the pipeline configuration, including any outputs or errors.</p>
    pub fn get_results(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PipelineOutput>> {
        &self.results
    }
    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 [`TestTelemetryPipelineOutput`](crate::operation::test_telemetry_pipeline::TestTelemetryPipelineOutput).
    pub fn build(self) -> crate::operation::test_telemetry_pipeline::TestTelemetryPipelineOutput {
        crate::operation::test_telemetry_pipeline::TestTelemetryPipelineOutput {
            results: self.results,
            _request_id: self._request_id,
        }
    }
}