#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateLocationNfsInput {
pub location_arn: ::std::option::Option<::std::string::String>,
pub subdirectory: ::std::option::Option<::std::string::String>,
pub server_hostname: ::std::option::Option<::std::string::String>,
pub on_prem_config: ::std::option::Option<crate::types::OnPremConfig>,
pub mount_options: ::std::option::Option<crate::types::NfsMountOptions>,
}
impl UpdateLocationNfsInput {
pub fn location_arn(&self) -> ::std::option::Option<&str> {
self.location_arn.as_deref()
}
pub fn subdirectory(&self) -> ::std::option::Option<&str> {
self.subdirectory.as_deref()
}
pub fn server_hostname(&self) -> ::std::option::Option<&str> {
self.server_hostname.as_deref()
}
pub fn on_prem_config(&self) -> ::std::option::Option<&crate::types::OnPremConfig> {
self.on_prem_config.as_ref()
}
pub fn mount_options(&self) -> ::std::option::Option<&crate::types::NfsMountOptions> {
self.mount_options.as_ref()
}
}
static UPDATELOCATIONNFSINPUT_MEMBER_LOCATION_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.datasync.synthetic#UpdateLocationNfsInput$LocationArn",
"com.amazonaws.datasync.synthetic",
"UpdateLocationNfsInput",
),
::aws_smithy_schema::ShapeType::String,
"LocationArn",
0,
);
static UPDATELOCATIONNFSINPUT_MEMBER_SUBDIRECTORY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.datasync.synthetic#UpdateLocationNfsInput$Subdirectory",
"com.amazonaws.datasync.synthetic",
"UpdateLocationNfsInput",
),
::aws_smithy_schema::ShapeType::String,
"Subdirectory",
1,
);
static UPDATELOCATIONNFSINPUT_MEMBER_SERVER_HOSTNAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.datasync.synthetic#UpdateLocationNfsInput$ServerHostname",
"com.amazonaws.datasync.synthetic",
"UpdateLocationNfsInput",
),
::aws_smithy_schema::ShapeType::String,
"ServerHostname",
2,
);
static UPDATELOCATIONNFSINPUT_MEMBER_ON_PREM_CONFIG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.datasync.synthetic#UpdateLocationNfsInput$OnPremConfig",
"com.amazonaws.datasync.synthetic",
"UpdateLocationNfsInput",
),
::aws_smithy_schema::ShapeType::Structure,
"OnPremConfig",
3,
);
static UPDATELOCATIONNFSINPUT_MEMBER_MOUNT_OPTIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.datasync.synthetic#UpdateLocationNfsInput$MountOptions",
"com.amazonaws.datasync.synthetic",
"UpdateLocationNfsInput",
),
::aws_smithy_schema::ShapeType::Structure,
"MountOptions",
4,
);
static UPDATELOCATIONNFSINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.datasync.synthetic#UpdateLocationNfsInput",
"com.amazonaws.datasync.synthetic",
"UpdateLocationNfsInput",
),
::aws_smithy_schema::ShapeType::Structure,
&[
&UPDATELOCATIONNFSINPUT_MEMBER_LOCATION_ARN,
&UPDATELOCATIONNFSINPUT_MEMBER_SUBDIRECTORY,
&UPDATELOCATIONNFSINPUT_MEMBER_SERVER_HOSTNAME,
&UPDATELOCATIONNFSINPUT_MEMBER_ON_PREM_CONFIG,
&UPDATELOCATIONNFSINPUT_MEMBER_MOUNT_OPTIONS,
],
)
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
.with_original_name("UpdateLocationNfsRequest");
impl UpdateLocationNfsInput {
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATELOCATIONNFSINPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateLocationNfsInput {
fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
Self::SCHEMA
}
#[allow(unused_variables, clippy::diverging_sub_expression)]
fn serialize_members(
&self,
ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
if let Some(ref val) = self.location_arn {
ser.write_string(&UPDATELOCATIONNFSINPUT_MEMBER_LOCATION_ARN, val)?;
}
if let Some(ref val) = self.subdirectory {
ser.write_string(&UPDATELOCATIONNFSINPUT_MEMBER_SUBDIRECTORY, val)?;
}
if let Some(ref val) = self.server_hostname {
ser.write_string(&UPDATELOCATIONNFSINPUT_MEMBER_SERVER_HOSTNAME, val)?;
}
if let Some(ref val) = self.on_prem_config {
ser.write_struct(&UPDATELOCATIONNFSINPUT_MEMBER_ON_PREM_CONFIG, val)?;
}
if let Some(ref val) = self.mount_options {
ser.write_struct(&UPDATELOCATIONNFSINPUT_MEMBER_MOUNT_OPTIONS, val)?;
}
Ok(())
}
}
impl crate::operation::update_location_nfs::builders::UpdateLocationNfsInputBuilder {
#[allow(
unused_variables,
unreachable_code,
clippy::single_match,
clippy::match_single_binding,
clippy::diverging_sub_expression
)]
pub(crate) fn deserialize_members(
&mut self,
deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
deserializer.read_struct(&UPDATELOCATIONNFSINPUT_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.location_arn = Some(deser.read_string(member)?);
}
}
Some(1) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.subdirectory = Some(deser.read_string(member)?);
}
}
Some(2) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.server_hostname = Some(deser.read_string(member)?);
}
}
Some(3) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.on_prem_config = Some(crate::types::OnPremConfig::deserialize(deser)?);
}
}
Some(4) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.mount_options = Some(crate::types::NfsMountOptions::deserialize(deser)?);
}
}
_ => {}
}
Ok(())
})
}
}
impl UpdateLocationNfsInput {
pub fn deserialize(
deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
let mut builder = Self::builder();
builder.deserialize_members(deserializer)?;
builder.location_arn = builder.location_arn.or(Some(String::new()));
builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
}
}
impl UpdateLocationNfsInput {
pub fn builder() -> crate::operation::update_location_nfs::builders::UpdateLocationNfsInputBuilder {
crate::operation::update_location_nfs::builders::UpdateLocationNfsInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateLocationNfsInputBuilder {
pub(crate) location_arn: ::std::option::Option<::std::string::String>,
pub(crate) subdirectory: ::std::option::Option<::std::string::String>,
pub(crate) server_hostname: ::std::option::Option<::std::string::String>,
pub(crate) on_prem_config: ::std::option::Option<crate::types::OnPremConfig>,
pub(crate) mount_options: ::std::option::Option<crate::types::NfsMountOptions>,
}
impl UpdateLocationNfsInputBuilder {
pub fn location_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.location_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_location_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.location_arn = input;
self
}
pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.location_arn
}
pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.subdirectory = ::std::option::Option::Some(input.into());
self
}
pub fn set_subdirectory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.subdirectory = input;
self
}
pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> {
&self.subdirectory
}
pub fn server_hostname(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.server_hostname = ::std::option::Option::Some(input.into());
self
}
pub fn set_server_hostname(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.server_hostname = input;
self
}
pub fn get_server_hostname(&self) -> &::std::option::Option<::std::string::String> {
&self.server_hostname
}
pub fn on_prem_config(mut self, input: crate::types::OnPremConfig) -> Self {
self.on_prem_config = ::std::option::Option::Some(input);
self
}
pub fn set_on_prem_config(mut self, input: ::std::option::Option<crate::types::OnPremConfig>) -> Self {
self.on_prem_config = input;
self
}
pub fn get_on_prem_config(&self) -> &::std::option::Option<crate::types::OnPremConfig> {
&self.on_prem_config
}
pub fn mount_options(mut self, input: crate::types::NfsMountOptions) -> Self {
self.mount_options = ::std::option::Option::Some(input);
self
}
pub fn set_mount_options(mut self, input: ::std::option::Option<crate::types::NfsMountOptions>) -> Self {
self.mount_options = input;
self
}
pub fn get_mount_options(&self) -> &::std::option::Option<crate::types::NfsMountOptions> {
&self.mount_options
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_location_nfs::UpdateLocationNfsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_location_nfs::UpdateLocationNfsInput {
location_arn: self.location_arn,
subdirectory: self.subdirectory,
server_hostname: self.server_hostname,
on_prem_config: self.on_prem_config,
mount_options: self.mount_options,
})
}
}