#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateLocationNfsOutput {
pub location_arn: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateLocationNfsOutput {
pub fn location_arn(&self) -> ::std::option::Option<&str> {
self.location_arn.as_deref()
}
}
static CREATELOCATIONNFSOUTPUT_MEMBER_LOCATION_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.datasync.synthetic#CreateLocationNfsOutput$LocationArn",
"com.amazonaws.datasync.synthetic",
"CreateLocationNfsOutput",
),
::aws_smithy_schema::ShapeType::String,
"LocationArn",
0,
);
static CREATELOCATIONNFSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.datasync.synthetic#CreateLocationNfsOutput",
"com.amazonaws.datasync.synthetic",
"CreateLocationNfsOutput",
),
::aws_smithy_schema::ShapeType::Structure,
&[&CREATELOCATIONNFSOUTPUT_MEMBER_LOCATION_ARN],
)
.with_original_name("CreateLocationNfsResponse");
impl CreateLocationNfsOutput {
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATELOCATIONNFSOUTPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for CreateLocationNfsOutput {
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(&CREATELOCATIONNFSOUTPUT_MEMBER_LOCATION_ARN, val)?;
}
Ok(())
}
}
impl crate::operation::create_location_nfs::builders::CreateLocationNfsOutputBuilder {
#[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(&CREATELOCATIONNFSOUTPUT_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)?);
}
}
_ => {}
}
Ok(())
})
}
}
impl CreateLocationNfsOutput {
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)?;
Ok(builder.build())
}
}
impl ::aws_types::request_id::RequestId for CreateLocationNfsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateLocationNfsOutput {
pub fn builder() -> crate::operation::create_location_nfs::builders::CreateLocationNfsOutputBuilder {
crate::operation::create_location_nfs::builders::CreateLocationNfsOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateLocationNfsOutputBuilder {
pub(crate) location_arn: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateLocationNfsOutputBuilder {
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(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) -> crate::operation::create_location_nfs::CreateLocationNfsOutput {
crate::operation::create_location_nfs::CreateLocationNfsOutput {
location_arn: self.location_arn,
_request_id: self._request_id,
}
}
}