19 19 | self.dry_run
|
20 20 | }
|
21 21 | /// <p>The IDs of the resources, separated by spaces.</p>
|
22 22 | /// <p>Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.</p>
|
23 23 | ///
|
24 24 | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resources.is_none()`.
|
25 25 | pub fn resources(&self) -> &[::std::string::String] {
|
26 26 | self.resources.as_deref().unwrap_or_default()
|
27 27 | }
|
28 28 | /// <p>The tags to delete. Specify a tag key and an optional tag value to delete specific tags. If you specify a tag key without a tag value, we delete any tag with this key regardless of its value. If you specify a tag key with an empty string as the tag value, we delete the tag only if its value is an empty string.</p>
|
29 29 | /// <p>If you omit this parameter, we delete all user-defined tags for the specified resources. We do not delete Amazon Web Services-generated tags (tags that have the <code>aws:</code> prefix).</p>
|
30 30 | /// <p>Constraints: Up to 1000 tags.</p>
|
31 31 | ///
|
32 32 | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
|
33 33 | pub fn tags(&self) -> &[crate::types::Tag] {
|
34 34 | self.tags.as_deref().unwrap_or_default()
|
35 35 | }
|
36 36 | }
|
37 37 | static DELETETAGSINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
38 38 | "com.amazonaws.ec2.synthetic#DeleteTagsInput",
|
39 39 | "com.amazonaws.ec2.synthetic",
|
40 40 | "DeleteTagsInput",
|
41 41 | );
|
42 42 | static DELETETAGSINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
43 43 | ::aws_smithy_schema::ShapeId::from_static(
|
44 44 | "com.amazonaws.ec2.synthetic#DeleteTagsInput$DryRun",
|
45 45 | "com.amazonaws.ec2.synthetic",
|
46 46 | "DeleteTagsInput",
|
47 47 | ),
|
48 48 | ::aws_smithy_schema::ShapeType::Boolean,
|
49 - | "dry_run",
|
49 + | "DryRun",
|
50 50 | 0,
|
51 51 | )
|
52 52 | .with_xml_name("dryRun");
|
53 53 | static DELETETAGSINPUT_MEMBER_RESOURCES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
54 54 | ::aws_smithy_schema::ShapeId::from_static(
|
55 55 | "com.amazonaws.ec2.synthetic#DeleteTagsInput$Resources",
|
56 56 | "com.amazonaws.ec2.synthetic",
|
57 57 | "DeleteTagsInput",
|
58 58 | ),
|
59 59 | ::aws_smithy_schema::ShapeType::List,
|
60 - | "resources",
|
60 + | "Resources",
|
61 61 | 1,
|
62 62 | )
|
63 63 | .with_xml_name("resourceId");
|
64 64 | static DELETETAGSINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
65 65 | ::aws_smithy_schema::ShapeId::from_static(
|
66 66 | "com.amazonaws.ec2.synthetic#DeleteTagsInput$Tags",
|
67 67 | "com.amazonaws.ec2.synthetic",
|
68 68 | "DeleteTagsInput",
|
69 69 | ),
|
70 70 | ::aws_smithy_schema::ShapeType::List,
|
71 - | "tags",
|
71 + | "Tags",
|
72 72 | 2,
|
73 73 | )
|
74 74 | .with_xml_name("tag");
|
75 75 | static DELETETAGSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
76 76 | DELETETAGSINPUT_SCHEMA_ID,
|
77 77 | ::aws_smithy_schema::ShapeType::Structure,
|
78 78 | &[
|
79 79 | &DELETETAGSINPUT_MEMBER_DRY_RUN,
|
80 80 | &DELETETAGSINPUT_MEMBER_RESOURCES,
|
81 81 | &DELETETAGSINPUT_MEMBER_TAGS,
|
82 82 | ],
|
83 83 | );
|
84 84 | impl DeleteTagsInput {
|
85 85 | /// The schema for this shape.
|
86 86 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETETAGSINPUT_SCHEMA;
|
87 87 | }
|
88 88 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteTagsInput {
|
89 89 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
90 90 | fn serialize_members(
|
91 91 | &self,
|
92 92 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
93 93 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
94 94 | if let Some(ref val) = self.dry_run {
|
95 95 | ser.write_boolean(&DELETETAGSINPUT_MEMBER_DRY_RUN, *val)?;
|
96 96 | }
|
97 97 | if let Some(ref val) = self.resources {
|
98 98 | ser.write_list(
|
99 99 | &DELETETAGSINPUT_MEMBER_RESOURCES,
|
100 100 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
101 101 | for item in val {
|
102 102 | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
103 103 | }
|
104 104 | Ok(())
|
105 105 | },
|
106 106 | )?;
|
107 107 | }
|
108 108 | if let Some(ref val) = self.tags {
|
109 109 | ser.write_list(
|
110 110 | &DELETETAGSINPUT_MEMBER_TAGS,
|
111 111 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
112 112 | for item in val {
|
113 113 | ser.write_struct(crate::types::Tag::SCHEMA, item)?;
|
114 114 | }
|
115 115 | Ok(())
|
116 116 | },
|
117 117 | )?;
|
118 118 | }
|
119 119 | Ok(())
|
120 120 | }
|
121 121 | }
|
122 122 | impl DeleteTagsInput {
|
123 123 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
124 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
125 - | deserializer: &mut D,
|
124 + | pub fn deserialize(
|
125 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
126 126 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
127 127 | #[allow(unused_variables, unused_mut)]
|
128 128 | let mut builder = Self::builder();
|
129 129 | #[allow(
|
130 130 | unused_variables,
|
131 131 | unreachable_code,
|
132 132 | clippy::single_match,
|
133 133 | clippy::match_single_binding,
|
134 134 | clippy::diverging_sub_expression
|
135 135 | )]
|
136 - | deserializer.read_struct(&DELETETAGSINPUT_SCHEMA, (), |_, member, deser| {
|
136 + | deserializer.read_struct(&DELETETAGSINPUT_SCHEMA, &mut |member, deser| {
|
137 137 | match member.member_index() {
|
138 138 | Some(0) => {
|
139 139 | builder.dry_run = Some(deser.read_boolean(member)?);
|
140 140 | }
|
141 141 | Some(1) => {
|
142 - | builder.resources = Some({
|
143 - | let container = if let Some(cap) = deser.container_size() {
|
144 - | Vec::with_capacity(cap)
|
145 - | } else {
|
146 - | Vec::new()
|
147 - | };
|
148 - | deser.read_list(member, container, |mut list, deser| {
|
149 - | list.push(deser.read_string(member)?);
|
150 - | Ok(list)
|
151 - | })?
|
152 - | });
|
142 + | builder.resources = Some(deser.read_string_list(member)?);
|
153 143 | }
|
154 144 | Some(2) => {
|
155 145 | builder.tags = Some({
|
156 - | let container = if let Some(cap) = deser.container_size() {
|
157 - | Vec::with_capacity(cap)
|
158 - | } else {
|
159 - | Vec::new()
|
160 - | };
|
161 - | deser.read_list(member, container, |mut list, deser| {
|
162 - | list.push(crate::types::Tag::deserialize(deser)?);
|
163 - | Ok(list)
|
164 - | })?
|
146 + | let mut container = Vec::new();
|
147 + | deser.read_list(member, &mut |deser| {
|
148 + | container.push(crate::types::Tag::deserialize(deser)?);
|
149 + | Ok(())
|
150 + | })?;
|
151 + | container
|
165 152 | });
|
166 153 | }
|
167 154 | _ => {}
|
168 155 | }
|
169 156 | Ok(())
|
170 157 | })?;
|
158 + | builder.resources = builder.resources.or(Some(Vec::new()));
|
171 159 | builder
|
172 160 | .build()
|
173 161 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
174 162 | }
|
175 163 | }
|
164 + | impl DeleteTagsInput {
|
165 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
166 + | pub fn deserialize_with_response(
|
167 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
168 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
169 + | _status: u16,
|
170 + | _body: &[u8],
|
171 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
172 + | Self::deserialize(deserializer)
|
173 + | }
|
174 + | }
|
176 175 | impl DeleteTagsInput {
|
177 176 | /// Creates a new builder-style object to manufacture [`DeleteTagsInput`](crate::operation::delete_tags::DeleteTagsInput).
|
178 177 | pub fn builder() -> crate::operation::delete_tags::builders::DeleteTagsInputBuilder {
|
179 178 | crate::operation::delete_tags::builders::DeleteTagsInputBuilder::default()
|
180 179 | }
|
181 180 | }
|
182 181 |
|
183 182 | /// A builder for [`DeleteTagsInput`](crate::operation::delete_tags::DeleteTagsInput).
|
184 183 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
185 184 | #[non_exhaustive]
|
186 185 | pub struct DeleteTagsInputBuilder {
|
187 186 | pub(crate) dry_run: ::std::option::Option<bool>,
|
188 187 | pub(crate) resources: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
189 188 | pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
|
190 189 | }
|
191 190 | impl DeleteTagsInputBuilder {
|
192 191 | /// <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>
|
193 192 | pub fn dry_run(mut self, input: bool) -> Self {
|
194 193 | self.dry_run = ::std::option::Option::Some(input);
|
195 194 | self
|
196 195 | }
|
197 196 | /// <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>
|
198 197 | pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
|
199 198 | self.dry_run = input;
|
200 199 | self
|
201 200 | }
|
202 201 | /// <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>
|
203 202 | pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
|
204 203 | &self.dry_run
|
205 204 | }
|