aws-sdk-opsworks 1.8.0

AWS SDK for AWS OpsWorks
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 RegisterInstanceInput {
    /// <p>The ID of the stack that the instance is to be registered with.</p>
    pub stack_id: ::std::option::Option<::std::string::String>,
    /// <p>The instance's hostname.</p>
    pub hostname: ::std::option::Option<::std::string::String>,
    /// <p>The instance's public IP address.</p>
    pub public_ip: ::std::option::Option<::std::string::String>,
    /// <p>The instance's private IP address.</p>
    pub private_ip: ::std::option::Option<::std::string::String>,
    /// <p>The instances public RSA key. This key is used to encrypt communication between the instance and the service.</p>
    pub rsa_public_key: ::std::option::Option<::std::string::String>,
    /// <p>The instances public RSA key fingerprint.</p>
    pub rsa_public_key_fingerprint: ::std::option::Option<::std::string::String>,
    /// <p>An InstanceIdentity object that contains the instance's identity.</p>
    pub instance_identity: ::std::option::Option<crate::types::InstanceIdentity>,
}
impl RegisterInstanceInput {
    /// <p>The ID of the stack that the instance is to be registered with.</p>
    pub fn stack_id(&self) -> ::std::option::Option<&str> {
        self.stack_id.as_deref()
    }
    /// <p>The instance's hostname.</p>
    pub fn hostname(&self) -> ::std::option::Option<&str> {
        self.hostname.as_deref()
    }
    /// <p>The instance's public IP address.</p>
    pub fn public_ip(&self) -> ::std::option::Option<&str> {
        self.public_ip.as_deref()
    }
    /// <p>The instance's private IP address.</p>
    pub fn private_ip(&self) -> ::std::option::Option<&str> {
        self.private_ip.as_deref()
    }
    /// <p>The instances public RSA key. This key is used to encrypt communication between the instance and the service.</p>
    pub fn rsa_public_key(&self) -> ::std::option::Option<&str> {
        self.rsa_public_key.as_deref()
    }
    /// <p>The instances public RSA key fingerprint.</p>
    pub fn rsa_public_key_fingerprint(&self) -> ::std::option::Option<&str> {
        self.rsa_public_key_fingerprint.as_deref()
    }
    /// <p>An InstanceIdentity object that contains the instance's identity.</p>
    pub fn instance_identity(&self) -> ::std::option::Option<&crate::types::InstanceIdentity> {
        self.instance_identity.as_ref()
    }
}
impl RegisterInstanceInput {
    /// Creates a new builder-style object to manufacture [`RegisterInstanceInput`](crate::operation::register_instance::RegisterInstanceInput).
    pub fn builder() -> crate::operation::register_instance::builders::RegisterInstanceInputBuilder {
        crate::operation::register_instance::builders::RegisterInstanceInputBuilder::default()
    }
}

/// A builder for [`RegisterInstanceInput`](crate::operation::register_instance::RegisterInstanceInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RegisterInstanceInputBuilder {
    pub(crate) stack_id: ::std::option::Option<::std::string::String>,
    pub(crate) hostname: ::std::option::Option<::std::string::String>,
    pub(crate) public_ip: ::std::option::Option<::std::string::String>,
    pub(crate) private_ip: ::std::option::Option<::std::string::String>,
    pub(crate) rsa_public_key: ::std::option::Option<::std::string::String>,
    pub(crate) rsa_public_key_fingerprint: ::std::option::Option<::std::string::String>,
    pub(crate) instance_identity: ::std::option::Option<crate::types::InstanceIdentity>,
}
impl RegisterInstanceInputBuilder {
    /// <p>The ID of the stack that the instance is to be registered with.</p>
    /// This field is required.
    pub fn stack_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stack_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the stack that the instance is to be registered with.</p>
    pub fn set_stack_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stack_id = input;
        self
    }
    /// <p>The ID of the stack that the instance is to be registered with.</p>
    pub fn get_stack_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.stack_id
    }
    /// <p>The instance's hostname.</p>
    pub fn hostname(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.hostname = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's hostname.</p>
    pub fn set_hostname(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.hostname = input;
        self
    }
    /// <p>The instance's hostname.</p>
    pub fn get_hostname(&self) -> &::std::option::Option<::std::string::String> {
        &self.hostname
    }
    /// <p>The instance's public IP address.</p>
    pub fn public_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.public_ip = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's public IP address.</p>
    pub fn set_public_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.public_ip = input;
        self
    }
    /// <p>The instance's public IP address.</p>
    pub fn get_public_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.public_ip
    }
    /// <p>The instance's private IP address.</p>
    pub fn private_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.private_ip = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's private IP address.</p>
    pub fn set_private_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.private_ip = input;
        self
    }
    /// <p>The instance's private IP address.</p>
    pub fn get_private_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.private_ip
    }
    /// <p>The instances public RSA key. This key is used to encrypt communication between the instance and the service.</p>
    pub fn rsa_public_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rsa_public_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instances public RSA key. This key is used to encrypt communication between the instance and the service.</p>
    pub fn set_rsa_public_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rsa_public_key = input;
        self
    }
    /// <p>The instances public RSA key. This key is used to encrypt communication between the instance and the service.</p>
    pub fn get_rsa_public_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.rsa_public_key
    }
    /// <p>The instances public RSA key fingerprint.</p>
    pub fn rsa_public_key_fingerprint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rsa_public_key_fingerprint = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instances public RSA key fingerprint.</p>
    pub fn set_rsa_public_key_fingerprint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rsa_public_key_fingerprint = input;
        self
    }
    /// <p>The instances public RSA key fingerprint.</p>
    pub fn get_rsa_public_key_fingerprint(&self) -> &::std::option::Option<::std::string::String> {
        &self.rsa_public_key_fingerprint
    }
    /// <p>An InstanceIdentity object that contains the instance's identity.</p>
    pub fn instance_identity(mut self, input: crate::types::InstanceIdentity) -> Self {
        self.instance_identity = ::std::option::Option::Some(input);
        self
    }
    /// <p>An InstanceIdentity object that contains the instance's identity.</p>
    pub fn set_instance_identity(mut self, input: ::std::option::Option<crate::types::InstanceIdentity>) -> Self {
        self.instance_identity = input;
        self
    }
    /// <p>An InstanceIdentity object that contains the instance's identity.</p>
    pub fn get_instance_identity(&self) -> &::std::option::Option<crate::types::InstanceIdentity> {
        &self.instance_identity
    }
    /// Consumes the builder and constructs a [`RegisterInstanceInput`](crate::operation::register_instance::RegisterInstanceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::register_instance::RegisterInstanceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::register_instance::RegisterInstanceInput {
            stack_id: self.stack_id,
            hostname: self.hostname,
            public_ip: self.public_ip,
            private_ip: self.private_ip,
            rsa_public_key: self.rsa_public_key,
            rsa_public_key_fingerprint: self.rsa_public_key_fingerprint,
            instance_identity: self.instance_identity,
        })
    }
}