aws-sdk-ssm 1.112.0

AWS SDK for Amazon Simple Systems Manager (SSM)
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Details about an individual managed node.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Node {
    /// <p>The UTC timestamp for when the managed node data was last captured.</p>
    pub capture_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The ID of the managed node.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>Information about the ownership of the managed node.</p>
    pub owner: ::std::option::Option<crate::types::NodeOwnerInfo>,
    /// <p>The Amazon Web Services Region that a managed node was created in or assigned to.</p>
    pub region: ::std::option::Option<::std::string::String>,
    /// <p>Information about the type of node.</p>
    pub node_type: ::std::option::Option<crate::types::NodeType>,
}
impl Node {
    /// <p>The UTC timestamp for when the managed node data was last captured.</p>
    pub fn capture_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.capture_time.as_ref()
    }
    /// <p>The ID of the managed node.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Information about the ownership of the managed node.</p>
    pub fn owner(&self) -> ::std::option::Option<&crate::types::NodeOwnerInfo> {
        self.owner.as_ref()
    }
    /// <p>The Amazon Web Services Region that a managed node was created in or assigned to.</p>
    pub fn region(&self) -> ::std::option::Option<&str> {
        self.region.as_deref()
    }
    /// <p>Information about the type of node.</p>
    pub fn node_type(&self) -> ::std::option::Option<&crate::types::NodeType> {
        self.node_type.as_ref()
    }
}
impl Node {
    /// Creates a new builder-style object to manufacture [`Node`](crate::types::Node).
    pub fn builder() -> crate::types::builders::NodeBuilder {
        crate::types::builders::NodeBuilder::default()
    }
}

/// A builder for [`Node`](crate::types::Node).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct NodeBuilder {
    pub(crate) capture_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) owner: ::std::option::Option<crate::types::NodeOwnerInfo>,
    pub(crate) region: ::std::option::Option<::std::string::String>,
    pub(crate) node_type: ::std::option::Option<crate::types::NodeType>,
}
impl NodeBuilder {
    /// <p>The UTC timestamp for when the managed node data was last captured.</p>
    pub fn capture_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.capture_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The UTC timestamp for when the managed node data was last captured.</p>
    pub fn set_capture_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.capture_time = input;
        self
    }
    /// <p>The UTC timestamp for when the managed node data was last captured.</p>
    pub fn get_capture_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.capture_time
    }
    /// <p>The ID of the managed node.</p>
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the managed node.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The ID of the managed node.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>Information about the ownership of the managed node.</p>
    pub fn owner(mut self, input: crate::types::NodeOwnerInfo) -> Self {
        self.owner = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the ownership of the managed node.</p>
    pub fn set_owner(mut self, input: ::std::option::Option<crate::types::NodeOwnerInfo>) -> Self {
        self.owner = input;
        self
    }
    /// <p>Information about the ownership of the managed node.</p>
    pub fn get_owner(&self) -> &::std::option::Option<crate::types::NodeOwnerInfo> {
        &self.owner
    }
    /// <p>The Amazon Web Services Region that a managed node was created in or assigned to.</p>
    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services Region that a managed node was created in or assigned to.</p>
    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.region = input;
        self
    }
    /// <p>The Amazon Web Services Region that a managed node was created in or assigned to.</p>
    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.region
    }
    /// <p>Information about the type of node.</p>
    pub fn node_type(mut self, input: crate::types::NodeType) -> Self {
        self.node_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the type of node.</p>
    pub fn set_node_type(mut self, input: ::std::option::Option<crate::types::NodeType>) -> Self {
        self.node_type = input;
        self
    }
    /// <p>Information about the type of node.</p>
    pub fn get_node_type(&self) -> &::std::option::Option<crate::types::NodeType> {
        &self.node_type
    }
    /// Consumes the builder and constructs a [`Node`](crate::types::Node).
    pub fn build(self) -> crate::types::Node {
        crate::types::Node {
            capture_time: self.capture_time,
            id: self.id,
            owner: self.owner,
            region: self.region,
            node_type: self.node_type,
        }
    }
}