aws_sdk_glue/schema_serde/
shape_get_crawler_metrics_input_input.rs1static GETCRAWLERMETRICSINPUT_MEMBER_CRAWLER_NAME_LIST_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.glue#CrawlerNameList$member", "com.amazonaws.glue", "CrawlerNameList"),
4 ::aws_smithy_schema::ShapeType::String,
5 "member",
6 0,
7);
8static GETCRAWLERMETRICSINPUT_MEMBER_CRAWLER_NAME_LIST: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
9 ::aws_smithy_schema::ShapeId::from_parts(
10 "com.amazonaws.glue.synthetic#GetCrawlerMetricsInput$CrawlerNameList",
11 "com.amazonaws.glue.synthetic",
12 "GetCrawlerMetricsInput",
13 ),
14 ::aws_smithy_schema::ShapeType::List,
15 "CrawlerNameList",
16 0,
17)
18.with_list_member(&GETCRAWLERMETRICSINPUT_MEMBER_CRAWLER_NAME_LIST_MEMBER);
19static GETCRAWLERMETRICSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
20 ::aws_smithy_schema::ShapeId::from_parts(
21 "com.amazonaws.glue.synthetic#GetCrawlerMetricsInput$MaxResults",
22 "com.amazonaws.glue.synthetic",
23 "GetCrawlerMetricsInput",
24 ),
25 ::aws_smithy_schema::ShapeType::Integer,
26 "MaxResults",
27 1,
28);
29static GETCRAWLERMETRICSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
30 ::aws_smithy_schema::ShapeId::from_parts(
31 "com.amazonaws.glue.synthetic#GetCrawlerMetricsInput$NextToken",
32 "com.amazonaws.glue.synthetic",
33 "GetCrawlerMetricsInput",
34 ),
35 ::aws_smithy_schema::ShapeType::String,
36 "NextToken",
37 2,
38);
39static GETCRAWLERMETRICSINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
40 ::aws_smithy_schema::ShapeId::from_parts(
41 "com.amazonaws.glue.synthetic#GetCrawlerMetricsInput",
42 "com.amazonaws.glue.synthetic",
43 "GetCrawlerMetricsInput",
44 ),
45 ::aws_smithy_schema::ShapeType::Structure,
46 &[
47 &GETCRAWLERMETRICSINPUT_MEMBER_CRAWLER_NAME_LIST,
48 &GETCRAWLERMETRICSINPUT_MEMBER_MAX_RESULTS,
49 &GETCRAWLERMETRICSINPUT_MEMBER_NEXT_TOKEN,
50 ],
51)
52.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
53.with_original_name("GetCrawlerMetricsRequest");
54impl crate::operation::get_crawler_metrics::GetCrawlerMetricsInput {
55 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETCRAWLERMETRICSINPUT_SCHEMA;
57}
58impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::get_crawler_metrics::GetCrawlerMetricsInput {
59 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
60 Self::SCHEMA
61 }
62
63 #[allow(unused_variables, clippy::diverging_sub_expression)]
64 fn serialize_members(
65 &self,
66 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
67 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
68 if let Some(ref val) = self.crawler_name_list {
69 ser.write_list(
70 &GETCRAWLERMETRICSINPUT_MEMBER_CRAWLER_NAME_LIST,
71 &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
72 for item in val {
73 ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
74 }
75 Ok(())
76 },
77 )?;
78 }
79 if let Some(ref val) = self.max_results {
80 ser.write_integer(&GETCRAWLERMETRICSINPUT_MEMBER_MAX_RESULTS, *val)?;
81 }
82 if let Some(ref val) = self.next_token {
83 ser.write_string(&GETCRAWLERMETRICSINPUT_MEMBER_NEXT_TOKEN, val)?;
84 }
85 Ok(())
86 }
87}
88impl crate::operation::get_crawler_metrics::builders::GetCrawlerMetricsInputBuilder {
89 #[allow(
90 unused_variables,
91 unreachable_code,
92 clippy::single_match,
93 clippy::match_single_binding,
94 clippy::diverging_sub_expression
95 )]
96 pub(crate) fn deserialize_members(
97 &mut self,
98 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
99 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
100 deserializer.read_struct(&GETCRAWLERMETRICSINPUT_SCHEMA, &mut |member, deser| {
101 match member.member_index() {
102 Some(0) => {
103 if deser.is_null() {
104 deser.read_null()?;
105 } else {
106 self.crawler_name_list = Some(deser.read_string_list(member)?);
107 }
108 }
109 Some(1) => {
110 if deser.is_null() {
111 deser.read_null()?;
112 } else {
113 self.max_results = Some(deser.read_integer(member)?);
114 }
115 }
116 Some(2) => {
117 if deser.is_null() {
118 deser.read_null()?;
119 } else {
120 self.next_token = Some(deser.read_string(member)?);
121 }
122 }
123 _ => {}
124 }
125 Ok(())
126 })
127 }
128}
129
130impl crate::operation::get_crawler_metrics::GetCrawlerMetricsInput {
131 pub fn deserialize(
133 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
134 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
135 let mut builder = Self::builder();
136 builder.deserialize_members(deserializer)?;
137 builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
138 }
139}