23 23 | "com.amazonaws.s3control.synthetic",
|
24 24 | "DeleteAccessPointPolicyForObjectLambdaInput",
|
25 25 | );
|
26 26 | static DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
27 27 | ::aws_smithy_schema::ShapeId::from_static(
|
28 28 | "com.amazonaws.s3control.synthetic#DeleteAccessPointPolicyForObjectLambdaInput$AccountId",
|
29 29 | "com.amazonaws.s3control.synthetic",
|
30 30 | "DeleteAccessPointPolicyForObjectLambdaInput",
|
31 31 | ),
|
32 32 | ::aws_smithy_schema::ShapeType::String,
|
33 - | "account_id",
|
33 + | "AccountId",
|
34 34 | 0,
|
35 35 | )
|
36 36 | .with_host_label()
|
37 37 | .with_http_header("x-amz-account-id");
|
38 38 | static DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
39 39 | ::aws_smithy_schema::ShapeId::from_static(
|
40 40 | "com.amazonaws.s3control.synthetic#DeleteAccessPointPolicyForObjectLambdaInput$Name",
|
41 41 | "com.amazonaws.s3control.synthetic",
|
42 42 | "DeleteAccessPointPolicyForObjectLambdaInput",
|
43 43 | ),
|
44 44 | ::aws_smithy_schema::ShapeType::String,
|
45 - | "name",
|
45 + | "Name",
|
46 46 | 1,
|
47 47 | )
|
48 48 | .with_http_label();
|
49 49 | static DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
50 50 | DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_SCHEMA_ID,
|
51 51 | ::aws_smithy_schema::ShapeType::Structure,
|
52 52 | &[
|
53 53 | &DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_MEMBER_ACCOUNT_ID,
|
54 54 | &DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_MEMBER_NAME,
|
55 55 | ],
|
56 - | );
|
56 + | )
|
57 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
58 + | "DELETE",
|
59 + | "/v20180820/accesspointforobjectlambda/{Name}/policy",
|
60 + | None,
|
61 + | ));
|
57 62 | impl DeleteAccessPointPolicyForObjectLambdaInput {
|
58 63 | /// The schema for this shape.
|
59 64 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_SCHEMA;
|
60 65 | }
|
61 66 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteAccessPointPolicyForObjectLambdaInput {
|
62 67 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
63 68 | fn serialize_members(
|
64 69 | &self,
|
65 70 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
66 71 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
67 72 | if let Some(ref val) = self.account_id {
|
68 73 | ser.write_string(&DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_MEMBER_ACCOUNT_ID, val)?;
|
69 74 | }
|
70 75 | if let Some(ref val) = self.name {
|
71 76 | ser.write_string(&DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_MEMBER_NAME, val)?;
|
72 77 | }
|
73 78 | Ok(())
|
74 79 | }
|
75 80 | }
|
76 81 | impl DeleteAccessPointPolicyForObjectLambdaInput {
|
77 82 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
78 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
79 - | deserializer: &mut D,
|
83 + | pub fn deserialize(
|
84 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
80 85 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
81 86 | #[allow(unused_variables, unused_mut)]
|
82 87 | let mut builder = Self::builder();
|
83 88 | #[allow(
|
84 89 | unused_variables,
|
85 90 | unreachable_code,
|
86 91 | clippy::single_match,
|
87 92 | clippy::match_single_binding,
|
88 93 | clippy::diverging_sub_expression
|
89 94 | )]
|
90 - | deserializer.read_struct(&DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_SCHEMA, (), |_, member, deser| {
|
95 + | deserializer.read_struct(&DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_SCHEMA, &mut |member, deser| {
|
91 96 | match member.member_index() {
|
92 97 | Some(0) => {
|
93 98 | builder.account_id = Some(deser.read_string(member)?);
|
94 99 | }
|
95 100 | Some(1) => {
|
96 101 | builder.name = Some(deser.read_string(member)?);
|
97 102 | }
|
98 103 | _ => {}
|
99 104 | }
|
100 105 | Ok(())
|
101 106 | })?;
|
107 + | builder.account_id = builder.account_id.or(Some(String::new()));
|
108 + | builder.name = builder.name.or(Some(String::new()));
|
109 + | builder
|
110 + | .build()
|
111 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
112 + | }
|
113 + | }
|
114 + | impl DeleteAccessPointPolicyForObjectLambdaInput {
|
115 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
116 + | /// Header-bound members are read directly from headers, avoiding runtime
|
117 + | /// member iteration overhead. Body members are read via the deserializer.
|
118 + | pub fn deserialize_with_response(
|
119 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
120 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
121 + | _status: u16,
|
122 + | _body: &[u8],
|
123 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
124 + | #[allow(unused_variables, unused_mut)]
|
125 + | let mut builder = Self::builder();
|
126 + | if let Some(val) = headers.get("x-amz-account-id") {
|
127 + | builder.account_id = Some(val.to_string());
|
128 + | }
|
129 + | #[allow(
|
130 + | unused_variables,
|
131 + | unreachable_code,
|
132 + | clippy::single_match,
|
133 + | clippy::match_single_binding,
|
134 + | clippy::diverging_sub_expression
|
135 + | )]
|
136 + | deserializer.read_struct(&DELETEACCESSPOINTPOLICYFOROBJECTLAMBDAINPUT_SCHEMA, &mut |member, deser| {
|
137 + | match member.member_index() {
|
138 + | Some(0) => { /* read from headers above */ }
|
139 + | Some(1) => {
|
140 + | builder.name = Some(deser.read_string(member)?);
|
141 + | }
|
142 + | _ => {}
|
143 + | }
|
144 + | Ok(())
|
145 + | })?;
|
102 146 | builder
|
103 147 | .build()
|
104 148 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
105 149 | }
|
106 150 | }
|
107 151 | impl DeleteAccessPointPolicyForObjectLambdaInput {
|
108 152 | /// Creates a new builder-style object to manufacture [`DeleteAccessPointPolicyForObjectLambdaInput`](crate::operation::delete_access_point_policy_for_object_lambda::DeleteAccessPointPolicyForObjectLambdaInput).
|
109 153 | pub fn builder() -> crate::operation::delete_access_point_policy_for_object_lambda::builders::DeleteAccessPointPolicyForObjectLambdaInputBuilder {
|
110 154 | crate::operation::delete_access_point_policy_for_object_lambda::builders::DeleteAccessPointPolicyForObjectLambdaInputBuilder::default()
|
111 155 | }
|