static GETSNAPSHOTBLOCKOUTPUT_MEMBER_DATA_LENGTH: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#GetSnapshotBlockOutput$DataLength",
"com.amazonaws.ebs.synthetic",
"GetSnapshotBlockOutput",
),
::aws_smithy_schema::ShapeType::Integer,
"DataLength",
0,
)
.with_http_header("x-amz-Data-Length");
static GETSNAPSHOTBLOCKOUTPUT_MEMBER_BLOCK_DATA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#GetSnapshotBlockOutput$BlockData",
"com.amazonaws.ebs.synthetic",
"GetSnapshotBlockOutput",
),
::aws_smithy_schema::ShapeType::Blob,
"BlockData",
1,
)
.with_http_payload()
.with_streaming();
static GETSNAPSHOTBLOCKOUTPUT_MEMBER_CHECKSUM: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#GetSnapshotBlockOutput$Checksum",
"com.amazonaws.ebs.synthetic",
"GetSnapshotBlockOutput",
),
::aws_smithy_schema::ShapeType::String,
"Checksum",
2,
)
.with_http_header("x-amz-Checksum");
static GETSNAPSHOTBLOCKOUTPUT_MEMBER_CHECKSUM_ALGORITHM: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#GetSnapshotBlockOutput$ChecksumAlgorithm",
"com.amazonaws.ebs.synthetic",
"GetSnapshotBlockOutput",
),
::aws_smithy_schema::ShapeType::String,
"ChecksumAlgorithm",
3,
)
.with_http_header("x-amz-Checksum-Algorithm");
static GETSNAPSHOTBLOCKOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.ebs.synthetic#GetSnapshotBlockOutput",
"com.amazonaws.ebs.synthetic",
"GetSnapshotBlockOutput",
),
::aws_smithy_schema::ShapeType::Structure,
&[
&GETSNAPSHOTBLOCKOUTPUT_MEMBER_DATA_LENGTH,
&GETSNAPSHOTBLOCKOUTPUT_MEMBER_BLOCK_DATA,
&GETSNAPSHOTBLOCKOUTPUT_MEMBER_CHECKSUM,
&GETSNAPSHOTBLOCKOUTPUT_MEMBER_CHECKSUM_ALGORITHM,
],
)
.with_original_name("GetSnapshotBlockResponse");
impl crate::operation::get_snapshot_block::GetSnapshotBlockOutput {
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETSNAPSHOTBLOCKOUTPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::get_snapshot_block::GetSnapshotBlockOutput {
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.data_length {
ser.write_integer(&GETSNAPSHOTBLOCKOUTPUT_MEMBER_DATA_LENGTH, *val)?;
}
if let Some(ref val) = self.checksum {
ser.write_string(&GETSNAPSHOTBLOCKOUTPUT_MEMBER_CHECKSUM, val)?;
}
if let Some(ref val) = self.checksum_algorithm {
ser.write_string(&GETSNAPSHOTBLOCKOUTPUT_MEMBER_CHECKSUM_ALGORITHM, val.as_str())?;
}
Ok(())
}
}
impl crate::operation::get_snapshot_block::builders::GetSnapshotBlockOutputBuilder {
#[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(&GETSNAPSHOTBLOCKOUTPUT_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.data_length = Some(deser.read_integer(member)?);
}
}
Some(1) => {
deser.skip_value()?;
}
Some(2) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.checksum = Some(deser.read_string(member)?);
}
}
Some(3) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.checksum_algorithm = Some(crate::types::ChecksumAlgorithm::from(deser.read_string(member)?.as_str()));
}
}
_ => {}
}
Ok(())
})
}
}
impl crate::operation::get_snapshot_block::GetSnapshotBlockOutput {
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())
}
}