aws-sdk-workspaces 1.149.0

AWS SDK for Amazon WorkSpaces
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
static CREATEIPGROUPOUTPUT_MEMBER_GROUP_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.workspaces.synthetic#CreateIpGroupOutput$GroupId",
        "com.amazonaws.workspaces.synthetic",
        "CreateIpGroupOutput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "GroupId",
    0,
);
static CREATEIPGROUPOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.workspaces.synthetic#CreateIpGroupOutput",
        "com.amazonaws.workspaces.synthetic",
        "CreateIpGroupOutput",
    ),
    ::aws_smithy_schema::ShapeType::Structure,
    &[&CREATEIPGROUPOUTPUT_MEMBER_GROUP_ID],
)
.with_original_name("CreateIpGroupResult");
impl crate::operation::create_ip_group::CreateIpGroupOutput {
    /// The schema for this shape.
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATEIPGROUPOUTPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::create_ip_group::CreateIpGroupOutput {
    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.group_id {
            ser.write_string(&CREATEIPGROUPOUTPUT_MEMBER_GROUP_ID, val)?;
        }
        Ok(())
    }
}
impl crate::operation::create_ip_group::builders::CreateIpGroupOutputBuilder {
    #[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(&CREATEIPGROUPOUTPUT_SCHEMA, &mut |member, deser| {
            match member.member_index() {
                Some(0) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.group_id = Some(deser.read_string(member)?);
                    }
                }
                _ => {}
            }
            Ok(())
        })
    }
}

impl crate::operation::create_ip_group::CreateIpGroupOutput {
    /// 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())
    }
}