aws_sdk_ecs/operation/delete_attributes/
_delete_attributes_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 DeleteAttributesOutput {
6    /// <p>A list of attribute objects that were successfully deleted from your resource.</p>
7    pub attributes: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>,
8    _request_id: Option<String>,
9}
10impl DeleteAttributesOutput {
11    /// <p>A list of attribute objects that were successfully deleted from your resource.</p>
12    ///
13    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attributes.is_none()`.
14    pub fn attributes(&self) -> &[crate::types::Attribute] {
15        self.attributes.as_deref().unwrap_or_default()
16    }
17}
18impl ::aws_types::request_id::RequestId for DeleteAttributesOutput {
19    fn request_id(&self) -> Option<&str> {
20        self._request_id.as_deref()
21    }
22}
23impl DeleteAttributesOutput {
24    /// Creates a new builder-style object to manufacture [`DeleteAttributesOutput`](crate::operation::delete_attributes::DeleteAttributesOutput).
25    pub fn builder() -> crate::operation::delete_attributes::builders::DeleteAttributesOutputBuilder {
26        crate::operation::delete_attributes::builders::DeleteAttributesOutputBuilder::default()
27    }
28}
29
30/// A builder for [`DeleteAttributesOutput`](crate::operation::delete_attributes::DeleteAttributesOutput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct DeleteAttributesOutputBuilder {
34    pub(crate) attributes: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>,
35    _request_id: Option<String>,
36}
37impl DeleteAttributesOutputBuilder {
38    /// Appends an item to `attributes`.
39    ///
40    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
41    ///
42    /// <p>A list of attribute objects that were successfully deleted from your resource.</p>
43    pub fn attributes(mut self, input: crate::types::Attribute) -> Self {
44        let mut v = self.attributes.unwrap_or_default();
45        v.push(input);
46        self.attributes = ::std::option::Option::Some(v);
47        self
48    }
49    /// <p>A list of attribute objects that were successfully deleted from your resource.</p>
50    pub fn set_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>) -> Self {
51        self.attributes = input;
52        self
53    }
54    /// <p>A list of attribute objects that were successfully deleted from your resource.</p>
55    pub fn get_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Attribute>> {
56        &self.attributes
57    }
58    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
59        self._request_id = Some(request_id.into());
60        self
61    }
62
63    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
64        self._request_id = request_id;
65        self
66    }
67    /// Consumes the builder and constructs a [`DeleteAttributesOutput`](crate::operation::delete_attributes::DeleteAttributesOutput).
68    pub fn build(self) -> crate::operation::delete_attributes::DeleteAttributesOutput {
69        crate::operation::delete_attributes::DeleteAttributesOutput {
70            attributes: self.attributes,
71            _request_id: self._request_id,
72        }
73    }
74}