static DESCRIBEWORKSPACESINPUT_MEMBER_WORKSPACE_IDS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces#WorkspaceIdList$member",
"com.amazonaws.workspaces",
"WorkspaceIdList",
),
::aws_smithy_schema::ShapeType::String,
"member",
0,
);
static DESCRIBEWORKSPACESINPUT_MEMBER_WORKSPACE_IDS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#DescribeWorkspacesInput$WorkspaceIds",
"com.amazonaws.workspaces.synthetic",
"DescribeWorkspacesInput",
),
::aws_smithy_schema::ShapeType::List,
"WorkspaceIds",
0,
)
.with_list_member(&DESCRIBEWORKSPACESINPUT_MEMBER_WORKSPACE_IDS_MEMBER);
static DESCRIBEWORKSPACESINPUT_MEMBER_DIRECTORY_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#DescribeWorkspacesInput$DirectoryId",
"com.amazonaws.workspaces.synthetic",
"DescribeWorkspacesInput",
),
::aws_smithy_schema::ShapeType::String,
"DirectoryId",
1,
);
static DESCRIBEWORKSPACESINPUT_MEMBER_USER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#DescribeWorkspacesInput$UserName",
"com.amazonaws.workspaces.synthetic",
"DescribeWorkspacesInput",
),
::aws_smithy_schema::ShapeType::String,
"UserName",
2,
);
static DESCRIBEWORKSPACESINPUT_MEMBER_BUNDLE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#DescribeWorkspacesInput$BundleId",
"com.amazonaws.workspaces.synthetic",
"DescribeWorkspacesInput",
),
::aws_smithy_schema::ShapeType::String,
"BundleId",
3,
);
static DESCRIBEWORKSPACESINPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#DescribeWorkspacesInput$Limit",
"com.amazonaws.workspaces.synthetic",
"DescribeWorkspacesInput",
),
::aws_smithy_schema::ShapeType::Integer,
"Limit",
4,
);
static DESCRIBEWORKSPACESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#DescribeWorkspacesInput$NextToken",
"com.amazonaws.workspaces.synthetic",
"DescribeWorkspacesInput",
),
::aws_smithy_schema::ShapeType::String,
"NextToken",
5,
);
static DESCRIBEWORKSPACESINPUT_MEMBER_WORKSPACE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#DescribeWorkspacesInput$WorkspaceName",
"com.amazonaws.workspaces.synthetic",
"DescribeWorkspacesInput",
),
::aws_smithy_schema::ShapeType::String,
"WorkspaceName",
6,
);
static DESCRIBEWORKSPACESINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#DescribeWorkspacesInput",
"com.amazonaws.workspaces.synthetic",
"DescribeWorkspacesInput",
),
::aws_smithy_schema::ShapeType::Structure,
&[
&DESCRIBEWORKSPACESINPUT_MEMBER_WORKSPACE_IDS,
&DESCRIBEWORKSPACESINPUT_MEMBER_DIRECTORY_ID,
&DESCRIBEWORKSPACESINPUT_MEMBER_USER_NAME,
&DESCRIBEWORKSPACESINPUT_MEMBER_BUNDLE_ID,
&DESCRIBEWORKSPACESINPUT_MEMBER_LIMIT,
&DESCRIBEWORKSPACESINPUT_MEMBER_NEXT_TOKEN,
&DESCRIBEWORKSPACESINPUT_MEMBER_WORKSPACE_NAME,
],
)
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
.with_original_name("DescribeWorkspacesRequest");
impl crate::operation::describe_workspaces::DescribeWorkspacesInput {
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DESCRIBEWORKSPACESINPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::describe_workspaces::DescribeWorkspacesInput {
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.workspace_ids {
ser.write_list(
&DESCRIBEWORKSPACESINPUT_MEMBER_WORKSPACE_IDS,
&|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
for item in val {
ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
}
Ok(())
},
)?;
}
if let Some(ref val) = self.directory_id {
ser.write_string(&DESCRIBEWORKSPACESINPUT_MEMBER_DIRECTORY_ID, val)?;
}
if let Some(ref val) = self.user_name {
ser.write_string(&DESCRIBEWORKSPACESINPUT_MEMBER_USER_NAME, val)?;
}
if let Some(ref val) = self.bundle_id {
ser.write_string(&DESCRIBEWORKSPACESINPUT_MEMBER_BUNDLE_ID, val)?;
}
if let Some(ref val) = self.limit {
ser.write_integer(&DESCRIBEWORKSPACESINPUT_MEMBER_LIMIT, *val)?;
}
if let Some(ref val) = self.next_token {
ser.write_string(&DESCRIBEWORKSPACESINPUT_MEMBER_NEXT_TOKEN, val)?;
}
if let Some(ref val) = self.workspace_name {
ser.write_string(&DESCRIBEWORKSPACESINPUT_MEMBER_WORKSPACE_NAME, val)?;
}
Ok(())
}
}
impl crate::operation::describe_workspaces::builders::DescribeWorkspacesInputBuilder {
#[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(&DESCRIBEWORKSPACESINPUT_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.workspace_ids = Some(deser.read_string_list(member)?);
}
}
Some(1) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.directory_id = Some(deser.read_string(member)?);
}
}
Some(2) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.user_name = Some(deser.read_string(member)?);
}
}
Some(3) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.bundle_id = Some(deser.read_string(member)?);
}
}
Some(4) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.limit = Some(deser.read_integer(member)?);
}
}
Some(5) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.next_token = Some(deser.read_string(member)?);
}
}
Some(6) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.workspace_name = Some(deser.read_string(member)?);
}
}
_ => {}
}
Ok(())
})
}
}
impl crate::operation::describe_workspaces::DescribeWorkspacesInput {
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)?;
builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
}
}