aws_sdk_ssm/operation/delete_parameters/
_delete_parameters_output.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 DeleteParametersOutput {
6    /// <p>The names of the deleted parameters.</p>
7    pub deleted_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8    /// <p>The names of parameters that weren't deleted because the parameters aren't valid.</p>
9    pub invalid_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10    _request_id: Option<String>,
11}
12impl DeleteParametersOutput {
13    /// <p>The names of the deleted parameters.</p>
14    ///
15    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.deleted_parameters.is_none()`.
16    pub fn deleted_parameters(&self) -> &[::std::string::String] {
17        self.deleted_parameters.as_deref().unwrap_or_default()
18    }
19    /// <p>The names of parameters that weren't deleted because the parameters aren't valid.</p>
20    ///
21    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.invalid_parameters.is_none()`.
22    pub fn invalid_parameters(&self) -> &[::std::string::String] {
23        self.invalid_parameters.as_deref().unwrap_or_default()
24    }
25}
26impl ::aws_types::request_id::RequestId for DeleteParametersOutput {
27    fn request_id(&self) -> Option<&str> {
28        self._request_id.as_deref()
29    }
30}
31impl DeleteParametersOutput {
32    /// Creates a new builder-style object to manufacture [`DeleteParametersOutput`](crate::operation::delete_parameters::DeleteParametersOutput).
33    pub fn builder() -> crate::operation::delete_parameters::builders::DeleteParametersOutputBuilder {
34        crate::operation::delete_parameters::builders::DeleteParametersOutputBuilder::default()
35    }
36}
37
38/// A builder for [`DeleteParametersOutput`](crate::operation::delete_parameters::DeleteParametersOutput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct DeleteParametersOutputBuilder {
42    pub(crate) deleted_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
43    pub(crate) invalid_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
44    _request_id: Option<String>,
45}
46impl DeleteParametersOutputBuilder {
47    /// Appends an item to `deleted_parameters`.
48    ///
49    /// To override the contents of this collection use [`set_deleted_parameters`](Self::set_deleted_parameters).
50    ///
51    /// <p>The names of the deleted parameters.</p>
52    pub fn deleted_parameters(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        let mut v = self.deleted_parameters.unwrap_or_default();
54        v.push(input.into());
55        self.deleted_parameters = ::std::option::Option::Some(v);
56        self
57    }
58    /// <p>The names of the deleted parameters.</p>
59    pub fn set_deleted_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
60        self.deleted_parameters = input;
61        self
62    }
63    /// <p>The names of the deleted parameters.</p>
64    pub fn get_deleted_parameters(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
65        &self.deleted_parameters
66    }
67    /// Appends an item to `invalid_parameters`.
68    ///
69    /// To override the contents of this collection use [`set_invalid_parameters`](Self::set_invalid_parameters).
70    ///
71    /// <p>The names of parameters that weren't deleted because the parameters aren't valid.</p>
72    pub fn invalid_parameters(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        let mut v = self.invalid_parameters.unwrap_or_default();
74        v.push(input.into());
75        self.invalid_parameters = ::std::option::Option::Some(v);
76        self
77    }
78    /// <p>The names of parameters that weren't deleted because the parameters aren't valid.</p>
79    pub fn set_invalid_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
80        self.invalid_parameters = input;
81        self
82    }
83    /// <p>The names of parameters that weren't deleted because the parameters aren't valid.</p>
84    pub fn get_invalid_parameters(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
85        &self.invalid_parameters
86    }
87    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
88        self._request_id = Some(request_id.into());
89        self
90    }
91
92    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
93        self._request_id = request_id;
94        self
95    }
96    /// Consumes the builder and constructs a [`DeleteParametersOutput`](crate::operation::delete_parameters::DeleteParametersOutput).
97    pub fn build(self) -> crate::operation::delete_parameters::DeleteParametersOutput {
98        crate::operation::delete_parameters::DeleteParametersOutput {
99            deleted_parameters: self.deleted_parameters,
100            invalid_parameters: self.invalid_parameters,
101            _request_id: self._request_id,
102        }
103    }
104}