aws-sdk-backupexternal 1.0.0

AWS SDK for AWS Backup External
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 GetNodeOutput {
    /// The Amazon Resource Name (ARN) of the appliance.
    pub appliance_arn: ::std::string::String,
    /// The Amazon Resource Name (ARN) of the appliance node.
    pub node_arn: ::std::string::String,
    /// The IP address of the appliance node.
    pub ip_address: ::std::string::String,
    /// The environment in which the appliance runs.
    pub environment_type: crate::types::ApplianceEnvironmentType,
    /// The management status of the appliance node.
    pub node_management_status: crate::types::NodeManagementStatus,
    /// The health status of the appliance node.
    pub health_status: ::std::option::Option<crate::types::NodeHealthStatus>,
    /// The notifications for the appliance node.
    pub notifications: ::std::option::Option<::std::vec::Vec<crate::types::Notification>>,
    /// The date and time that the appliance node was created.
    pub created_at: ::aws_smithy_types::DateTime,
    /// The date and time that the appliance node was deleted.
    pub deleted_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// The software version of the appliance node.
    pub software_version: ::std::option::Option<::std::string::String>,
    /// The tags associated with the resource.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl GetNodeOutput {
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn appliance_arn(&self) -> &str {
        use std::ops::Deref;
        self.appliance_arn.deref()
    }
    /// The Amazon Resource Name (ARN) of the appliance node.
    pub fn node_arn(&self) -> &str {
        use std::ops::Deref;
        self.node_arn.deref()
    }
    /// The IP address of the appliance node.
    pub fn ip_address(&self) -> &str {
        use std::ops::Deref;
        self.ip_address.deref()
    }
    /// The environment in which the appliance runs.
    pub fn environment_type(&self) -> &crate::types::ApplianceEnvironmentType {
        &self.environment_type
    }
    /// The management status of the appliance node.
    pub fn node_management_status(&self) -> &crate::types::NodeManagementStatus {
        &self.node_management_status
    }
    /// The health status of the appliance node.
    pub fn health_status(&self) -> ::std::option::Option<&crate::types::NodeHealthStatus> {
        self.health_status.as_ref()
    }
    /// The notifications for the appliance node.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.notifications.is_none()`.
    pub fn notifications(&self) -> &[crate::types::Notification] {
        self.notifications.as_deref().unwrap_or_default()
    }
    /// The date and time that the appliance node was created.
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// The date and time that the appliance node was deleted.
    pub fn deleted_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.deleted_at.as_ref()
    }
    /// The software version of the appliance node.
    pub fn software_version(&self) -> ::std::option::Option<&str> {
        self.software_version.as_deref()
    }
    /// The tags associated with the resource.
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetNodeOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetNodeOutput {
    /// Creates a new builder-style object to manufacture [`GetNodeOutput`](crate::operation::get_node::GetNodeOutput).
    pub fn builder() -> crate::operation::get_node::builders::GetNodeOutputBuilder {
        crate::operation::get_node::builders::GetNodeOutputBuilder::default()
    }
}

