aws_sdk_glue/schema_serde/
shape_cursor_configuration.rs1static CURSORCONFIGURATION_MEMBER_NEXT_PAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts(
4 "com.amazonaws.glue#CursorConfiguration$NextPage",
5 "com.amazonaws.glue",
6 "CursorConfiguration",
7 ),
8 ::aws_smithy_schema::ShapeType::Structure,
9 "NextPage",
10 0,
11);
12static CURSORCONFIGURATION_MEMBER_LIMIT_PARAMETER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
13 ::aws_smithy_schema::ShapeId::from_parts(
14 "com.amazonaws.glue#CursorConfiguration$LimitParameter",
15 "com.amazonaws.glue",
16 "CursorConfiguration",
17 ),
18 ::aws_smithy_schema::ShapeType::Structure,
19 "LimitParameter",
20 1,
21);
22static CURSORCONFIGURATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
23 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#CursorConfiguration", "com.amazonaws.glue", "CursorConfiguration"),
24 ::aws_smithy_schema::ShapeType::Structure,
25 &[&CURSORCONFIGURATION_MEMBER_NEXT_PAGE, &CURSORCONFIGURATION_MEMBER_LIMIT_PARAMETER],
26);
27impl crate::types::CursorConfiguration {
28 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CURSORCONFIGURATION_SCHEMA;
30}
31impl ::aws_smithy_schema::serde::SerializableStruct for crate::types::CursorConfiguration {
32 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
33 Self::SCHEMA
34 }
35
36 #[allow(unused_variables, clippy::diverging_sub_expression)]
37 fn serialize_members(
38 &self,
39 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
40 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
41 if let Some(ref val) = self.next_page {
42 ser.write_struct(&CURSORCONFIGURATION_MEMBER_NEXT_PAGE, val)?;
43 }
44 if let Some(ref val) = self.limit_parameter {
45 ser.write_struct(&CURSORCONFIGURATION_MEMBER_LIMIT_PARAMETER, val)?;
46 }
47 Ok(())
48 }
49}
50impl crate::types::builders::CursorConfigurationBuilder {
51 #[allow(
52 unused_variables,
53 unreachable_code,
54 clippy::single_match,
55 clippy::match_single_binding,
56 clippy::diverging_sub_expression
57 )]
58 pub(crate) fn deserialize_members(
59 &mut self,
60 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
61 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
62 deserializer.read_struct(&CURSORCONFIGURATION_SCHEMA, &mut |member, deser| {
63 match member.member_index() {
64 Some(0) => {
65 if deser.is_null() {
66 deser.read_null()?;
67 } else {
68 self.next_page = Some(crate::types::ExtractedParameter::deserialize(deser)?);
69 }
70 }
71 Some(1) => {
72 if deser.is_null() {
73 deser.read_null()?;
74 } else {
75 self.limit_parameter = Some(crate::types::ExtractedParameter::deserialize(deser)?);
76 }
77 }
78 _ => {}
79 }
80 Ok(())
81 })
82 }
83}
84
85impl crate::types::CursorConfiguration {
86 pub fn deserialize(
88 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
89 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
90 let mut builder = Self::builder();
91 builder.deserialize_members(deserializer)?;
92 Ok(builder.build())
93 }
94}