aws-sdk-cloudwatchomni 1.2.0

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

/// The request for retrieving a slice of the context graph.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetContextGraphInput {
    /// Criteria restricting which nodes are returned.
    pub node_filters: ::std::option::Option<crate::types::NodeFilters>,
    /// Criteria restricting which edges are returned.
    pub edge_filters: ::std::option::Option<crate::types::EdgeFilters>,
    /// Start of the time range (UTC), inclusive.
    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// End of the time range (UTC), inclusive.
    pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// How many hops to traverse out from the nodes matched by nodeFilters. 0 returns only the matched nodes themselves.
    pub depth: ::std::option::Option<i32>,
    /// The maximum number of nodes to return in a single page.
    pub max_results: ::std::option::Option<i32>,
    /// The maximum number of edges to return per node, bounding the fan-out of a densely connected node.
    pub max_edges_per_node: ::std::option::Option<i32>,
    /// Whether to return the metadata block, semantics included, on each node and edge. Off by default because it costs an extra lookup per returned node.
    pub include_metadata: ::std::option::Option<bool>,
    /// Pagination token from a previous response, to retrieve the next page.
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl GetContextGraphInput {
    /// Criteria restricting which nodes are returned.
    pub fn node_filters(&self) -> ::std::option::Option<&crate::types::NodeFilters> {
        self.node_filters.as_ref()
    }
    /// Criteria restricting which edges are returned.
    pub fn edge_filters(&self) -> ::std::option::Option<&crate::types::EdgeFilters> {
        self.edge_filters.as_ref()
    }
    /// Start of the time range (UTC), inclusive.
    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// End of the time range (UTC), inclusive.
    pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// How many hops to traverse out from the nodes matched by nodeFilters. 0 returns only the matched nodes themselves.
    pub fn depth(&self) -> ::std::option::Option<i32> {
        self.depth
    }
    /// The maximum number of nodes to return in a single page.
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// The maximum number of edges to return per node, bounding the fan-out of a densely connected node.
    pub fn max_edges_per_node(&self) -> ::std::option::Option<i32> {
        self.max_edges_per_node
    }
    /// Whether to return the metadata block, semantics included, on each node and edge. Off by default because it costs an extra lookup per returned node.
    pub fn include_metadata(&self) -> ::std::option::Option<bool> {
        self.include_metadata
    }
    /// Pagination token from a previous response, to retrieve the next page.
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl GetContextGraphInput {
    /// Creates a new builder-style object to manufacture [`GetContextGraphInput`](crate::operation::get_context_graph::GetContextGraphInput).
    pub fn builder() -> crate::operation::get_context_graph::builders::GetContextGraphInputBuilder {
        crate::operation::get_context_graph::builders::GetContextGraphInputBuilder::default()
    }
}

/// A builder for [`GetContextGraphInput`](crate::operation::get_context_graph::GetContextGraphInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetContextGraphInputBuilder {
    pub(crate) node_filters: ::std::option::Option<crate::types::NodeFilters>,
    pub(crate) edge_filters: ::std::option::Option<crate::types::EdgeFilters>,
    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) depth: ::std::option::Option<i32>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) max_edges_per_node: ::std::option::Option<i32>,
    pub(crate) include_metadata: ::std::option::Option<bool>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl GetContextGraphInputBuilder {
    /// Criteria restricting which nodes are returned.
    pub fn node_filters(mut self, input: crate::types::NodeFilters) -> Self {
        self.node_filters = ::std::option::Option::Some(input);
        self
    }
    /// Criteria restricting which nodes are returned.
    pub fn set_node_filters(mut self, input: ::std::option::Option<crate::types::NodeFilters>) -> Self {
        self.node_filters = input;
        self
    }
    /// Criteria restricting which nodes are returned.
    pub fn get_node_filters(&self) -> &::std::option::Option<crate::types::NodeFilters> {
        &self.node_filters
    }
    /// Criteria restricting which edges are returned.
    pub fn edge_filters(mut self, input: crate::types::EdgeFilters) -> Self {
        self.edge_filters = ::std::option::Option::Some(input);
        self
    }
    /// Criteria restricting which edges are returned.
    pub fn set_edge_filters(mut self, input: ::std::option::Option<crate::types::EdgeFilters>) -> Self {
        self.edge_filters = input;
        self
    }
    /// Criteria restricting which edges are returned.
    pub fn get_edge_filters(&self) -> &::std::option::Option<crate::types::EdgeFilters> {
        &self.edge_filters
    }
    /// Start of the time range (UTC), inclusive.
    /// This field is required.
    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.start_time = ::std::option::Option::Some(input);
        self
    }
    /// Start of the time range (UTC), inclusive.
    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.start_time = input;
        self
    }
    /// Start of the time range (UTC), inclusive.
    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.start_time
    }
    /// End of the time range (UTC), inclusive.
    /// This field is required.
    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.end_time = ::std::option::Option::Some(input);
        self
    }
    /// End of the time range (UTC), inclusive.
    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.end_time = input;
        self
    }
    /// End of the time range (UTC), inclusive.
    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.end_time
    }
    /// How many hops to traverse out from the nodes matched by nodeFilters. 0 returns only the matched nodes themselves.
    pub fn depth(mut self, input: i32) -> Self {
        self.depth = ::std::option::Option::Some(input);
        self
    }
    /// How many hops to traverse out from the nodes matched by nodeFilters. 0 returns only the matched nodes themselves.
    pub fn set_depth(mut self, input: ::std::option::Option<i32>) -> Self {
        self.depth = input;
        self
    }
    /// How many hops to traverse out from the nodes matched by nodeFilters. 0 returns only the matched nodes themselves.
    pub fn get_depth(&self) -> &::std::option::Option<i32> {
        &self.depth
    }
    /// The maximum number of nodes to return in a single page.
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// The maximum number of nodes to return in a single page.
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// The maximum number of nodes to return in a single page.
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// The maximum number of edges to return per node, bounding the fan-out of a densely connected node.
    pub fn max_edges_per_node(mut self, input: i32) -> Self {
        self.max_edges_per_node = ::std::option::Option::Some(input);
        self
    }
    /// The maximum number of edges to return per node, bounding the fan-out of a densely connected node.
    pub fn set_max_edges_per_node(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_edges_per_node = input;
        self
    }
    /// The maximum number of edges to return per node, bounding the fan-out of a densely connected node.
    pub fn get_max_edges_per_node(&self) -> &::std::option::Option<i32> {
        &self.max_edges_per_node
    }
    /// Whether to return the metadata block, semantics included, on each node and edge. Off by default because it costs an extra lookup per returned node.
    pub fn include_metadata(mut self, input: bool) -> Self {
        self.include_metadata = ::std::option::Option::Some(input);
        self
    }
    /// Whether to return the metadata block, semantics included, on each node and edge. Off by default because it costs an extra lookup per returned node.
    pub fn set_include_metadata(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_metadata = input;
        self
    }
    /// Whether to return the metadata block, semantics included, on each node and edge. Off by default because it costs an extra lookup per returned node.
    pub fn get_include_metadata(&self) -> &::std::option::Option<bool> {
        &self.include_metadata
    }
    /// Pagination token from a previous response, to retrieve the next page.
    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
    }
    /// Pagination token from a previous response, to retrieve the next page.
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// Pagination token from a previous response, to retrieve the next page.
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`GetContextGraphInput`](crate::operation::get_context_graph::GetContextGraphInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_context_graph::GetContextGraphInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_context_graph::GetContextGraphInput {
            node_filters: self.node_filters,
            edge_filters: self.edge_filters,
            start_time: self.start_time,
            end_time: self.end_time,
            depth: self.depth,
            max_results: self.max_results,
            max_edges_per_node: self.max_edges_per_node,
            include_metadata: self.include_metadata,
            next_token: self.next_token,
        })
    }
}