aws-sdk-datasync 1.130.0

AWS SDK for AWS DataSync
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>CreateLocationEfs</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateLocationEfsOutput {
    /// <p>The Amazon Resource Name (ARN) of the Amazon EFS file system location that you create.</p>
    pub location_arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateLocationEfsOutput {
    /// <p>The Amazon Resource Name (ARN) of the Amazon EFS file system location that you create.</p>
    pub fn location_arn(&self) -> ::std::option::Option<&str> {
        self.location_arn.as_deref()
    }
}
static CREATELOCATIONEFSOUTPUT_MEMBER_LOCATION_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.datasync.synthetic#CreateLocationEfsOutput$LocationArn",
        "com.amazonaws.datasync.synthetic",
        "CreateLocationEfsOutput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "LocationArn",
    0,
);
static CREATELOCATIONEFSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.datasync.synthetic#CreateLocationEfsOutput",
        "com.amazonaws.datasync.synthetic",
        "CreateLocationEfsOutput",
    ),
    ::aws_smithy_schema::ShapeType::Structure,
    &[&CREATELOCATIONEFSOUTPUT_MEMBER_LOCATION_ARN],
)
.with_original_name("CreateLocationEfsResponse");
impl CreateLocationEfsOutput {
    /// The schema for this shape.
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATELOCATIONEFSOUTPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for CreateLocationEfsOutput {
    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(&CREATELOCATIONEFSOUTPUT_MEMBER_LOCATION_ARN, val)?;
        }
        Ok(())
    }
}
impl crate::operation::create_location_efs::builders::CreateLocationEfsOutputBuilder {
    #[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(&CREATELOCATIONEFSOUTPUT_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 CreateLocationEfsOutput {
    /// Deserializes this structure from a [`ShapeDeserializer`].
    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 CreateLocationEfsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateLocationEfsOutput {
    /// Creates a new builder-style object to manufacture [`CreateLocationEfsOutput`](crate::operation::create_location_efs::CreateLocationEfsOutput).
    pub fn builder() -> crate::operation::create_location_efs::builders::CreateLocationEfsOutputBuilder {
        crate::operation::create_location_efs::builders::CreateLocationEfsOutputBuilder::default()
    }
}

/// A builder for [`CreateLocationEfsOutput`](crate::operation::create_location_efs::CreateLocationEfsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateLocationEfsOutputBuilder {
    pub(crate) location_arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateLocationEfsOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the Amazon EFS file system location that you create.</p>
    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
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon EFS file system location that you create.</p>
    pub fn set_location_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.location_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon EFS file system location that you create.</p>
    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
    }
    /// Consumes the builder and constructs a [`CreateLocationEfsOutput`](crate::operation::create_location_efs::CreateLocationEfsOutput).
    pub fn build(self) -> crate::operation::create_location_efs::CreateLocationEfsOutput {
        crate::operation::create_location_efs::CreateLocationEfsOutput {
            location_arn: self.location_arn,
            _request_id: self._request_id,
        }
    }
}