aws-sdk-ssmsap 1.103.0

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

/// <p>Describes the properties of the Dedicated Host.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Host {
    /// <p>The name of the Dedicated Host.</p>
    pub host_name: ::std::option::Option<::std::string::String>,
    /// <p>The IP address of the Dedicated Host.</p>
    pub host_ip: ::std::option::Option<::std::string::String>,
    /// <p>The ID of Amazon EC2 instance.</p>
    pub ec2_instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The instance ID of the instance on the Dedicated Host.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The role of the Dedicated Host.</p>
    pub host_role: ::std::option::Option<crate::types::HostRole>,
    /// <p>The version of the operating system.</p>
    pub os_version: ::std::option::Option<::std::string::String>,
}
impl Host {
    /// <p>The name of the Dedicated Host.</p>
    pub fn host_name(&self) -> ::std::option::Option<&str> {
        self.host_name.as_deref()
    }
    /// <p>The IP address of the Dedicated Host.</p>
    pub fn host_ip(&self) -> ::std::option::Option<&str> {
        self.host_ip.as_deref()
    }
    /// <p>The ID of Amazon EC2 instance.</p>
    pub fn ec2_instance_id(&self) -> ::std::option::Option<&str> {
        self.ec2_instance_id.as_deref()
    }
    /// <p>The instance ID of the instance on the Dedicated Host.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The role of the Dedicated Host.</p>
    pub fn host_role(&self) -> ::std::option::Option<&crate::types::HostRole> {
        self.host_role.as_ref()
    }
    /// <p>The version of the operating system.</p>
    pub fn os_version(&self) -> ::std::option::Option<&str> {
        self.os_version.as_deref()
    }
}
impl Host {
    /// Creates a new builder-style object to manufacture [`Host`](crate::types::Host).
    pub fn builder() -> crate::types::builders::HostBuilder {
        crate::types::builders::HostBuilder::default()
    }
}

/// A builder for [`Host`](crate::types::Host).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct HostBuilder {
    pub(crate) host_name: ::std::option::Option<::std::string::String>,
    pub(crate) host_ip: ::std::option::Option<::std::string::String>,
    pub(crate) ec2_instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) host_role: ::std::option::Option<crate::types::HostRole>,
    pub(crate) os_version: ::std::option::Option<::std::string::String>,
}
impl HostBuilder {
    /// <p>The name of the Dedicated Host.</p>
    pub fn host_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.host_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Dedicated Host.</p>
    pub fn set_host_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.host_name = input;
        self
    }
    /// <p>The name of the Dedicated Host.</p>
    pub fn get_host_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.host_name
    }
    /// <p>The IP address of the Dedicated Host.</p>
    pub fn host_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.host_ip = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The IP address of the Dedicated Host.</p>
    pub fn set_host_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.host_ip = input;
        self
    }
    /// <p>The IP address of the Dedicated Host.</p>
    pub fn get_host_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.host_ip
    }
    /// <p>The ID of Amazon EC2 instance.</p>
    pub fn ec2_instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ec2_instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of Amazon EC2 instance.</p>
    pub fn set_ec2_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ec2_instance_id = input;
        self
    }
    /// <p>The ID of Amazon EC2 instance.</p>
    pub fn get_ec2_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.ec2_instance_id
    }
    /// <p>The instance ID of the instance on the Dedicated Host.</p>
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance ID of the instance on the Dedicated Host.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The instance ID of the instance on the Dedicated Host.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The role of the Dedicated Host.</p>
    pub fn host_role(mut self, input: crate::types::HostRole) -> Self {
        self.host_role = ::std::option::Option::Some(input);
        self
    }
    /// <p>The role of the Dedicated Host.</p>
    pub fn set_host_role(mut self, input: ::std::option::Option<crate::types::HostRole>) -> Self {
        self.host_role = input;
        self
    }
    /// <p>The role of the Dedicated Host.</p>
    pub fn get_host_role(&self) -> &::std::option::Option<crate::types::HostRole> {
        &self.host_role
    }
    /// <p>The version of the operating system.</p>
    pub fn os_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.os_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the operating system.</p>
    pub fn set_os_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.os_version = input;
        self
    }
    /// <p>The version of the operating system.</p>
    pub fn get_os_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.os_version
    }
    /// Consumes the builder and constructs a [`Host`](crate::types::Host).
    pub fn build(self) -> crate::types::Host {
        crate::types::Host {
            host_name: self.host_name,
            host_ip: self.host_ip,
            ec2_instance_id: self.ec2_instance_id,
            instance_id: self.instance_id,
            host_role: self.host_role,
            os_version: self.os_version,
        }
    }
}