aws-sdk-sms 1.50.0

AWS SDK for AWS Server Migration Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents a server.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Server {
    /// <p>The ID of the server.</p>
    pub server_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of server.</p>
    pub server_type: ::std::option::Option<crate::types::ServerType>,
    /// <p>Information about the VM server.</p>
    pub vm_server: ::std::option::Option<crate::types::VmServer>,
    /// <p>The ID of the replication job.</p>
    pub replication_job_id: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether the replication job is deleted or failed.</p>
    pub replication_job_terminated: ::std::option::Option<bool>,
}
impl Server {
    /// <p>The ID of the server.</p>
    pub fn server_id(&self) -> ::std::option::Option<&str> {
        self.server_id.as_deref()
    }
    /// <p>The type of server.</p>
    pub fn server_type(&self) -> ::std::option::Option<&crate::types::ServerType> {
        self.server_type.as_ref()
    }
    /// <p>Information about the VM server.</p>
    pub fn vm_server(&self) -> ::std::option::Option<&crate::types::VmServer> {
        self.vm_server.as_ref()
    }
    /// <p>The ID of the replication job.</p>
    pub fn replication_job_id(&self) -> ::std::option::Option<&str> {
        self.replication_job_id.as_deref()
    }
    /// <p>Indicates whether the replication job is deleted or failed.</p>
    pub fn replication_job_terminated(&self) -> ::std::option::Option<bool> {
        self.replication_job_terminated
    }
}
impl Server {
    /// Creates a new builder-style object to manufacture [`Server`](crate::types::Server).
    pub fn builder() -> crate::types::builders::ServerBuilder {
        crate::types::builders::ServerBuilder::default()
    }
}

/// A builder for [`Server`](crate::types::Server).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ServerBuilder {
    pub(crate) server_id: ::std::option::Option<::std::string::String>,
    pub(crate) server_type: ::std::option::Option<crate::types::ServerType>,
    pub(crate) vm_server: ::std::option::Option<crate::types::VmServer>,
    pub(crate) replication_job_id: ::std::option::Option<::std::string::String>,
    pub(crate) replication_job_terminated: ::std::option::Option<bool>,
}
impl ServerBuilder {
    /// <p>The ID of the server.</p>
    pub fn server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.server_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the server.</p>
    pub fn set_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.server_id = input;
        self
    }
    /// <p>The ID of the server.</p>
    pub fn get_server_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.server_id
    }
    /// <p>The type of server.</p>
    pub fn server_type(mut self, input: crate::types::ServerType) -> Self {
        self.server_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of server.</p>
    pub fn set_server_type(mut self, input: ::std::option::Option<crate::types::ServerType>) -> Self {
        self.server_type = input;
        self
    }
    /// <p>The type of server.</p>
    pub fn get_server_type(&self) -> &::std::option::Option<crate::types::ServerType> {
        &self.server_type
    }
    /// <p>Information about the VM server.</p>
    pub fn vm_server(mut self, input: crate::types::VmServer) -> Self {
        self.vm_server = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the VM server.</p>
    pub fn set_vm_server(mut self, input: ::std::option::Option<crate::types::VmServer>) -> Self {
        self.vm_server = input;
        self
    }
    /// <p>Information about the VM server.</p>
    pub fn get_vm_server(&self) -> &::std::option::Option<crate::types::VmServer> {
        &self.vm_server
    }
    /// <p>The ID of the replication job.</p>
    pub fn replication_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.replication_job_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the replication job.</p>
    pub fn set_replication_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.replication_job_id = input;
        self
    }
    /// <p>The ID of the replication job.</p>
    pub fn get_replication_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.replication_job_id
    }
    /// <p>Indicates whether the replication job is deleted or failed.</p>
    pub fn replication_job_terminated(mut self, input: bool) -> Self {
        self.replication_job_terminated = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the replication job is deleted or failed.</p>
    pub fn set_replication_job_terminated(mut self, input: ::std::option::Option<bool>) -> Self {
        self.replication_job_terminated = input;
        self
    }
    /// <p>Indicates whether the replication job is deleted or failed.</p>
    pub fn get_replication_job_terminated(&self) -> &::std::option::Option<bool> {
        &self.replication_job_terminated
    }
    /// Consumes the builder and constructs a [`Server`](crate::types::Server).
    pub fn build(self) -> crate::types::Server {
        crate::types::Server {
            server_id: self.server_id,
            server_type: self.server_type,
            vm_server: self.vm_server,
            replication_job_id: self.replication_job_id,
            replication_job_terminated: self.replication_job_terminated,
        }
    }
}