#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateReplicationConfigurationOutput {
pub source_file_system_id: ::std::string::String,
pub source_file_system_region: ::std::string::String,
pub source_file_system_arn: ::std::string::String,
pub original_source_file_system_arn: ::std::string::String,
pub creation_time: ::aws_smithy_types::DateTime,
pub destinations: ::std::vec::Vec<crate::types::Destination>,
_request_id: Option<String>,
}
impl CreateReplicationConfigurationOutput {
pub fn source_file_system_id(&self) -> &str {
use std::ops::Deref;
self.source_file_system_id.deref()
}
pub fn source_file_system_region(&self) -> &str {
use std::ops::Deref;
self.source_file_system_region.deref()
}
pub fn source_file_system_arn(&self) -> &str {
use std::ops::Deref;
self.source_file_system_arn.deref()
}
pub fn original_source_file_system_arn(&self) -> &str {
use std::ops::Deref;
self.original_source_file_system_arn.deref()
}
pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
&self.creation_time
}
pub fn destinations(&self) -> &[crate::types::Destination] {
use std::ops::Deref;
self.destinations.deref()
}
}
impl ::aws_http::request_id::RequestId for CreateReplicationConfigurationOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateReplicationConfigurationOutput {
pub fn builder() -> crate::operation::create_replication_configuration::builders::CreateReplicationConfigurationOutputBuilder {
crate::operation::create_replication_configuration::builders::CreateReplicationConfigurationOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateReplicationConfigurationOutputBuilder {
pub(crate) source_file_system_id: ::std::option::Option<::std::string::String>,
pub(crate) source_file_system_region: ::std::option::Option<::std::string::String>,
pub(crate) source_file_system_arn: ::std::option::Option<::std::string::String>,
pub(crate) original_source_file_system_arn: ::std::option::Option<::std::string::String>,
pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) destinations: ::std::option::Option<::std::vec::Vec<crate::types::Destination>>,
_request_id: Option<String>,
}
impl CreateReplicationConfigurationOutputBuilder {
pub fn source_file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_file_system_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_source_file_system_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_file_system_id = input;
self
}
pub fn get_source_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
&self.source_file_system_id
}
pub fn source_file_system_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_file_system_region = ::std::option::Option::Some(input.into());
self
}
pub fn set_source_file_system_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_file_system_region = input;
self
}
pub fn get_source_file_system_region(&self) -> &::std::option::Option<::std::string::String> {
&self.source_file_system_region
}
pub fn source_file_system_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_file_system_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_source_file_system_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_file_system_arn = input;
self
}
pub fn get_source_file_system_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.source_file_system_arn
}
pub fn original_source_file_system_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.original_source_file_system_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_original_source_file_system_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.original_source_file_system_arn = input;
self
}
pub fn get_original_source_file_system_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.original_source_file_system_arn
}
pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_time = ::std::option::Option::Some(input);
self
}
pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_time = input;
self
}
pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_time
}
pub fn destinations(mut self, input: crate::types::Destination) -> Self {
let mut v = self.destinations.unwrap_or_default();
v.push(input);
self.destinations = ::std::option::Option::Some(v);
self
}
pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Destination>>) -> Self {
self.destinations = input;
self
}
pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Destination>> {
&self.destinations
}
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
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_replication_configuration::CreateReplicationConfigurationOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_replication_configuration::CreateReplicationConfigurationOutput {
source_file_system_id: self.source_file_system_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"source_file_system_id",
"source_file_system_id was not specified but it is required when building CreateReplicationConfigurationOutput",
)
})?,
source_file_system_region: self.source_file_system_region.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"source_file_system_region",
"source_file_system_region was not specified but it is required when building CreateReplicationConfigurationOutput",
)
})?,
source_file_system_arn: self.source_file_system_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"source_file_system_arn",
"source_file_system_arn was not specified but it is required when building CreateReplicationConfigurationOutput",
)
})?,
original_source_file_system_arn: self.original_source_file_system_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"original_source_file_system_arn",
"original_source_file_system_arn was not specified but it is required when building CreateReplicationConfigurationOutput",
)
})?,
creation_time: self.creation_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"creation_time",
"creation_time was not specified but it is required when building CreateReplicationConfigurationOutput",
)
})?,
destinations: self.destinations.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"destinations",
"destinations was not specified but it is required when building CreateReplicationConfigurationOutput",
)
})?,
_request_id: self._request_id,
})
}
}