aws-sdk-context 1.0.0

AWS SDK for AWS Context
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The request for TraverseAgentContext.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TraverseAgentContextInput {
    /// <p>Maximum total neighbors to return per page.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>Opaque continuation token from a prior response. Omit on the first page.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The agent context to traverse, by ID or full Amazon Resource Name (ARN).</p>
    pub agent_context_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the seed node to start traversal from.</p>
    pub node_id: ::std::option::Option<::std::string::String>,
    /// <p>Traversal directives: which edge types to follow, direction, and max depth.</p>
    pub traversal_strategy: ::std::option::Option<crate::types::TraversalStrategy>,
}
impl TraverseAgentContextInput {
    /// <p>Maximum total neighbors to return per page.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>Opaque continuation token from a prior response. Omit on the first page.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The agent context to traverse, by ID or full Amazon Resource Name (ARN).</p>
    pub fn agent_context_id(&self) -> ::std::option::Option<&str> {
        self.agent_context_id.as_deref()
    }
    /// <p>The ID of the seed node to start traversal from.</p>
    pub fn node_id(&self) -> ::std::option::Option<&str> {
        self.node_id.as_deref()
    }
    /// <p>Traversal directives: which edge types to follow, direction, and max depth.</p>
    pub fn traversal_strategy(&self) -> ::std::option::Option<&crate::types::TraversalStrategy> {
        self.traversal_strategy.as_ref()
    }
}
impl TraverseAgentContextInput {
    /// Creates a new builder-style object to manufacture [`TraverseAgentContextInput`](crate::operation::traverse_agent_context::TraverseAgentContextInput).
    pub fn builder() -> crate::operation::traverse_agent_context::builders::TraverseAgentContextInputBuilder {
        crate::operation::traverse_agent_context::builders::TraverseAgentContextInputBuilder::default()
    }
}

/// A builder for [`TraverseAgentContextInput`](crate::operation::traverse_agent_context::TraverseAgentContextInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TraverseAgentContextInputBuilder {
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) agent_context_id: ::std::option::Option<::std::string::String>,
    pub(crate) node_id: ::std::option::Option<::std::string::String>,
    pub(crate) traversal_strategy: ::std::option::Option<crate::types::TraversalStrategy>,
}
impl TraverseAgentContextInputBuilder {
    /// <p>Maximum total neighbors to return per page.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>Maximum total neighbors to return per page.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>Maximum total neighbors to return per page.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>Opaque continuation token from a prior response. Omit on the first page.</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>Opaque continuation token from a prior response. Omit on the first page.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>Opaque continuation token from a prior response. Omit on the first page.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The agent context to traverse, by ID or full Amazon Resource Name (ARN).</p>
    /// This field is required.
    pub fn agent_context_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_context_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The agent context to traverse, by ID or full Amazon Resource Name (ARN).</p>
    pub fn set_agent_context_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_context_id = input;
        self
    }
    /// <p>The agent context to traverse, by ID or full Amazon Resource Name (ARN).</p>
    pub fn get_agent_context_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_context_id
    }
    /// <p>The ID of the seed node to start traversal from.</p>
    /// This field is required.
    pub fn node_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.node_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the seed node to start traversal from.</p>
    pub fn set_node_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.node_id = input;
        self
    }
    /// <p>The ID of the seed node to start traversal from.</p>
    pub fn get_node_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.node_id
    }
    /// <p>Traversal directives: which edge types to follow, direction, and max depth.</p>
    /// This field is required.
    pub fn traversal_strategy(mut self, input: crate::types::TraversalStrategy) -> Self {
        self.traversal_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>Traversal directives: which edge types to follow, direction, and max depth.</p>
    pub fn set_traversal_strategy(mut self, input: ::std::option::Option<crate::types::TraversalStrategy>) -> Self {
        self.traversal_strategy = input;
        self
    }
    /// <p>Traversal directives: which edge types to follow, direction, and max depth.</p>
    pub fn get_traversal_strategy(&self) -> &::std::option::Option<crate::types::TraversalStrategy> {
        &self.traversal_strategy
    }
    /// Consumes the builder and constructs a [`TraverseAgentContextInput`](crate::operation::traverse_agent_context::TraverseAgentContextInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::traverse_agent_context::TraverseAgentContextInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::traverse_agent_context::TraverseAgentContextInput {
            max_results: self.max_results,
            next_token: self.next_token,
            agent_context_id: self.agent_context_id,
            node_id: self.node_id,
            traversal_strategy: self.traversal_strategy,
        })
    }
}