9 9 | pub instance_event_window_id: ::std::option::Option<::std::string::String>,
|
10 10 | /// <p>One or more targets to disassociate from the specified event window.</p>
|
11 11 | pub association_target: ::std::option::Option<crate::types::InstanceEventWindowDisassociationRequest>,
|
12 12 | }
|
13 13 | impl DisassociateInstanceEventWindowInput {
|
14 14 | /// <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>
|
15 15 | pub fn dry_run(&self) -> ::std::option::Option<bool> {
|
16 16 | self.dry_run
|
17 17 | }
|
18 18 | /// <p>The ID of the event window.</p>
|
19 19 | pub fn instance_event_window_id(&self) -> ::std::option::Option<&str> {
|
20 20 | self.instance_event_window_id.as_deref()
|
21 21 | }
|
22 22 | /// <p>One or more targets to disassociate from the specified event window.</p>
|
23 23 | pub fn association_target(&self) -> ::std::option::Option<&crate::types::InstanceEventWindowDisassociationRequest> {
|
24 24 | self.association_target.as_ref()
|
25 25 | }
|
26 26 | }
|
27 27 | static DISASSOCIATEINSTANCEEVENTWINDOWINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
28 28 | "com.amazonaws.ec2.synthetic#DisassociateInstanceEventWindowInput",
|
29 29 | "com.amazonaws.ec2.synthetic",
|
30 30 | "DisassociateInstanceEventWindowInput",
|
31 31 | );
|
32 32 | static DISASSOCIATEINSTANCEEVENTWINDOWINPUT_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#DisassociateInstanceEventWindowInput$DryRun",
|
35 35 | "com.amazonaws.ec2.synthetic",
|
36 36 | "DisassociateInstanceEventWindowInput",
|
37 37 | ),
|
38 38 | ::aws_smithy_schema::ShapeType::Boolean,
|
39 - | "dry_run",
|
39 + | "DryRun",
|
40 40 | 0,
|
41 41 | );
|
42 42 | static DISASSOCIATEINSTANCEEVENTWINDOWINPUT_MEMBER_INSTANCE_EVENT_WINDOW_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
43 43 | ::aws_smithy_schema::ShapeId::from_static(
|
44 44 | "com.amazonaws.ec2.synthetic#DisassociateInstanceEventWindowInput$InstanceEventWindowId",
|
45 45 | "com.amazonaws.ec2.synthetic",
|
46 46 | "DisassociateInstanceEventWindowInput",
|
47 47 | ),
|
48 48 | ::aws_smithy_schema::ShapeType::String,
|
49 - | "instance_event_window_id",
|
49 + | "InstanceEventWindowId",
|
50 50 | 1,
|
51 51 | );
|
52 52 | static DISASSOCIATEINSTANCEEVENTWINDOWINPUT_MEMBER_ASSOCIATION_TARGET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
53 53 | ::aws_smithy_schema::ShapeId::from_static(
|
54 54 | "com.amazonaws.ec2.synthetic#DisassociateInstanceEventWindowInput$AssociationTarget",
|
55 55 | "com.amazonaws.ec2.synthetic",
|
56 56 | "DisassociateInstanceEventWindowInput",
|
57 57 | ),
|
58 58 | ::aws_smithy_schema::ShapeType::Structure,
|
59 - | "association_target",
|
59 + | "AssociationTarget",
|
60 60 | 2,
|
61 61 | );
|
62 62 | static DISASSOCIATEINSTANCEEVENTWINDOWINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
63 63 | DISASSOCIATEINSTANCEEVENTWINDOWINPUT_SCHEMA_ID,
|
64 64 | ::aws_smithy_schema::ShapeType::Structure,
|
65 65 | &[
|
66 66 | &DISASSOCIATEINSTANCEEVENTWINDOWINPUT_MEMBER_DRY_RUN,
|
67 67 | &DISASSOCIATEINSTANCEEVENTWINDOWINPUT_MEMBER_INSTANCE_EVENT_WINDOW_ID,
|
68 68 | &DISASSOCIATEINSTANCEEVENTWINDOWINPUT_MEMBER_ASSOCIATION_TARGET,
|
69 69 | ],
|
70 70 | );
|
71 71 | impl DisassociateInstanceEventWindowInput {
|
72 72 | /// The schema for this shape.
|
73 73 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DISASSOCIATEINSTANCEEVENTWINDOWINPUT_SCHEMA;
|
74 74 | }
|
75 75 | impl ::aws_smithy_schema::serde::SerializableStruct for DisassociateInstanceEventWindowInput {
|
76 76 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
77 77 | fn serialize_members(
|
78 78 | &self,
|
79 79 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
80 80 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
81 81 | if let Some(ref val) = self.dry_run {
|
82 82 | ser.write_boolean(&DISASSOCIATEINSTANCEEVENTWINDOWINPUT_MEMBER_DRY_RUN, *val)?;
|
83 83 | }
|
84 84 | if let Some(ref val) = self.instance_event_window_id {
|
85 85 | ser.write_string(&DISASSOCIATEINSTANCEEVENTWINDOWINPUT_MEMBER_INSTANCE_EVENT_WINDOW_ID, val)?;
|
86 86 | }
|
87 87 | if let Some(ref val) = self.association_target {
|
88 88 | ser.write_struct(&DISASSOCIATEINSTANCEEVENTWINDOWINPUT_MEMBER_ASSOCIATION_TARGET, val)?;
|
89 89 | }
|
90 90 | Ok(())
|
91 91 | }
|
92 92 | }
|
93 93 | impl DisassociateInstanceEventWindowInput {
|
94 94 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
95 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
96 - | deserializer: &mut D,
|
95 + | pub fn deserialize(
|
96 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
97 97 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
98 98 | #[allow(unused_variables, unused_mut)]
|
99 99 | let mut builder = Self::builder();
|
100 100 | #[allow(
|
101 101 | unused_variables,
|
102 102 | unreachable_code,
|
103 103 | clippy::single_match,
|
104 104 | clippy::match_single_binding,
|
105 105 | clippy::diverging_sub_expression
|
106 106 | )]
|
107 - | deserializer.read_struct(&DISASSOCIATEINSTANCEEVENTWINDOWINPUT_SCHEMA, (), |_, member, deser| {
|
107 + | deserializer.read_struct(&DISASSOCIATEINSTANCEEVENTWINDOWINPUT_SCHEMA, &mut |member, deser| {
|
108 108 | match member.member_index() {
|
109 109 | Some(0) => {
|
110 110 | builder.dry_run = Some(deser.read_boolean(member)?);
|
111 111 | }
|
112 112 | Some(1) => {
|
113 113 | builder.instance_event_window_id = Some(deser.read_string(member)?);
|
114 114 | }
|
115 115 | Some(2) => {
|
116 116 | builder.association_target = Some(crate::types::InstanceEventWindowDisassociationRequest::deserialize(deser)?);
|
117 117 | }
|
118 118 | _ => {}
|
119 119 | }
|
120 120 | Ok(())
|
121 121 | })?;
|
122 + | builder.instance_event_window_id = builder.instance_event_window_id.or(Some(String::new()));
|
122 123 | builder
|
123 124 | .build()
|
124 125 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
125 126 | }
|
126 127 | }
|
128 + | impl DisassociateInstanceEventWindowInput {
|
129 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
130 + | pub fn deserialize_with_response(
|
131 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
132 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
133 + | _status: u16,
|
134 + | _body: &[u8],
|
135 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
136 + | Self::deserialize(deserializer)
|
137 + | }
|
138 + | }
|
127 139 | impl DisassociateInstanceEventWindowInput {
|
128 140 | /// Creates a new builder-style object to manufacture [`DisassociateInstanceEventWindowInput`](crate::operation::disassociate_instance_event_window::DisassociateInstanceEventWindowInput).
|
129 141 | pub fn builder() -> crate::operation::disassociate_instance_event_window::builders::DisassociateInstanceEventWindowInputBuilder {
|
130 142 | crate::operation::disassociate_instance_event_window::builders::DisassociateInstanceEventWindowInputBuilder::default()
|
131 143 | }
|
132 144 | }
|
133 145 |
|
134 146 | /// A builder for [`DisassociateInstanceEventWindowInput`](crate::operation::disassociate_instance_event_window::DisassociateInstanceEventWindowInput).
|
135 147 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
136 148 | #[non_exhaustive]
|
137 149 | pub struct DisassociateInstanceEventWindowInputBuilder {
|
138 150 | pub(crate) dry_run: ::std::option::Option<bool>,
|
139 151 | pub(crate) instance_event_window_id: ::std::option::Option<::std::string::String>,
|
140 152 | pub(crate) association_target: ::std::option::Option<crate::types::InstanceEventWindowDisassociationRequest>,
|
141 153 | }
|
142 154 | impl DisassociateInstanceEventWindowInputBuilder {
|
143 155 | /// <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>
|
144 156 | pub fn dry_run(mut self, input: bool) -> Self {
|
145 157 | self.dry_run = ::std::option::Option::Some(input);
|
146 158 | self
|
147 159 | }
|
148 160 | /// <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>
|
149 161 | pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
|
150 162 | self.dry_run = input;
|
151 163 | self
|
152 164 | }
|
153 165 | /// <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>
|
154 166 | pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
|
155 167 | &self.dry_run
|
156 168 | }
|