aws_sdk_databasemigration/operation/describe_pending_maintenance_actions/
_describe_pending_maintenance_actions_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p></p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribePendingMaintenanceActionsOutput {
7    /// <p>The pending maintenance action.</p>
8    pub pending_maintenance_actions: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePendingMaintenanceActions>>,
9    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
10    pub marker: ::std::option::Option<::std::string::String>,
11    _request_id: Option<String>,
12}
13impl DescribePendingMaintenanceActionsOutput {
14    /// <p>The pending maintenance action.</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 `.pending_maintenance_actions.is_none()`.
17    pub fn pending_maintenance_actions(&self) -> &[crate::types::ResourcePendingMaintenanceActions] {
18        self.pending_maintenance_actions.as_deref().unwrap_or_default()
19    }
20    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
21    pub fn marker(&self) -> ::std::option::Option<&str> {
22        self.marker.as_deref()
23    }
24}
25impl ::aws_types::request_id::RequestId for DescribePendingMaintenanceActionsOutput {
26    fn request_id(&self) -> Option<&str> {
27        self._request_id.as_deref()
28    }
29}
30impl DescribePendingMaintenanceActionsOutput {
31    /// Creates a new builder-style object to manufacture [`DescribePendingMaintenanceActionsOutput`](crate::operation::describe_pending_maintenance_actions::DescribePendingMaintenanceActionsOutput).
32    pub fn builder() -> crate::operation::describe_pending_maintenance_actions::builders::DescribePendingMaintenanceActionsOutputBuilder {
33        crate::operation::describe_pending_maintenance_actions::builders::DescribePendingMaintenanceActionsOutputBuilder::default()
34    }
35}
36
37/// A builder for [`DescribePendingMaintenanceActionsOutput`](crate::operation::describe_pending_maintenance_actions::DescribePendingMaintenanceActionsOutput).
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct DescribePendingMaintenanceActionsOutputBuilder {
41    pub(crate) pending_maintenance_actions: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePendingMaintenanceActions>>,
42    pub(crate) marker: ::std::option::Option<::std::string::String>,
43    _request_id: Option<String>,
44}
45impl DescribePendingMaintenanceActionsOutputBuilder {
46    /// Appends an item to `pending_maintenance_actions`.
47    ///
48    /// To override the contents of this collection use [`set_pending_maintenance_actions`](Self::set_pending_maintenance_actions).
49    ///
50    /// <p>The pending maintenance action.</p>
51    pub fn pending_maintenance_actions(mut self, input: crate::types::ResourcePendingMaintenanceActions) -> Self {
52        let mut v = self.pending_maintenance_actions.unwrap_or_default();
53        v.push(input);
54        self.pending_maintenance_actions = ::std::option::Option::Some(v);
55        self
56    }
57    /// <p>The pending maintenance action.</p>
58    pub fn set_pending_maintenance_actions(
59        mut self,
60        input: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePendingMaintenanceActions>>,
61    ) -> Self {
62        self.pending_maintenance_actions = input;
63        self
64    }
65    /// <p>The pending maintenance action.</p>
66    pub fn get_pending_maintenance_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourcePendingMaintenanceActions>> {
67        &self.pending_maintenance_actions
68    }
69    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
70    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71        self.marker = ::std::option::Option::Some(input.into());
72        self
73    }
74    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
75    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76        self.marker = input;
77        self
78    }
79    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
80    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
81        &self.marker
82    }
83    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
84        self._request_id = Some(request_id.into());
85        self
86    }
87
88    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
89        self._request_id = request_id;
90        self
91    }
92    /// Consumes the builder and constructs a [`DescribePendingMaintenanceActionsOutput`](crate::operation::describe_pending_maintenance_actions::DescribePendingMaintenanceActionsOutput).
93    pub fn build(self) -> crate::operation::describe_pending_maintenance_actions::DescribePendingMaintenanceActionsOutput {
94        crate::operation::describe_pending_maintenance_actions::DescribePendingMaintenanceActionsOutput {
95            pending_maintenance_actions: self.pending_maintenance_actions,
96            marker: self.marker,
97            _request_id: self._request_id,
98        }
99    }
100}