aws-sdk-xray 1.99.0

AWS SDK for AWS X-Ray
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 GetTraceSummariesOutput {
    /// <p>Trace IDs and annotations for traces that were found in the specified time frame.</p>
    pub trace_summaries: ::std::option::Option<::std::vec::Vec<crate::types::TraceSummary>>,
    /// <p>The start time of this page of results.</p>
    pub approximate_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The total number of traces processed, including traces that did not match the specified filter expression.</p>
    pub traces_processed_count: ::std::option::Option<i64>,
    /// <p>If the requested time frame contained more than one page of results, you can use this token to retrieve the next page. The first page contains the most recent results, closest to the end of the time frame.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetTraceSummariesOutput {
    /// <p>Trace IDs and annotations for traces that were found in the specified time frame.</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 `.trace_summaries.is_none()`.
    pub fn trace_summaries(&self) -> &[crate::types::TraceSummary] {
        self.trace_summaries.as_deref().unwrap_or_default()
    }
    /// <p>The start time of this page of results.</p>
    pub fn approximate_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.approximate_time.as_ref()
    }
    /// <p>The total number of traces processed, including traces that did not match the specified filter expression.</p>
    pub fn traces_processed_count(&self) -> ::std::option::Option<i64> {
        self.traces_processed_count
    }
    /// <p>If the requested time frame contained more than one page of results, you can use this token to retrieve the next page. The first page contains the most recent results, closest to the end of the time frame.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetTraceSummariesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetTraceSummariesOutput {
    /// Creates a new builder-style object to manufacture [`GetTraceSummariesOutput`](crate::operation::get_trace_summaries::GetTraceSummariesOutput).
    pub fn builder() -> crate::operation::get_trace_summaries::builders::GetTraceSummariesOutputBuilder {
        crate::operation::get_trace_summaries::builders::GetTraceSummariesOutputBuilder::default()
    }
}

/// A builder for [`GetTraceSummariesOutput`](crate::operation::get_trace_summaries::GetTraceSummariesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetTraceSummariesOutputBuilder {
    pub(crate) trace_summaries: ::std::option::Option<::std::vec::Vec<crate::types::TraceSummary>>,
    pub(crate) approximate_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) traces_processed_count: ::std::option::Option<i64>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetTraceSummariesOutputBuilder {
    /// Appends an item to `trace_summaries`.
    ///
    /// To override the contents of this collection use [`set_trace_summaries`](Self::set_trace_summaries).
    ///
    /// <p>Trace IDs and annotations for traces that were found in the specified time frame.</p>
    pub fn trace_summaries(mut self, input: crate::types::TraceSummary) -> Self {
        let mut v = self.trace_summaries.unwrap_or_default();
        v.push(input);
        self.trace_summaries = ::std::option::Option::Some(v);
        self
    }
    /// <p>Trace IDs and annotations for traces that were found in the specified time frame.</p>
    pub fn set_trace_summaries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TraceSummary>>) -> Self {
        self.trace_summaries = input;
        self
    }
    /// <p>Trace IDs and annotations for traces that were found in the specified time frame.</p>
    pub fn get_trace_summaries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TraceSummary>> {
        &self.trace_summaries
    }
    /// <p>The start time of this page of results.</p>
    pub fn approximate_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.approximate_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The start time of this page of results.</p>
    pub fn set_approximate_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.approximate_time = input;
        self
    }
    /// <p>The start time of this page of results.</p>
    pub fn get_approximate_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.approximate_time
    }
    /// <p>The total number of traces processed, including traces that did not match the specified filter expression.</p>
    pub fn traces_processed_count(mut self, input: i64) -> Self {
        self.traces_processed_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The total number of traces processed, including traces that did not match the specified filter expression.</p>
    pub fn set_traces_processed_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.traces_processed_count = input;
        self
    }
    /// <p>The total number of traces processed, including traces that did not match the specified filter expression.</p>
    pub fn get_traces_processed_count(&self) -> &::std::option::Option<i64> {
        &self.traces_processed_count
    }
    /// <p>If the requested time frame contained more than one page of results, you can use this token to retrieve the next page. The first page contains the most recent results, closest to the end of the time frame.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If the requested time frame contained more than one page of results, you can use this token to retrieve the next page. The first page contains the most recent results, closest to the end of the time frame.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>If the requested time frame contained more than one page of results, you can use this token to retrieve the next page. The first page contains the most recent results, closest to the end of the time frame.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    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 [`GetTraceSummariesOutput`](crate::operation::get_trace_summaries::GetTraceSummariesOutput).
    pub fn build(self) -> crate::operation::get_trace_summaries::GetTraceSummariesOutput {
        crate::operation::get_trace_summaries::GetTraceSummariesOutput {
            trace_summaries: self.trace_summaries,
            approximate_time: self.approximate_time,
            traces_processed_count: self.traces_processed_count,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}