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