aws-sdk-memorydb 1.46.0

AWS SDK for Amazon MemoryDB
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 FailoverShardOutput {
    /// <p>The cluster being failed over</p>
    pub cluster: ::std::option::Option<crate::types::Cluster>,
    _request_id: Option<String>,
}
impl FailoverShardOutput {
    /// <p>The cluster being failed over</p>
    pub fn cluster(&self) -> ::std::option::Option<&crate::types::Cluster> {
        self.cluster.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for FailoverShardOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl FailoverShardOutput {
    /// Creates a new builder-style object to manufacture [`FailoverShardOutput`](crate::operation::failover_shard::FailoverShardOutput).
    pub fn builder() -> crate::operation::failover_shard::builders::FailoverShardOutputBuilder {
        crate::operation::failover_shard::builders::FailoverShardOutputBuilder::default()
    }
}

/// A builder for [`FailoverShardOutput`](crate::operation::failover_shard::FailoverShardOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct FailoverShardOutputBuilder {
    pub(crate) cluster: ::std::option::Option<crate::types::Cluster>,
    _request_id: Option<String>,
}
impl FailoverShardOutputBuilder {
    /// <p>The cluster being failed over</p>
    pub fn cluster(mut self, input: crate::types::Cluster) -> Self {
        self.cluster = ::std::option::Option::Some(input);
        self
    }
    /// <p>The cluster being failed over</p>
    pub fn set_cluster(mut self, input: ::std::option::Option<crate::types::Cluster>) -> Self {
        self.cluster = input;
        self
    }
    /// <p>The cluster being failed over</p>
    pub fn get_cluster(&self) -> &::std::option::Option<crate::types::Cluster> {
        &self.cluster
    }
    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 [`FailoverShardOutput`](crate::operation::failover_shard::FailoverShardOutput).
    pub fn build(self) -> crate::operation::failover_shard::FailoverShardOutput {
        crate::operation::failover_shard::FailoverShardOutput {
            cluster: self.cluster,
            _request_id: self._request_id,
        }
    }
}