29 29 | "com.amazonaws.ec2.synthetic",
|
30 30 | "DeleteInstanceEventWindowInput",
|
31 31 | );
|
32 32 | static DELETEINSTANCEEVENTWINDOWINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
33 33 | ::aws_smithy_schema::ShapeId::from_static(
|
34 34 | "com.amazonaws.ec2.synthetic#DeleteInstanceEventWindowInput$DryRun",
|
35 35 | "com.amazonaws.ec2.synthetic",
|
36 36 | "DeleteInstanceEventWindowInput",
|
37 37 | ),
|
38 38 | ::aws_smithy_schema::ShapeType::Boolean,
|
39 - | "dry_run",
|
39 + | "DryRun",
|
40 40 | 0,
|
41 41 | );
|
42 42 | static DELETEINSTANCEEVENTWINDOWINPUT_MEMBER_FORCE_DELETE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
43 43 | ::aws_smithy_schema::ShapeId::from_static(
|
44 44 | "com.amazonaws.ec2.synthetic#DeleteInstanceEventWindowInput$ForceDelete",
|
45 45 | "com.amazonaws.ec2.synthetic",
|
46 46 | "DeleteInstanceEventWindowInput",
|
47 47 | ),
|
48 48 | ::aws_smithy_schema::ShapeType::Boolean,
|
49 - | "force_delete",
|
49 + | "ForceDelete",
|
50 50 | 1,
|
51 51 | );
|
52 52 | static DELETEINSTANCEEVENTWINDOWINPUT_MEMBER_INSTANCE_EVENT_WINDOW_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
53 53 | ::aws_smithy_schema::ShapeId::from_static(
|
54 54 | "com.amazonaws.ec2.synthetic#DeleteInstanceEventWindowInput$InstanceEventWindowId",
|
55 55 | "com.amazonaws.ec2.synthetic",
|
56 56 | "DeleteInstanceEventWindowInput",
|
57 57 | ),
|
58 58 | ::aws_smithy_schema::ShapeType::String,
|
59 - | "instance_event_window_id",
|
59 + | "InstanceEventWindowId",
|
60 60 | 2,
|
61 61 | )
|
62 62 | .with_xml_name("InstanceEventWindowId");
|
63 63 | static DELETEINSTANCEEVENTWINDOWINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
64 64 | DELETEINSTANCEEVENTWINDOWINPUT_SCHEMA_ID,
|
65 65 | ::aws_smithy_schema::ShapeType::Structure,
|
66 66 | &[
|
67 67 | &DELETEINSTANCEEVENTWINDOWINPUT_MEMBER_DRY_RUN,
|
68 68 | &DELETEINSTANCEEVENTWINDOWINPUT_MEMBER_FORCE_DELETE,
|
69 69 | &DELETEINSTANCEEVENTWINDOWINPUT_MEMBER_INSTANCE_EVENT_WINDOW_ID,
|
70 70 | ],
|
71 71 | );
|
72 72 | impl DeleteInstanceEventWindowInput {
|
73 73 | /// The schema for this shape.
|
74 74 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEINSTANCEEVENTWINDOWINPUT_SCHEMA;
|
75 75 | }
|
76 76 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteInstanceEventWindowInput {
|
77 77 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
78 78 | fn serialize_members(
|
79 79 | &self,
|
80 80 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
81 81 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
82 82 | if let Some(ref val) = self.dry_run {
|
83 83 | ser.write_boolean(&DELETEINSTANCEEVENTWINDOWINPUT_MEMBER_DRY_RUN, *val)?;
|
84 84 | }
|
85 85 | if let Some(ref val) = self.force_delete {
|
86 86 | ser.write_boolean(&DELETEINSTANCEEVENTWINDOWINPUT_MEMBER_FORCE_DELETE, *val)?;
|
87 87 | }
|
88 88 | if let Some(ref val) = self.instance_event_window_id {
|
89 89 | ser.write_string(&DELETEINSTANCEEVENTWINDOWINPUT_MEMBER_INSTANCE_EVENT_WINDOW_ID, val)?;
|
90 90 | }
|
91 91 | Ok(())
|
92 92 | }
|
93 93 | }
|
94 94 | impl DeleteInstanceEventWindowInput {
|
95 95 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
96 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
97 - | deserializer: &mut D,
|
96 + | pub fn deserialize(
|
97 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
98 98 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
99 99 | #[allow(unused_variables, unused_mut)]
|
100 100 | let mut builder = Self::builder();
|
101 101 | #[allow(
|
102 102 | unused_variables,
|
103 103 | unreachable_code,
|
104 104 | clippy::single_match,
|
105 105 | clippy::match_single_binding,
|
106 106 | clippy::diverging_sub_expression
|
107 107 | )]
|
108 - | deserializer.read_struct(&DELETEINSTANCEEVENTWINDOWINPUT_SCHEMA, (), |_, member, deser| {
|
108 + | deserializer.read_struct(&DELETEINSTANCEEVENTWINDOWINPUT_SCHEMA, &mut |member, deser| {
|
109 109 | match member.member_index() {
|
110 110 | Some(0) => {
|
111 111 | builder.dry_run = Some(deser.read_boolean(member)?);
|
112 112 | }
|
113 113 | Some(1) => {
|
114 114 | builder.force_delete = Some(deser.read_boolean(member)?);
|
115 115 | }
|
116 116 | Some(2) => {
|
117 117 | builder.instance_event_window_id = Some(deser.read_string(member)?);
|
118 118 | }
|
119 119 | _ => {}
|
120 120 | }
|
121 121 | Ok(())
|
122 122 | })?;
|
123 + | builder.instance_event_window_id = builder.instance_event_window_id.or(Some(String::new()));
|
123 124 | builder
|
124 125 | .build()
|
125 126 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
126 127 | }
|
127 128 | }
|
129 + | impl DeleteInstanceEventWindowInput {
|
130 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
131 + | pub fn deserialize_with_response(
|
132 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
133 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
134 + | _status: u16,
|
135 + | _body: &[u8],
|
136 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
137 + | Self::deserialize(deserializer)
|
138 + | }
|
139 + | }
|
128 140 | impl DeleteInstanceEventWindowInput {
|
129 141 | /// Creates a new builder-style object to manufacture [`DeleteInstanceEventWindowInput`](crate::operation::delete_instance_event_window::DeleteInstanceEventWindowInput).
|
130 142 | pub fn builder() -> crate::operation::delete_instance_event_window::builders::DeleteInstanceEventWindowInputBuilder {
|
131 143 | crate::operation::delete_instance_event_window::builders::DeleteInstanceEventWindowInputBuilder::default()
|
132 144 | }
|
133 145 | }
|
134 146 |
|
135 147 | /// A builder for [`DeleteInstanceEventWindowInput`](crate::operation::delete_instance_event_window::DeleteInstanceEventWindowInput).
|
136 148 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
137 149 | #[non_exhaustive]
|
138 150 | pub struct DeleteInstanceEventWindowInputBuilder {
|
139 151 | pub(crate) dry_run: ::std::option::Option<bool>,
|
140 152 | pub(crate) force_delete: ::std::option::Option<bool>,
|
141 153 | pub(crate) instance_event_window_id: ::std::option::Option<::std::string::String>,
|
142 154 | }
|
143 155 | impl DeleteInstanceEventWindowInputBuilder {
|
144 156 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
145 157 | pub fn dry_run(mut self, input: bool) -> Self {
|
146 158 | self.dry_run = ::std::option::Option::Some(input);
|
147 159 | self
|
148 160 | }
|
149 161 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
150 162 | pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
|
151 163 | self.dry_run = input;
|
152 164 | self
|
153 165 | }
|
154 166 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
155 167 | pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
|
156 168 | &self.dry_run
|
157 169 | }
|