static DESCRIBEAPPLICATIONSOUTPUT_MEMBER_APPLICATIONS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkSpaceApplicationList$member",
"com.amazonaws.workspaces",
"WorkSpaceApplicationList",
),
::aws_smithy_schema::ShapeType::Structure,
"member",
0,
);
static DESCRIBEAPPLICATIONSOUTPUT_MEMBER_APPLICATIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#DescribeApplicationsOutput$Applications",
"com.amazonaws.workspaces.synthetic",
"DescribeApplicationsOutput",
),
::aws_smithy_schema::ShapeType::List,
"Applications",
0,
)
.with_list_member(&DESCRIBEAPPLICATIONSOUTPUT_MEMBER_APPLICATIONS_MEMBER);
static DESCRIBEAPPLICATIONSOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#DescribeApplicationsOutput$NextToken",
"com.amazonaws.workspaces.synthetic",
"DescribeApplicationsOutput",
),
::aws_smithy_schema::ShapeType::String,
"NextToken",
1,
);
static DESCRIBEAPPLICATIONSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#DescribeApplicationsOutput",
"com.amazonaws.workspaces.synthetic",
"DescribeApplicationsOutput",
),
::aws_smithy_schema::ShapeType::Structure,
&[
&DESCRIBEAPPLICATIONSOUTPUT_MEMBER_APPLICATIONS,
&DESCRIBEAPPLICATIONSOUTPUT_MEMBER_NEXT_TOKEN,
],
)
.with_original_name("DescribeApplicationsResult");
impl crate::operation::describe_applications::DescribeApplicationsOutput {
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DESCRIBEAPPLICATIONSOUTPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::describe_applications::DescribeApplicationsOutput {
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.applications {
ser.write_list(
&DESCRIBEAPPLICATIONSOUTPUT_MEMBER_APPLICATIONS,
&|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
for item in val {
ser.write_struct(crate::types::WorkSpaceApplication::SCHEMA, item)?;
}
Ok(())
},
)?;
}
if let Some(ref val) = self.next_token {
ser.write_string(&DESCRIBEAPPLICATIONSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
}
Ok(())
}
}
impl crate::operation::describe_applications::builders::DescribeApplicationsOutputBuilder {
#[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(&DESCRIBEAPPLICATIONSOUTPUT_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.applications = Some({
let mut container = Vec::new();
deser.read_list(member, &mut |deser| {
container.push(crate::types::WorkSpaceApplication::deserialize(deser)?);
Ok(())
})?;
container
});
}
}
Some(1) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.next_token = Some(deser.read_string(member)?);
}
}
_ => {}
}
Ok(())
})
}
}
impl crate::operation::describe_applications::DescribeApplicationsOutput {
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())
}
}