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