13 13 | pub launch_template_name: ::std::option::Option<::std::string::String>,
|
14 14 | }
|
15 15 | impl DeleteLaunchTemplateInput {
|
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 | /// <p>The ID of the launch template.</p>
|
21 21 | /// <p>You must specify either the launch template ID or the launch template name, but not both.</p>
|
22 22 | pub fn launch_template_id(&self) -> ::std::option::Option<&str> {
|
23 23 | self.launch_template_id.as_deref()
|
24 24 | }
|
25 25 | /// <p>The name of the launch template.</p>
|
26 26 | /// <p>You must specify either the launch template ID or the launch template name, but not both.</p>
|
27 27 | pub fn launch_template_name(&self) -> ::std::option::Option<&str> {
|
28 28 | self.launch_template_name.as_deref()
|
29 29 | }
|
30 30 | }
|
31 31 | static DELETELAUNCHTEMPLATEINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
32 32 | "com.amazonaws.ec2.synthetic#DeleteLaunchTemplateInput",
|
33 33 | "com.amazonaws.ec2.synthetic",
|
34 34 | "DeleteLaunchTemplateInput",
|
35 35 | );
|
36 36 | static DELETELAUNCHTEMPLATEINPUT_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#DeleteLaunchTemplateInput$DryRun",
|
39 39 | "com.amazonaws.ec2.synthetic",
|
40 40 | "DeleteLaunchTemplateInput",
|
41 41 | ),
|
42 42 | ::aws_smithy_schema::ShapeType::Boolean,
|
43 - | "dry_run",
|
43 + | "DryRun",
|
44 44 | 0,
|
45 45 | );
|
46 46 | static DELETELAUNCHTEMPLATEINPUT_MEMBER_LAUNCH_TEMPLATE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
47 47 | ::aws_smithy_schema::ShapeId::from_static(
|
48 48 | "com.amazonaws.ec2.synthetic#DeleteLaunchTemplateInput$LaunchTemplateId",
|
49 49 | "com.amazonaws.ec2.synthetic",
|
50 50 | "DeleteLaunchTemplateInput",
|
51 51 | ),
|
52 52 | ::aws_smithy_schema::ShapeType::String,
|
53 - | "launch_template_id",
|
53 + | "LaunchTemplateId",
|
54 54 | 1,
|
55 55 | );
|
56 56 | static DELETELAUNCHTEMPLATEINPUT_MEMBER_LAUNCH_TEMPLATE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
57 57 | ::aws_smithy_schema::ShapeId::from_static(
|
58 58 | "com.amazonaws.ec2.synthetic#DeleteLaunchTemplateInput$LaunchTemplateName",
|
59 59 | "com.amazonaws.ec2.synthetic",
|
60 60 | "DeleteLaunchTemplateInput",
|
61 61 | ),
|
62 62 | ::aws_smithy_schema::ShapeType::String,
|
63 - | "launch_template_name",
|
63 + | "LaunchTemplateName",
|
64 64 | 2,
|
65 65 | );
|
66 66 | static DELETELAUNCHTEMPLATEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
67 67 | DELETELAUNCHTEMPLATEINPUT_SCHEMA_ID,
|
68 68 | ::aws_smithy_schema::ShapeType::Structure,
|
69 69 | &[
|
70 70 | &DELETELAUNCHTEMPLATEINPUT_MEMBER_DRY_RUN,
|
71 71 | &DELETELAUNCHTEMPLATEINPUT_MEMBER_LAUNCH_TEMPLATE_ID,
|
72 72 | &DELETELAUNCHTEMPLATEINPUT_MEMBER_LAUNCH_TEMPLATE_NAME,
|
73 73 | ],
|
74 74 | );
|
75 75 | impl DeleteLaunchTemplateInput {
|
76 76 | /// The schema for this shape.
|
77 77 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETELAUNCHTEMPLATEINPUT_SCHEMA;
|
78 78 | }
|
79 79 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteLaunchTemplateInput {
|
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(&DELETELAUNCHTEMPLATEINPUT_MEMBER_DRY_RUN, *val)?;
|
87 87 | }
|
88 88 | if let Some(ref val) = self.launch_template_id {
|
89 89 | ser.write_string(&DELETELAUNCHTEMPLATEINPUT_MEMBER_LAUNCH_TEMPLATE_ID, val)?;
|
90 90 | }
|
91 91 | if let Some(ref val) = self.launch_template_name {
|
92 92 | ser.write_string(&DELETELAUNCHTEMPLATEINPUT_MEMBER_LAUNCH_TEMPLATE_NAME, val)?;
|
93 93 | }
|
94 94 | Ok(())
|
95 95 | }
|
96 96 | }
|
97 97 | impl DeleteLaunchTemplateInput {
|
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(&DELETELAUNCHTEMPLATEINPUT_SCHEMA, (), |_, member, deser| {
|
111 + | deserializer.read_struct(&DELETELAUNCHTEMPLATEINPUT_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.launch_template_id = Some(deser.read_string(member)?);
|
118 118 | }
|
119 119 | Some(2) => {
|
120 120 | builder.launch_template_name = Some(deser.read_string(member)?);
|
121 121 | }
|
122 122 | _ => {}
|
123 123 | }
|
124 124 | Ok(())
|
125 125 | })?;
|
126 126 | builder
|
127 127 | .build()
|
128 128 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
129 129 | }
|
130 130 | }
|
131 + | impl DeleteLaunchTemplateInput {
|
132 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
133 + | pub fn deserialize_with_response(
|
134 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
135 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
136 + | _status: u16,
|
137 + | _body: &[u8],
|
138 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
139 + | Self::deserialize(deserializer)
|
140 + | }
|
141 + | }
|
131 142 | impl DeleteLaunchTemplateInput {
|
132 143 | /// Creates a new builder-style object to manufacture [`DeleteLaunchTemplateInput`](crate::operation::delete_launch_template::DeleteLaunchTemplateInput).
|
133 144 | pub fn builder() -> crate::operation::delete_launch_template::builders::DeleteLaunchTemplateInputBuilder {
|
134 145 | crate::operation::delete_launch_template::builders::DeleteLaunchTemplateInputBuilder::default()
|
135 146 | }
|
136 147 | }
|
137 148 |
|
138 149 | /// A builder for [`DeleteLaunchTemplateInput`](crate::operation::delete_launch_template::DeleteLaunchTemplateInput).
|
139 150 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
140 151 | #[non_exhaustive]
|
141 152 | pub struct DeleteLaunchTemplateInputBuilder {
|
142 153 | pub(crate) dry_run: ::std::option::Option<bool>,
|
143 154 | pub(crate) launch_template_id: ::std::option::Option<::std::string::String>,
|
144 155 | pub(crate) launch_template_name: ::std::option::Option<::std::string::String>,
|
145 156 | }
|
146 157 | impl DeleteLaunchTemplateInputBuilder {
|
147 158 | /// <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 159 | pub fn dry_run(mut self, input: bool) -> Self {
|
149 160 | self.dry_run = ::std::option::Option::Some(input);
|
150 161 | self
|
151 162 | }
|
152 163 | /// <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 164 | pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
|
154 165 | self.dry_run = input;
|
155 166 | self
|
156 167 | }
|
157 168 | /// <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 169 | pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
|
159 170 | &self.dry_run
|
160 171 | }
|