aws_sdk_ssm/operation/delete_parameters/_delete_parameters_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteParametersInput {
6 /// <p>The names of the parameters to delete. After deleting a parameter, wait for at least 30 seconds to create a parameter with the same name.</p><note>
7 /// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
8 /// </note>
9 pub names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10}
11impl DeleteParametersInput {
12 /// <p>The names of the parameters to delete. After deleting a parameter, wait for at least 30 seconds to create a parameter with the same name.</p><note>
13 /// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
14 /// </note>
15 ///
16 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.names.is_none()`.
17 pub fn names(&self) -> &[::std::string::String] {
18 self.names.as_deref().unwrap_or_default()
19 }
20}
21impl DeleteParametersInput {
22 /// Creates a new builder-style object to manufacture [`DeleteParametersInput`](crate::operation::delete_parameters::DeleteParametersInput).
23 pub fn builder() -> crate::operation::delete_parameters::builders::DeleteParametersInputBuilder {
24 crate::operation::delete_parameters::builders::DeleteParametersInputBuilder::default()
25 }
26}
27
28/// A builder for [`DeleteParametersInput`](crate::operation::delete_parameters::DeleteParametersInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteParametersInputBuilder {
32 pub(crate) names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
33}
34impl DeleteParametersInputBuilder {
35 /// Appends an item to `names`.
36 ///
37 /// To override the contents of this collection use [`set_names`](Self::set_names).
38 ///
39 /// <p>The names of the parameters to delete. After deleting a parameter, wait for at least 30 seconds to create a parameter with the same name.</p><note>
40 /// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
41 /// </note>
42 pub fn names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
43 let mut v = self.names.unwrap_or_default();
44 v.push(input.into());
45 self.names = ::std::option::Option::Some(v);
46 self
47 }
48 /// <p>The names of the parameters to delete. After deleting a parameter, wait for at least 30 seconds to create a parameter with the same name.</p><note>
49 /// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
50 /// </note>
51 pub fn set_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
52 self.names = input;
53 self
54 }
55 /// <p>The names of the parameters to delete. After deleting a parameter, wait for at least 30 seconds to create a parameter with the same name.</p><note>
56 /// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
57 /// </note>
58 pub fn get_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
59 &self.names
60 }
61 /// Consumes the builder and constructs a [`DeleteParametersInput`](crate::operation::delete_parameters::DeleteParametersInput).
62 pub fn build(
63 self,
64 ) -> ::std::result::Result<crate::operation::delete_parameters::DeleteParametersInput, ::aws_smithy_types::error::operation::BuildError> {
65 ::std::result::Result::Ok(crate::operation::delete_parameters::DeleteParametersInput { names: self.names })
66 }
67}