static MODIFYSTREAMINGPROPERTIESINPUT_MEMBER_RESOURCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#ModifyStreamingPropertiesInput$ResourceId",
"com.amazonaws.workspaces.synthetic",
"ModifyStreamingPropertiesInput",
),
::aws_smithy_schema::ShapeType::String,
"ResourceId",
0,
);
static MODIFYSTREAMINGPROPERTIESINPUT_MEMBER_STREAMING_PROPERTIES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#ModifyStreamingPropertiesInput$StreamingProperties",
"com.amazonaws.workspaces.synthetic",
"ModifyStreamingPropertiesInput",
),
::aws_smithy_schema::ShapeType::Structure,
"StreamingProperties",
1,
);
static MODIFYSTREAMINGPROPERTIESINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.workspaces.synthetic#ModifyStreamingPropertiesInput",
"com.amazonaws.workspaces.synthetic",
"ModifyStreamingPropertiesInput",
),
::aws_smithy_schema::ShapeType::Structure,
&[
&MODIFYSTREAMINGPROPERTIESINPUT_MEMBER_RESOURCE_ID,
&MODIFYSTREAMINGPROPERTIESINPUT_MEMBER_STREAMING_PROPERTIES,
],
)
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
.with_original_name("ModifyStreamingPropertiesRequest");
impl crate::operation::modify_streaming_properties::ModifyStreamingPropertiesInput {
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MODIFYSTREAMINGPROPERTIESINPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::modify_streaming_properties::ModifyStreamingPropertiesInput {
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.resource_id {
ser.write_string(&MODIFYSTREAMINGPROPERTIESINPUT_MEMBER_RESOURCE_ID, val)?;
}
if let Some(ref val) = self.streaming_properties {
ser.write_struct(&MODIFYSTREAMINGPROPERTIESINPUT_MEMBER_STREAMING_PROPERTIES, val)?;
}
Ok(())
}
}
impl crate::operation::modify_streaming_properties::builders::ModifyStreamingPropertiesInputBuilder {
#[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(&MODIFYSTREAMINGPROPERTIESINPUT_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.resource_id = Some(deser.read_string(member)?);
}
}
Some(1) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.streaming_properties = Some(crate::types::StreamingProperties::deserialize(deser)?);
}
}
_ => {}
}
Ok(())
})
}
}
impl crate::operation::modify_streaming_properties::ModifyStreamingPropertiesInput {
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.resource_id = builder.resource_id.or(Some(String::new()));
builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
}
}