3 3 | #[non_exhaustive]
|
4 4 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5 5 | pub struct DeleteTrafficMirrorFilterRuleInput {
|
6 6 | /// <p>The ID of the Traffic Mirror rule.</p>
|
7 7 | pub traffic_mirror_filter_rule_id: ::std::option::Option<::std::string::String>,
|
8 8 | /// <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>
|
9 9 | pub dry_run: ::std::option::Option<bool>,
|
10 10 | }
|
11 11 | impl DeleteTrafficMirrorFilterRuleInput {
|
12 12 | /// <p>The ID of the Traffic Mirror rule.</p>
|
13 13 | pub fn traffic_mirror_filter_rule_id(&self) -> ::std::option::Option<&str> {
|
14 14 | self.traffic_mirror_filter_rule_id.as_deref()
|
15 15 | }
|
16 16 | /// <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>
|
17 17 | pub fn dry_run(&self) -> ::std::option::Option<bool> {
|
18 18 | self.dry_run
|
19 19 | }
|
20 20 | }
|
21 21 | static DELETETRAFFICMIRRORFILTERRULEINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
22 22 | "com.amazonaws.ec2.synthetic#DeleteTrafficMirrorFilterRuleInput",
|
23 23 | "com.amazonaws.ec2.synthetic",
|
24 24 | "DeleteTrafficMirrorFilterRuleInput",
|
25 25 | );
|
26 26 | static DELETETRAFFICMIRRORFILTERRULEINPUT_MEMBER_TRAFFIC_MIRROR_FILTER_RULE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
27 27 | ::aws_smithy_schema::ShapeId::from_static(
|
28 28 | "com.amazonaws.ec2.synthetic#DeleteTrafficMirrorFilterRuleInput$TrafficMirrorFilterRuleId",
|
29 29 | "com.amazonaws.ec2.synthetic",
|
30 30 | "DeleteTrafficMirrorFilterRuleInput",
|
31 31 | ),
|
32 32 | ::aws_smithy_schema::ShapeType::String,
|
33 - | "traffic_mirror_filter_rule_id",
|
33 + | "TrafficMirrorFilterRuleId",
|
34 34 | 0,
|
35 35 | );
|
36 36 | static DELETETRAFFICMIRRORFILTERRULEINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
37 37 | ::aws_smithy_schema::ShapeId::from_static(
|
38 38 | "com.amazonaws.ec2.synthetic#DeleteTrafficMirrorFilterRuleInput$DryRun",
|
39 39 | "com.amazonaws.ec2.synthetic",
|
40 40 | "DeleteTrafficMirrorFilterRuleInput",
|
41 41 | ),
|
42 42 | ::aws_smithy_schema::ShapeType::Boolean,
|
43 - | "dry_run",
|
43 + | "DryRun",
|
44 44 | 1,
|
45 45 | );
|
46 46 | static DELETETRAFFICMIRRORFILTERRULEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
47 47 | DELETETRAFFICMIRRORFILTERRULEINPUT_SCHEMA_ID,
|
48 48 | ::aws_smithy_schema::ShapeType::Structure,
|
49 49 | &[
|
50 50 | &DELETETRAFFICMIRRORFILTERRULEINPUT_MEMBER_TRAFFIC_MIRROR_FILTER_RULE_ID,
|
51 51 | &DELETETRAFFICMIRRORFILTERRULEINPUT_MEMBER_DRY_RUN,
|
52 52 | ],
|
53 53 | );
|
54 54 | impl DeleteTrafficMirrorFilterRuleInput {
|
55 55 | /// The schema for this shape.
|
56 56 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETETRAFFICMIRRORFILTERRULEINPUT_SCHEMA;
|
57 57 | }
|
58 58 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteTrafficMirrorFilterRuleInput {
|
59 59 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
60 60 | fn serialize_members(
|
61 61 | &self,
|
62 62 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
63 63 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
64 64 | if let Some(ref val) = self.traffic_mirror_filter_rule_id {
|
65 65 | ser.write_string(&DELETETRAFFICMIRRORFILTERRULEINPUT_MEMBER_TRAFFIC_MIRROR_FILTER_RULE_ID, val)?;
|
66 66 | }
|
67 67 | if let Some(ref val) = self.dry_run {
|
68 68 | ser.write_boolean(&DELETETRAFFICMIRRORFILTERRULEINPUT_MEMBER_DRY_RUN, *val)?;
|
69 69 | }
|
70 70 | Ok(())
|
71 71 | }
|
72 72 | }
|
73 73 | impl DeleteTrafficMirrorFilterRuleInput {
|
74 74 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
75 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
76 - | deserializer: &mut D,
|
75 + | pub fn deserialize(
|
76 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
77 77 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
78 78 | #[allow(unused_variables, unused_mut)]
|
79 79 | let mut builder = Self::builder();
|
80 80 | #[allow(
|
81 81 | unused_variables,
|
82 82 | unreachable_code,
|
83 83 | clippy::single_match,
|
84 84 | clippy::match_single_binding,
|
85 85 | clippy::diverging_sub_expression
|
86 86 | )]
|
87 - | deserializer.read_struct(&DELETETRAFFICMIRRORFILTERRULEINPUT_SCHEMA, (), |_, member, deser| {
|
87 + | deserializer.read_struct(&DELETETRAFFICMIRRORFILTERRULEINPUT_SCHEMA, &mut |member, deser| {
|
88 88 | match member.member_index() {
|
89 89 | Some(0) => {
|
90 90 | builder.traffic_mirror_filter_rule_id = Some(deser.read_string(member)?);
|
91 91 | }
|
92 92 | Some(1) => {
|
93 93 | builder.dry_run = Some(deser.read_boolean(member)?);
|
94 94 | }
|
95 95 | _ => {}
|
96 96 | }
|
97 97 | Ok(())
|
98 98 | })?;
|
99 + | builder.traffic_mirror_filter_rule_id = builder.traffic_mirror_filter_rule_id.or(Some(String::new()));
|
99 100 | builder
|
100 101 | .build()
|
101 102 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
102 103 | }
|
103 104 | }
|
105 + | impl DeleteTrafficMirrorFilterRuleInput {
|
106 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
107 + | pub fn deserialize_with_response(
|
108 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
109 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
110 + | _status: u16,
|
111 + | _body: &[u8],
|
112 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
113 + | Self::deserialize(deserializer)
|
114 + | }
|
115 + | }
|
104 116 | impl DeleteTrafficMirrorFilterRuleInput {
|
105 117 | /// Creates a new builder-style object to manufacture [`DeleteTrafficMirrorFilterRuleInput`](crate::operation::delete_traffic_mirror_filter_rule::DeleteTrafficMirrorFilterRuleInput).
|
106 118 | pub fn builder() -> crate::operation::delete_traffic_mirror_filter_rule::builders::DeleteTrafficMirrorFilterRuleInputBuilder {
|
107 119 | crate::operation::delete_traffic_mirror_filter_rule::builders::DeleteTrafficMirrorFilterRuleInputBuilder::default()
|
108 120 | }
|
109 121 | }
|
110 122 |
|
111 123 | /// A builder for [`DeleteTrafficMirrorFilterRuleInput`](crate::operation::delete_traffic_mirror_filter_rule::DeleteTrafficMirrorFilterRuleInput).
|
112 124 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
113 125 | #[non_exhaustive]
|
114 126 | pub struct DeleteTrafficMirrorFilterRuleInputBuilder {
|
115 127 | pub(crate) traffic_mirror_filter_rule_id: ::std::option::Option<::std::string::String>,
|
116 128 | pub(crate) dry_run: ::std::option::Option<bool>,
|
117 129 | }
|
118 130 | impl DeleteTrafficMirrorFilterRuleInputBuilder {
|
119 131 | /// <p>The ID of the Traffic Mirror rule.</p>
|
120 132 | /// This field is required.
|
121 133 | pub fn traffic_mirror_filter_rule_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
122 134 | self.traffic_mirror_filter_rule_id = ::std::option::Option::Some(input.into());
|
123 135 | self
|
124 136 | }
|
125 137 | /// <p>The ID of the Traffic Mirror rule.</p>
|
126 138 | pub fn set_traffic_mirror_filter_rule_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
127 139 | self.traffic_mirror_filter_rule_id = input;
|
128 140 | self
|
129 141 | }
|
130 142 | /// <p>The ID of the Traffic Mirror rule.</p>
|
131 143 | pub fn get_traffic_mirror_filter_rule_id(&self) -> &::std::option::Option<::std::string::String> {
|
132 144 | &self.traffic_mirror_filter_rule_id
|
133 145 | }
|