static WORKSPACEAPPLICATION_MEMBER_APPLICATION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkSpaceApplication$ApplicationId",
"com.amazonaws.workspaces",
"WorkSpaceApplication",
),
::aws_smithy_schema::ShapeType::String,
"ApplicationId",
0,
);
static WORKSPACEAPPLICATION_MEMBER_CREATED: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkSpaceApplication$Created",
"com.amazonaws.workspaces",
"WorkSpaceApplication",
),
::aws_smithy_schema::ShapeType::Timestamp,
"Created",
1,
);
static WORKSPACEAPPLICATION_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkSpaceApplication$Description",
"com.amazonaws.workspaces",
"WorkSpaceApplication",
),
::aws_smithy_schema::ShapeType::String,
"Description",
2,
);
static WORKSPACEAPPLICATION_MEMBER_LICENSE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkSpaceApplication$LicenseType",
"com.amazonaws.workspaces",
"WorkSpaceApplication",
),
::aws_smithy_schema::ShapeType::String,
"LicenseType",
3,
);
static WORKSPACEAPPLICATION_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkSpaceApplication$Name",
"com.amazonaws.workspaces",
"WorkSpaceApplication",
),
::aws_smithy_schema::ShapeType::String,
"Name",
4,
);
static WORKSPACEAPPLICATION_MEMBER_OWNER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkSpaceApplication$Owner",
"com.amazonaws.workspaces",
"WorkSpaceApplication",
),
::aws_smithy_schema::ShapeType::String,
"Owner",
5,
);
static WORKSPACEAPPLICATION_MEMBER_STATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkSpaceApplication$State",
"com.amazonaws.workspaces",
"WorkSpaceApplication",
),
::aws_smithy_schema::ShapeType::String,
"State",
6,
);
static WORKSPACEAPPLICATION_MEMBER_SUPPORTED_COMPUTE_TYPE_NAMES_MEMBER: ::aws_smithy_schema::Schema<'static> =
::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.workspaces#ComputeList$member", "com.amazonaws.workspaces", "ComputeList"),
::aws_smithy_schema::ShapeType::String,
"member",
0,
);
static WORKSPACEAPPLICATION_MEMBER_SUPPORTED_COMPUTE_TYPE_NAMES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkSpaceApplication$SupportedComputeTypeNames",
"com.amazonaws.workspaces",
"WorkSpaceApplication",
),
::aws_smithy_schema::ShapeType::List,
"SupportedComputeTypeNames",
7,
)
.with_list_member(&WORKSPACEAPPLICATION_MEMBER_SUPPORTED_COMPUTE_TYPE_NAMES_MEMBER);
static WORKSPACEAPPLICATION_MEMBER_SUPPORTED_OPERATING_SYSTEM_NAMES_MEMBER: ::aws_smithy_schema::Schema<'static> =
::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#OperatingSystemNameList$member",
"com.amazonaws.workspaces",
"OperatingSystemNameList",
),
::aws_smithy_schema::ShapeType::String,
"member",
0,
);
static WORKSPACEAPPLICATION_MEMBER_SUPPORTED_OPERATING_SYSTEM_NAMES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkSpaceApplication$SupportedOperatingSystemNames",
"com.amazonaws.workspaces",
"WorkSpaceApplication",
),
::aws_smithy_schema::ShapeType::List,
"SupportedOperatingSystemNames",
8,
)
.with_list_member(&WORKSPACEAPPLICATION_MEMBER_SUPPORTED_OPERATING_SYSTEM_NAMES_MEMBER);
static WORKSPACEAPPLICATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkSpaceApplication",
"com.amazonaws.workspaces",
"WorkSpaceApplication",
),
::aws_smithy_schema::ShapeType::Structure,
&[
&WORKSPACEAPPLICATION_MEMBER_APPLICATION_ID,
&WORKSPACEAPPLICATION_MEMBER_CREATED,
&WORKSPACEAPPLICATION_MEMBER_DESCRIPTION,
&WORKSPACEAPPLICATION_MEMBER_LICENSE_TYPE,
&WORKSPACEAPPLICATION_MEMBER_NAME,
&WORKSPACEAPPLICATION_MEMBER_OWNER,
&WORKSPACEAPPLICATION_MEMBER_STATE,
&WORKSPACEAPPLICATION_MEMBER_SUPPORTED_COMPUTE_TYPE_NAMES,
&WORKSPACEAPPLICATION_MEMBER_SUPPORTED_OPERATING_SYSTEM_NAMES,
],
);
impl crate::types::WorkSpaceApplication {
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &WORKSPACEAPPLICATION_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for crate::types::WorkSpaceApplication {
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.application_id {
ser.write_string(&WORKSPACEAPPLICATION_MEMBER_APPLICATION_ID, val)?;
}
if let Some(ref val) = self.created {
ser.write_timestamp(&WORKSPACEAPPLICATION_MEMBER_CREATED, val)?;
}
if let Some(ref val) = self.description {
ser.write_string(&WORKSPACEAPPLICATION_MEMBER_DESCRIPTION, val)?;
}
if let Some(ref val) = self.license_type {
ser.write_string(&WORKSPACEAPPLICATION_MEMBER_LICENSE_TYPE, val.as_str())?;
}
if let Some(ref val) = self.name {
ser.write_string(&WORKSPACEAPPLICATION_MEMBER_NAME, val)?;
}
if let Some(ref val) = self.owner {
ser.write_string(&WORKSPACEAPPLICATION_MEMBER_OWNER, val)?;
}
if let Some(ref val) = self.state {
ser.write_string(&WORKSPACEAPPLICATION_MEMBER_STATE, val.as_str())?;
}
if let Some(ref val) = self.supported_compute_type_names {
ser.write_list(
&WORKSPACEAPPLICATION_MEMBER_SUPPORTED_COMPUTE_TYPE_NAMES,
&|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
for item in val {
ser.write_string(&aws_smithy_schema::prelude::STRING, item.as_str())?;
}
Ok(())
},
)?;
}
if let Some(ref val) = self.supported_operating_system_names {
ser.write_list(
&WORKSPACEAPPLICATION_MEMBER_SUPPORTED_OPERATING_SYSTEM_NAMES,
&|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
for item in val {
ser.write_string(&aws_smithy_schema::prelude::STRING, item.as_str())?;
}
Ok(())
},
)?;
}
Ok(())
}
}
impl crate::types::builders::WorkSpaceApplicationBuilder {
#[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(&WORKSPACEAPPLICATION_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.application_id = Some(deser.read_string(member)?);
}
}
Some(1) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.created = Some(deser.read_timestamp(member)?);
}
}
Some(2) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.description = Some(deser.read_string(member)?);
}
}
Some(3) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.license_type = Some(crate::types::WorkSpaceApplicationLicenseType::from(deser.read_string(member)?.as_str()));
}
}
Some(4) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.name = Some(deser.read_string(member)?);
}
}
Some(5) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.owner = Some(deser.read_string(member)?);
}
}
Some(6) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.state = Some(crate::types::WorkSpaceApplicationState::from(deser.read_string(member)?.as_str()));
}
}
Some(7) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.supported_compute_type_names = Some({
let mut container = Vec::new();
deser.read_list(member, &mut |deser| {
container.push(crate::types::Compute::from(
deser.read_string(&::aws_smithy_schema::prelude::STRING)?.as_str(),
));
Ok(())
})?;
container
});
}
}
Some(8) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.supported_operating_system_names = Some({
let mut container = Vec::new();
deser.read_list(member, &mut |deser| {
container.push(crate::types::OperatingSystemName::from(
deser.read_string(&::aws_smithy_schema::prelude::STRING)?.as_str(),
));
Ok(())
})?;
container
});
}
}
_ => {}
}
Ok(())
})
}
}
impl crate::types::WorkSpaceApplication {
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())
}
}