aws-sdk-xray 1.93.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 GetInsightEventsInput {
    /// <p>The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.</p>
    pub insight_id: ::std::option::Option<::std::string::String>,
    /// <p>Used to retrieve at most the specified value of events.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>Specify the pagination token returned by a previous request to retrieve the next page of events.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl GetInsightEventsInput {
    /// <p>The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.</p>
    pub fn insight_id(&self) -> ::std::option::Option<&str> {
        self.insight_id.as_deref()
    }
    /// <p>Used to retrieve at most the specified value of events.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>Specify the pagination token returned by a previous request to retrieve the next page of events.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl GetInsightEventsInput {
    /// Creates a new builder-style object to manufacture [`GetInsightEventsInput`](crate::operation::get_insight_events::GetInsightEventsInput).
    pub fn builder() -> crate::operation::get_insight_events::builders::GetInsightEventsInputBuilder {
        crate::operation::get_insight_events::builders::GetInsightEventsInputBuilder::default()
    }
}

/// A builder for [`GetInsightEventsInput`](crate::operation::get_insight_events::GetInsightEventsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetInsightEventsInputBuilder {
    pub(crate) insight_id: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl GetInsightEventsInputBuilder {
    /// <p>The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.</p>
    /// This field is required.
    pub fn insight_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.insight_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.</p>
    pub fn set_insight_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.insight_id = input;
        self
    }
    /// <p>The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.</p>
    pub fn get_insight_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.insight_id
    }
    /// <p>Used to retrieve at most the specified value of events.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>Used to retrieve at most the specified value of events.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>Used to retrieve at most the specified value of events.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>Specify the pagination token returned by a previous request to retrieve the next page of events.</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>Specify the pagination token returned by a previous request to retrieve the next page of events.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>Specify the pagination token returned by a previous request to retrieve the next page of events.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`GetInsightEventsInput`](crate::operation::get_insight_events::GetInsightEventsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_insight_events::GetInsightEventsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_insight_events::GetInsightEventsInput {
            insight_id: self.insight_id,
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}