aws_sdk_glue/schema_serde/
shape_get_usage_profile_output_output.rs1static GETUSAGEPROFILEOUTPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
3 ::aws_smithy_schema::ShapeId::from_parts(
4 "com.amazonaws.glue.synthetic#GetUsageProfileOutput$Name",
5 "com.amazonaws.glue.synthetic",
6 "GetUsageProfileOutput",
7 ),
8 ::aws_smithy_schema::ShapeType::String,
9 "Name",
10 0,
11);
12static GETUSAGEPROFILEOUTPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
13 ::aws_smithy_schema::ShapeId::from_parts(
14 "com.amazonaws.glue.synthetic#GetUsageProfileOutput$Description",
15 "com.amazonaws.glue.synthetic",
16 "GetUsageProfileOutput",
17 ),
18 ::aws_smithy_schema::ShapeType::String,
19 "Description",
20 1,
21);
22static GETUSAGEPROFILEOUTPUT_MEMBER_CONFIGURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
23 ::aws_smithy_schema::ShapeId::from_parts(
24 "com.amazonaws.glue.synthetic#GetUsageProfileOutput$Configuration",
25 "com.amazonaws.glue.synthetic",
26 "GetUsageProfileOutput",
27 ),
28 ::aws_smithy_schema::ShapeType::Structure,
29 "Configuration",
30 2,
31);
32static GETUSAGEPROFILEOUTPUT_MEMBER_CREATED_ON: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
33 ::aws_smithy_schema::ShapeId::from_parts(
34 "com.amazonaws.glue.synthetic#GetUsageProfileOutput$CreatedOn",
35 "com.amazonaws.glue.synthetic",
36 "GetUsageProfileOutput",
37 ),
38 ::aws_smithy_schema::ShapeType::Timestamp,
39 "CreatedOn",
40 3,
41);
42static GETUSAGEPROFILEOUTPUT_MEMBER_LAST_MODIFIED_ON: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
43 ::aws_smithy_schema::ShapeId::from_parts(
44 "com.amazonaws.glue.synthetic#GetUsageProfileOutput$LastModifiedOn",
45 "com.amazonaws.glue.synthetic",
46 "GetUsageProfileOutput",
47 ),
48 ::aws_smithy_schema::ShapeType::Timestamp,
49 "LastModifiedOn",
50 4,
51);
52static GETUSAGEPROFILEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
53 ::aws_smithy_schema::ShapeId::from_parts(
54 "com.amazonaws.glue.synthetic#GetUsageProfileOutput",
55 "com.amazonaws.glue.synthetic",
56 "GetUsageProfileOutput",
57 ),
58 ::aws_smithy_schema::ShapeType::Structure,
59 &[
60 &GETUSAGEPROFILEOUTPUT_MEMBER_NAME,
61 &GETUSAGEPROFILEOUTPUT_MEMBER_DESCRIPTION,
62 &GETUSAGEPROFILEOUTPUT_MEMBER_CONFIGURATION,
63 &GETUSAGEPROFILEOUTPUT_MEMBER_CREATED_ON,
64 &GETUSAGEPROFILEOUTPUT_MEMBER_LAST_MODIFIED_ON,
65 ],
66)
67.with_original_name("GetUsageProfileResponse");
68impl crate::operation::get_usage_profile::GetUsageProfileOutput {
69 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETUSAGEPROFILEOUTPUT_SCHEMA;
71}
72impl ::aws_smithy_schema::serde::SerializableStruct for crate::operation::get_usage_profile::GetUsageProfileOutput {
73 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
74 Self::SCHEMA
75 }
76
77 #[allow(unused_variables, clippy::diverging_sub_expression)]
78 fn serialize_members(
79 &self,
80 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
81 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
82 if let Some(ref val) = self.name {
83 ser.write_string(&GETUSAGEPROFILEOUTPUT_MEMBER_NAME, val)?;
84 }
85 if let Some(ref val) = self.description {
86 ser.write_string(&GETUSAGEPROFILEOUTPUT_MEMBER_DESCRIPTION, val)?;
87 }
88 if let Some(ref val) = self.configuration {
89 ser.write_struct(&GETUSAGEPROFILEOUTPUT_MEMBER_CONFIGURATION, val)?;
90 }
91 if let Some(ref val) = self.created_on {
92 ser.write_timestamp(&GETUSAGEPROFILEOUTPUT_MEMBER_CREATED_ON, val)?;
93 }
94 if let Some(ref val) = self.last_modified_on {
95 ser.write_timestamp(&GETUSAGEPROFILEOUTPUT_MEMBER_LAST_MODIFIED_ON, val)?;
96 }
97 Ok(())
98 }
99}
100impl crate::operation::get_usage_profile::builders::GetUsageProfileOutputBuilder {
101 #[allow(
102 unused_variables,
103 unreachable_code,
104 clippy::single_match,
105 clippy::match_single_binding,
106 clippy::diverging_sub_expression
107 )]
108 pub(crate) fn deserialize_members(
109 &mut self,
110 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
111 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
112 deserializer.read_struct(&GETUSAGEPROFILEOUTPUT_SCHEMA, &mut |member, deser| {
113 match member.member_index() {
114 Some(0) => {
115 if deser.is_null() {
116 deser.read_null()?;
117 } else {
118 self.name = Some(deser.read_string(member)?);
119 }
120 }
121 Some(1) => {
122 if deser.is_null() {
123 deser.read_null()?;
124 } else {
125 self.description = Some(deser.read_string(member)?);
126 }
127 }
128 Some(2) => {
129 if deser.is_null() {
130 deser.read_null()?;
131 } else {
132 self.configuration = Some(crate::types::ProfileConfiguration::deserialize(deser)?);
133 }
134 }
135 Some(3) => {
136 if deser.is_null() {
137 deser.read_null()?;
138 } else {
139 self.created_on = Some(deser.read_timestamp(member)?);
140 }
141 }
142 Some(4) => {
143 if deser.is_null() {
144 deser.read_null()?;
145 } else {
146 self.last_modified_on = Some(deser.read_timestamp(member)?);
147 }
148 }
149 _ => {}
150 }
151 Ok(())
152 })
153 }
154}
155
156impl crate::operation::get_usage_profile::GetUsageProfileOutput {
157 pub fn deserialize(
159 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
160 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
161 let mut builder = Self::builder();
162 builder.deserialize_members(deserializer)?;
163 Ok(builder.build())
164 }
165}