/// A builder for [`GetNodeOutput`](crate::operation::get_node::GetNodeOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetNodeOutputBuilder {
    pub(crate) appliance_arn: ::std::option::Option<::std::string::String>,
    pub(crate) node_arn: ::std::option::Option<::std::string::String>,
    pub(crate) ip_address: ::std::option::Option<::std::string::String>,
    pub(crate) environment_type: ::std::option::Option<crate::types::ApplianceEnvironmentType>,
    pub(crate) node_management_status: ::std::option::Option<crate::types::NodeManagementStatus>,
    pub(crate) health_status: ::std::option::Option<crate::types::NodeHealthStatus>,
    pub(crate) notifications: ::std::option::Option<::std::vec::Vec<crate::types::Notification>>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) deleted_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) software_version: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl GetNodeOutputBuilder {
    /// The Amazon Resource Name (ARN) of the appliance.
    /// This field is required.
    pub fn appliance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.appliance_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn set_appliance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.appliance_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn get_appliance_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.appliance_arn
    }
    /// The Amazon Resource Name (ARN) of the appliance node.
    /// This field is required.
    pub fn node_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.node_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance node.
    pub fn set_node_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.node_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance node.
    pub fn get_node_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.node_arn
    }
    /// The IP address of the appliance node.
    /// This field is required.
    pub fn ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ip_address = ::std::option::Option::Some(input.into());
        self
    }
    /// The IP address of the appliance node.
    pub fn set_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ip_address = input;
        self
    }
    /// The IP address of the appliance node.
    pub fn get_ip_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.ip_address
    }
    /// The environment in which the appliance runs.
    /// This field is required.
    pub fn environment_type(mut self, input: crate::types::ApplianceEnvironmentType) -> Self {
        self.environment_type = ::std::option::Option::Some(input);
        self
    }
    /// The environment in which the appliance runs.
    pub fn set_environment_type(mut self, input: ::std::option::Option<crate::types::ApplianceEnvironmentType>) -> Self {
        self.environment_type = input;
        self
    }
    /// The environment in which the appliance runs.
    pub fn get_environment_type(&self) -> &::std::option::Option<crate::types::ApplianceEnvironmentType> {
        &self.environment_type
    }
    /// The management status of the appliance node.
    /// This field is required.
    pub fn node_management_status(mut self, input: crate::types::NodeManagementStatus) -> Self {
        self.node_management_status = ::std::option::Option::Some(input);
        self
    }
    /// The management status of the appliance node.
    pub fn set_node_management_status(mut self, input: ::std::option::Option<crate::types::NodeManagementStatus>) -> Self {
        self.node_management_status = input;
        self
    }
    /// The management status of the appliance node.
    pub fn get_node_management_status(&self) -> &::std::option::Option<crate::types::NodeManagementStatus> {
        &self.node_management_status
    }
    /// The health status of the appliance node.
    pub fn health_status(mut self, input: crate::types::NodeHealthStatus) -> Self {
        self.health_status = ::std::option::Option::Some(input);
        self
    }
    /// The health status of the appliance node.
    pub fn set_health_status(mut self, input: ::std::option::Option<crate::types::NodeHealthStatus>) -> Self {
        self.health_status = input;
        self
    }
    /// The health status of the appliance node.
    pub fn get_health_status(&self) -> &::std::option::Option<crate::types::NodeHealthStatus> {
        &self.health_status
    }
    /// Appends an item to `notifications`.
    ///
    /// To override the contents of this collection use [`set_notifications`](Self::set_notifications).
    ///
    /// The notifications for the appliance node.
    pub fn notifications(mut self, input: crate::types::Notification) -> Self {
        let mut v = self.notifications.unwrap_or_default();
        v.push(input);
        self.notifications = ::std::option::Option::Some(v);
        self
    }
    /// The notifications for the appliance node.
    pub fn set_notifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Notification>>) -> Self {
        self.notifications = input;
        self
    }
    /// The notifications for the appliance node.
    pub fn get_notifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Notification>> {
        &self.notifications
    }
    /// The date and time that the appliance node was created.
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// The date and time that the appliance node was created.
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// The date and time that the appliance node was created.
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// The date and time that the appliance node was deleted.
    pub fn deleted_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.deleted_at = ::std::option::Option::Some(input);
        self
    }
    /// The date and time that the appliance node was deleted.
    pub fn set_deleted_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.deleted_at = input;
        self
    }
    /// The date and time that the appliance node was deleted.
    pub fn get_deleted_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.deleted_at
    }
    /// The software version of the appliance node.
    pub fn software_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.software_version = ::std::option::Option::Some(input.into());
        self
    }
    /// The software version of the appliance node.
    pub fn set_software_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.software_version = input;
        self
    }
    /// The software version of the appliance node.
    pub fn get_software_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.software_version
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// The tags associated with the resource.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// The tags associated with the resource.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// The tags associated with the resource.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    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 [`GetNodeOutput`](crate::operation::get_node::GetNodeOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`appliance_arn`](crate::operation::get_node::builders::GetNodeOutputBuilder::appliance_arn)
    /// - [`node_arn`](crate::operation::get_node::builders::GetNodeOutputBuilder::node_arn)
    /// - [`ip_address`](crate::operation::get_node::builders::GetNodeOutputBuilder::ip_address)
    /// - [`environment_type`](crate::operation::get_node::builders::GetNodeOutputBuilder::environment_type)
    /// - [`node_management_status`](crate::operation::get_node::builders::GetNodeOutputBuilder::node_management_status)
    /// - [`created_at`](crate::operation::get_node::builders::GetNodeOutputBuilder::created_at)
    pub fn build(self) -> ::std::result::Result<crate::operation::get_node::GetNodeOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_node::GetNodeOutput {
            appliance_arn: self.appliance_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "appliance_arn",
                    "appliance_arn was not specified but it is required when building GetNodeOutput",
                )
            })?,
            node_arn: self.node_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "node_arn",
                    "node_arn was not specified but it is required when building GetNodeOutput",
                )
            })?,
            ip_address: self.ip_address.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "ip_address",
                    "ip_address was not specified but it is required when building GetNodeOutput",
                )
            })?,
            environment_type: self.environment_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "environment_type",
                    "environment_type was not specified but it is required when building GetNodeOutput",
                )
            })?,
            node_management_status: self.node_management_status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "node_management_status",
                    "node_management_status was not specified but it is required when building GetNodeOutput",
                )
            })?,
            health_status: self.health_status,
            notifications: self.notifications,
            created_at: self.created_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_at",
                    "created_at was not specified but it is required when building GetNodeOutput",
                )
            })?,
            deleted_at: self.deleted_at,
            software_version: self.software_version,
            tags: self.tags,
            _request_id: self._request_id,
        })
    }
}