aws-sdk-drs 1.106.0

AWS SDK for Elastic Disaster Recovery Service
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)]
pub struct DisconnectSourceServerOutput {
    /// <p>The ID of the Source Server.</p>
    pub source_server_id: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the Source Server.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The tags associated with the Source Server.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The ID of the Recovery Instance associated with this Source Server.</p>
    pub recovery_instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The status of the last recovery launch of this Source Server.</p>
    pub last_launch_result: ::std::option::Option<crate::types::LastLaunchResult>,
    /// <p>The Data Replication Info of the Source Server.</p>
    pub data_replication_info: ::std::option::Option<crate::types::DataReplicationInfo>,
    /// <p>The lifecycle information of this Source Server.</p>
    pub life_cycle: ::std::option::Option<crate::types::LifeCycle>,
    /// <p>The source properties of the Source Server.</p>
    pub source_properties: ::std::option::Option<crate::types::SourceProperties>,
    /// <p>The staging area of the source server.</p>
    pub staging_area: ::std::option::Option<crate::types::StagingArea>,
    /// <p>Source cloud properties of the Source Server.</p>
    pub source_cloud_properties: ::std::option::Option<crate::types::SourceCloudProperties>,
    /// <p>Replication direction of the Source Server.</p>
    pub replication_direction: ::std::option::Option<crate::types::ReplicationDirection>,
    /// <p>For EC2-originated Source Servers which have been failed over and then failed back, this value will mean the ARN of the Source Server on the opposite replication direction.</p>
    pub reversed_direction_source_server_arn: ::std::option::Option<::std::string::String>,
    /// <p>ID of the Source Network which is protecting this Source Server's network.</p>
    pub source_network_id: ::std::option::Option<::std::string::String>,
    /// <p>The version of the DRS agent installed on the source server</p>
    pub agent_version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DisconnectSourceServerOutput {
    /// <p>The ID of the Source Server.</p>
    pub fn source_server_id(&self) -> ::std::option::Option<&str> {
        self.source_server_id.as_deref()
    }
    /// <p>The ARN of the Source Server.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The tags associated with the Source Server.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>The ID of the Recovery Instance associated with this Source Server.</p>
    pub fn recovery_instance_id(&self) -> ::std::option::Option<&str> {
        self.recovery_instance_id.as_deref()
    }
    /// <p>The status of the last recovery launch of this Source Server.</p>
    pub fn last_launch_result(&self) -> ::std::option::Option<&crate::types::LastLaunchResult> {
        self.last_launch_result.as_ref()
    }
    /// <p>The Data Replication Info of the Source Server.</p>
    pub fn data_replication_info(&self) -> ::std::option::Option<&crate::types::DataReplicationInfo> {
        self.data_replication_info.as_ref()
    }
    /// <p>The lifecycle information of this Source Server.</p>
    pub fn life_cycle(&self) -> ::std::option::Option<&crate::types::LifeCycle> {
        self.life_cycle.as_ref()
    }
    /// <p>The source properties of the Source Server.</p>
    pub fn source_properties(&self) -> ::std::option::Option<&crate::types::SourceProperties> {
        self.source_properties.as_ref()
    }
    /// <p>The staging area of the source server.</p>
    pub fn staging_area(&self) -> ::std::option::Option<&crate::types::StagingArea> {
        self.staging_area.as_ref()
    }
    /// <p>Source cloud properties of the Source Server.</p>
    pub fn source_cloud_properties(&self) -> ::std::option::Option<&crate::types::SourceCloudProperties> {
        self.source_cloud_properties.as_ref()
    }
    /// <p>Replication direction of the Source Server.</p>
    pub fn replication_direction(&self) -> ::std::option::Option<&crate::types::ReplicationDirection> {
        self.replication_direction.as_ref()
    }
    /// <p>For EC2-originated Source Servers which have been failed over and then failed back, this value will mean the ARN of the Source Server on the opposite replication direction.</p>
    pub fn reversed_direction_source_server_arn(&self) -> ::std::option::Option<&str> {
        self.reversed_direction_source_server_arn.as_deref()
    }
    /// <p>ID of the Source Network which is protecting this Source Server's network.</p>
    pub fn source_network_id(&self) -> ::std::option::Option<&str> {
        self.source_network_id.as_deref()
    }
    /// <p>The version of the DRS agent installed on the source server</p>
    pub fn agent_version(&self) -> ::std::option::Option<&str> {
        self.agent_version.as_deref()
    }
}
impl ::std::fmt::Debug for DisconnectSourceServerOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("DisconnectSourceServerOutput");
        formatter.field("source_server_id", &self.source_server_id);
        formatter.field("arn", &self.arn);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("recovery_instance_id", &self.recovery_instance_id);
        formatter.field("last_launch_result", &self.last_launch_result);
        formatter.field("data_replication_info", &self.data_replication_info);
        formatter.field("life_cycle", &self.life_cycle);
        formatter.field("source_properties", &self.source_properties);
        formatter.field("staging_area", &self.staging_area);
        formatter.field("source_cloud_properties", &self.source_cloud_properties);
        formatter.field("replication_direction", &self.replication_direction);
        formatter.field("reversed_direction_source_server_arn", &self.reversed_direction_source_server_arn);
        formatter.field("source_network_id", &self.source_network_id);
        formatter.field("agent_version", &self.agent_version);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for DisconnectSourceServerOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DisconnectSourceServerOutput {
    /// Creates a new builder-style object to manufacture [`DisconnectSourceServerOutput`](crate::operation::disconnect_source_server::DisconnectSourceServerOutput).
    pub fn builder() -> crate::operation::disconnect_source_server::builders::DisconnectSourceServerOutputBuilder {
        crate::operation::disconnect_source_server::builders::DisconnectSourceServerOutputBuilder::default()
    }
}

/// A builder for [`DisconnectSourceServerOutput`](crate::operation::disconnect_source_server::DisconnectSourceServerOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct DisconnectSourceServerOutputBuilder {
    pub(crate) source_server_id: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) recovery_instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) last_launch_result: ::std::option::Option<crate::types::LastLaunchResult>,
    pub(crate) data_replication_info: ::std::option::Option<crate::types::DataReplicationInfo>,
    pub(crate) life_cycle: ::std::option::Option<crate::types::LifeCycle>,
    pub(crate) source_properties: ::std::option::Option<crate::types::SourceProperties>,
    pub(crate) staging_area: ::std::option::Option<crate::types::StagingArea>,
    pub(crate) source_cloud_properties: ::std::option::Option<crate::types::SourceCloudProperties>,
    pub(crate) replication_direction: ::std::option::Option<crate::types::ReplicationDirection>,
    pub(crate) reversed_direction_source_server_arn: ::std::option::Option<::std::string::String>,
    pub(crate) source_network_id: ::std::option::Option<::std::string::String>,
    pub(crate) agent_version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DisconnectSourceServerOutputBuilder {
    /// <p>The ID of the Source Server.</p>
    pub fn source_server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_server_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Source Server.</p>
    pub fn set_source_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_server_id = input;
        self
    }
    /// <p>The ID of the Source Server.</p>
    pub fn get_source_server_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_server_id
    }
    /// <p>The ARN of the Source Server.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the Source Server.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The ARN of the Source Server.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags associated with the Source Server.</p>
    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
    }
    /// <p>The tags associated with the Source Server.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags associated with the Source Server.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>The ID of the Recovery Instance associated with this Source Server.</p>
    pub fn recovery_instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recovery_instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Recovery Instance associated with this Source Server.</p>
    pub fn set_recovery_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recovery_instance_id = input;
        self
    }
    /// <p>The ID of the Recovery Instance associated with this Source Server.</p>
    pub fn get_recovery_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.recovery_instance_id
    }
    /// <p>The status of the last recovery launch of this Source Server.</p>
    pub fn last_launch_result(mut self, input: crate::types::LastLaunchResult) -> Self {
        self.last_launch_result = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the last recovery launch of this Source Server.</p>
    pub fn set_last_launch_result(mut self, input: ::std::option::Option<crate::types::LastLaunchResult>) -> Self {
        self.last_launch_result = input;
        self
    }
    /// <p>The status of the last recovery launch of this Source Server.</p>
    pub fn get_last_launch_result(&self) -> &::std::option::Option<crate::types::LastLaunchResult> {
        &self.last_launch_result
    }
    /// <p>The Data Replication Info of the Source Server.</p>
    pub fn data_replication_info(mut self, input: crate::types::DataReplicationInfo) -> Self {
        self.data_replication_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Data Replication Info of the Source Server.</p>
    pub fn set_data_replication_info(mut self, input: ::std::option::Option<crate::types::DataReplicationInfo>) -> Self {
        self.data_replication_info = input;
        self
    }
    /// <p>The Data Replication Info of the Source Server.</p>
    pub fn get_data_replication_info(&self) -> &::std::option::Option<crate::types::DataReplicationInfo> {
        &self.data_replication_info
    }
    /// <p>The lifecycle information of this Source Server.</p>
    pub fn life_cycle(mut self, input: crate::types::LifeCycle) -> Self {
        self.life_cycle = ::std::option::Option::Some(input);
        self
    }
    /// <p>The lifecycle information of this Source Server.</p>
    pub fn set_life_cycle(mut self, input: ::std::option::Option<crate::types::LifeCycle>) -> Self {
        self.life_cycle = input;
        self
    }
    /// <p>The lifecycle information of this Source Server.</p>
    pub fn get_life_cycle(&self) -> &::std::option::Option<crate::types::LifeCycle> {
        &self.life_cycle
    }
    /// <p>The source properties of the Source Server.</p>
    pub fn source_properties(mut self, input: crate::types::SourceProperties) -> Self {
        self.source_properties = ::std::option::Option::Some(input);
        self
    }
    /// <p>The source properties of the Source Server.</p>
    pub fn set_source_properties(mut self, input: ::std::option::Option<crate::types::SourceProperties>) -> Self {
        self.source_properties = input;
        self
    }
    /// <p>The source properties of the Source Server.</p>
    pub fn get_source_properties(&self) -> &::std::option::Option<crate::types::SourceProperties> {
        &self.source_properties
    }
    /// <p>The staging area of the source server.</p>
    pub fn staging_area(mut self, input: crate::types::StagingArea) -> Self {
        self.staging_area = ::std::option::Option::Some(input);
        self
    }
    /// <p>The staging area of the source server.</p>
    pub fn set_staging_area(mut self, input: ::std::option::Option<crate::types::StagingArea>) -> Self {
        self.staging_area = input;
        self
    }
    /// <p>The staging area of the source server.</p>
    pub fn get_staging_area(&self) -> &::std::option::Option<crate::types::StagingArea> {
        &self.staging_area
    }
    /// <p>Source cloud properties of the Source Server.</p>
    pub fn source_cloud_properties(mut self, input: crate::types::SourceCloudProperties) -> Self {
        self.source_cloud_properties = ::std::option::Option::Some(input);
        self
    }
    /// <p>Source cloud properties of the Source Server.</p>
    pub fn set_source_cloud_properties(mut self, input: ::std::option::Option<crate::types::SourceCloudProperties>) -> Self {
        self.source_cloud_properties = input;
        self
    }
    /// <p>Source cloud properties of the Source Server.</p>
    pub fn get_source_cloud_properties(&self) -> &::std::option::Option<crate::types::SourceCloudProperties> {
        &self.source_cloud_properties
    }
    /// <p>Replication direction of the Source Server.</p>
    pub fn replication_direction(mut self, input: crate::types::ReplicationDirection) -> Self {
        self.replication_direction = ::std::option::Option::Some(input);
        self
    }
    /// <p>Replication direction of the Source Server.</p>
    pub fn set_replication_direction(mut self, input: ::std::option::Option<crate::types::ReplicationDirection>) -> Self {
        self.replication_direction = input;
        self
    }
    /// <p>Replication direction of the Source Server.</p>
    pub fn get_replication_direction(&self) -> &::std::option::Option<crate::types::ReplicationDirection> {
        &self.replication_direction
    }
    /// <p>For EC2-originated Source Servers which have been failed over and then failed back, this value will mean the ARN of the Source Server on the opposite replication direction.</p>
    pub fn reversed_direction_source_server_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reversed_direction_source_server_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>For EC2-originated Source Servers which have been failed over and then failed back, this value will mean the ARN of the Source Server on the opposite replication direction.</p>
    pub fn set_reversed_direction_source_server_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reversed_direction_source_server_arn = input;
        self
    }
    /// <p>For EC2-originated Source Servers which have been failed over and then failed back, this value will mean the ARN of the Source Server on the opposite replication direction.</p>
    pub fn get_reversed_direction_source_server_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.reversed_direction_source_server_arn
    }
    /// <p>ID of the Source Network which is protecting this Source Server's network.</p>
    pub fn source_network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_network_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ID of the Source Network which is protecting this Source Server's network.</p>
    pub fn set_source_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_network_id = input;
        self
    }
    /// <p>ID of the Source Network which is protecting this Source Server's network.</p>
    pub fn get_source_network_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_network_id
    }
    /// <p>The version of the DRS agent installed on the source server</p>
    pub fn agent_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the DRS agent installed on the source server</p>
    pub fn set_agent_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_version = input;
        self
    }
    /// <p>The version of the DRS agent installed on the source server</p>
    pub fn get_agent_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_version
    }
    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 [`DisconnectSourceServerOutput`](crate::operation::disconnect_source_server::DisconnectSourceServerOutput).
    pub fn build(self) -> crate::operation::disconnect_source_server::DisconnectSourceServerOutput {
        crate::operation::disconnect_source_server::DisconnectSourceServerOutput {
            source_server_id: self.source_server_id,
            arn: self.arn,
            tags: self.tags,
            recovery_instance_id: self.recovery_instance_id,
            last_launch_result: self.last_launch_result,
            data_replication_info: self.data_replication_info,
            life_cycle: self.life_cycle,
            source_properties: self.source_properties,
            staging_area: self.staging_area,
            source_cloud_properties: self.source_cloud_properties,
            replication_direction: self.replication_direction,
            reversed_direction_source_server_arn: self.reversed_direction_source_server_arn,
            source_network_id: self.source_network_id,
            agent_version: self.agent_version,
            _request_id: self._request_id,
        }
    }
}
impl ::std::fmt::Debug for DisconnectSourceServerOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("DisconnectSourceServerOutputBuilder");
        formatter.field("source_server_id", &self.source_server_id);
        formatter.field("arn", &self.arn);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("recovery_instance_id", &self.recovery_instance_id);
        formatter.field("last_launch_result", &self.last_launch_result);
        formatter.field("data_replication_info", &self.data_replication_info);
        formatter.field("life_cycle", &self.life_cycle);
        formatter.field("source_properties", &self.source_properties);
        formatter.field("staging_area", &self.staging_area);
        formatter.field("source_cloud_properties", &self.source_cloud_properties);
        formatter.field("replication_direction", &self.replication_direction);
        formatter.field("reversed_direction_source_server_arn", &self.reversed_direction_source_server_arn);
        formatter.field("source_network_id", &self.source_network_id);
        formatter.field("agent_version", &self.agent_version);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}