aws_sdk_mobile/operation/delete_project/
_delete_project_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Result structure used in response to request to delete a project.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteProjectOutput {
7    /// <p>Resources which were deleted.</p>
8    pub deleted_resources: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>,
9    /// <p>Resources which were not deleted, due to a risk of losing potentially important data or files.</p>
10    pub orphaned_resources: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>,
11    _request_id: Option<String>,
12}
13impl DeleteProjectOutput {
14    /// <p>Resources which were deleted.</p>
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 `.deleted_resources.is_none()`.
17    pub fn deleted_resources(&self) -> &[crate::types::Resource] {
18        self.deleted_resources.as_deref().unwrap_or_default()
19    }
20    /// <p>Resources which were not deleted, due to a risk of losing potentially important data or files.</p>
21    ///
22    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.orphaned_resources.is_none()`.
23    pub fn orphaned_resources(&self) -> &[crate::types::Resource] {
24        self.orphaned_resources.as_deref().unwrap_or_default()
25    }
26}
27impl ::aws_types::request_id::RequestId for DeleteProjectOutput {
28    fn request_id(&self) -> Option<&str> {
29        self._request_id.as_deref()
30    }
31}
32impl DeleteProjectOutput {
33    /// Creates a new builder-style object to manufacture [`DeleteProjectOutput`](crate::operation::delete_project::DeleteProjectOutput).
34    pub fn builder() -> crate::operation::delete_project::builders::DeleteProjectOutputBuilder {
35        crate::operation::delete_project::builders::DeleteProjectOutputBuilder::default()
36    }
37}
38
39/// A builder for [`DeleteProjectOutput`](crate::operation::delete_project::DeleteProjectOutput).
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
41#[non_exhaustive]
42pub struct DeleteProjectOutputBuilder {
43    pub(crate) deleted_resources: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>,
44    pub(crate) orphaned_resources: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>,
45    _request_id: Option<String>,
46}
47impl DeleteProjectOutputBuilder {
48    /// Appends an item to `deleted_resources`.
49    ///
50    /// To override the contents of this collection use [`set_deleted_resources`](Self::set_deleted_resources).
51    ///
52    /// <p>Resources which were deleted.</p>
53    pub fn deleted_resources(mut self, input: crate::types::Resource) -> Self {
54        let mut v = self.deleted_resources.unwrap_or_default();
55        v.push(input);
56        self.deleted_resources = ::std::option::Option::Some(v);
57        self
58    }
59    /// <p>Resources which were deleted.</p>
60    pub fn set_deleted_resources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>) -> Self {
61        self.deleted_resources = input;
62        self
63    }
64    /// <p>Resources which were deleted.</p>
65    pub fn get_deleted_resources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Resource>> {
66        &self.deleted_resources
67    }
68    /// Appends an item to `orphaned_resources`.
69    ///
70    /// To override the contents of this collection use [`set_orphaned_resources`](Self::set_orphaned_resources).
71    ///
72    /// <p>Resources which were not deleted, due to a risk of losing potentially important data or files.</p>
73    pub fn orphaned_resources(mut self, input: crate::types::Resource) -> Self {
74        let mut v = self.orphaned_resources.unwrap_or_default();
75        v.push(input);
76        self.orphaned_resources = ::std::option::Option::Some(v);
77        self
78    }
79    /// <p>Resources which were not deleted, due to a risk of losing potentially important data or files.</p>
80    pub fn set_orphaned_resources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>) -> Self {
81        self.orphaned_resources = input;
82        self
83    }
84    /// <p>Resources which were not deleted, due to a risk of losing potentially important data or files.</p>
85    pub fn get_orphaned_resources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Resource>> {
86        &self.orphaned_resources
87    }
88    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
89        self._request_id = Some(request_id.into());
90        self
91    }
92
93    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
94        self._request_id = request_id;
95        self
96    }
97    /// Consumes the builder and constructs a [`DeleteProjectOutput`](crate::operation::delete_project::DeleteProjectOutput).
98    pub fn build(self) -> crate::operation::delete_project::DeleteProjectOutput {
99        crate::operation::delete_project::DeleteProjectOutput {
100            deleted_resources: self.deleted_resources,
101            orphaned_resources: self.orphaned_resources,
102            _request_id: self._request_id,
103        }
104    }
105}