aws_sdk_config/operation/batch_get_resource_config/
_batch_get_resource_config_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 BatchGetResourceConfigOutput {
6    /// <p>A list that contains the current configuration of one or more resources.</p>
7    pub base_configuration_items: ::std::option::Option<::std::vec::Vec<crate::types::BaseConfigurationItem>>,
8    /// <p>A list of resource keys that were not processed with the current response. The unprocessesResourceKeys value is in the same form as ResourceKeys, so the value can be directly provided to a subsequent BatchGetResourceConfig operation. If there are no unprocessed resource keys, the response contains an empty unprocessedResourceKeys list.</p>
9    pub unprocessed_resource_keys: ::std::option::Option<::std::vec::Vec<crate::types::ResourceKey>>,
10    _request_id: Option<String>,
11}
12impl BatchGetResourceConfigOutput {
13    /// <p>A list that contains the current configuration of one or more resources.</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 `.base_configuration_items.is_none()`.
16    pub fn base_configuration_items(&self) -> &[crate::types::BaseConfigurationItem] {
17        self.base_configuration_items.as_deref().unwrap_or_default()
18    }
19    /// <p>A list of resource keys that were not processed with the current response. The unprocessesResourceKeys value is in the same form as ResourceKeys, so the value can be directly provided to a subsequent BatchGetResourceConfig operation. If there are no unprocessed resource keys, the response contains an empty unprocessedResourceKeys list.</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 `.unprocessed_resource_keys.is_none()`.
22    pub fn unprocessed_resource_keys(&self) -> &[crate::types::ResourceKey] {
23        self.unprocessed_resource_keys.as_deref().unwrap_or_default()
24    }
25}
26impl ::aws_types::request_id::RequestId for BatchGetResourceConfigOutput {
27    fn request_id(&self) -> Option<&str> {
28        self._request_id.as_deref()
29    }
30}
31impl BatchGetResourceConfigOutput {
32    /// Creates a new builder-style object to manufacture [`BatchGetResourceConfigOutput`](crate::operation::batch_get_resource_config::BatchGetResourceConfigOutput).
33    pub fn builder() -> crate::operation::batch_get_resource_config::builders::BatchGetResourceConfigOutputBuilder {
34        crate::operation::batch_get_resource_config::builders::BatchGetResourceConfigOutputBuilder::default()
35    }
36}
37
38/// A builder for [`BatchGetResourceConfigOutput`](crate::operation::batch_get_resource_config::BatchGetResourceConfigOutput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct BatchGetResourceConfigOutputBuilder {
42    pub(crate) base_configuration_items: ::std::option::Option<::std::vec::Vec<crate::types::BaseConfigurationItem>>,
43    pub(crate) unprocessed_resource_keys: ::std::option::Option<::std::vec::Vec<crate::types::ResourceKey>>,
44    _request_id: Option<String>,
45}
46impl BatchGetResourceConfigOutputBuilder {
47    /// Appends an item to `base_configuration_items`.
48    ///
49    /// To override the contents of this collection use [`set_base_configuration_items`](Self::set_base_configuration_items).
50    ///
51    /// <p>A list that contains the current configuration of one or more resources.</p>
52    pub fn base_configuration_items(mut self, input: crate::types::BaseConfigurationItem) -> Self {
53        let mut v = self.base_configuration_items.unwrap_or_default();
54        v.push(input);
55        self.base_configuration_items = ::std::option::Option::Some(v);
56        self
57    }
58    /// <p>A list that contains the current configuration of one or more resources.</p>
59    pub fn set_base_configuration_items(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BaseConfigurationItem>>) -> Self {
60        self.base_configuration_items = input;
61        self
62    }
63    /// <p>A list that contains the current configuration of one or more resources.</p>
64    pub fn get_base_configuration_items(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BaseConfigurationItem>> {
65        &self.base_configuration_items
66    }
67    /// Appends an item to `unprocessed_resource_keys`.
68    ///
69    /// To override the contents of this collection use [`set_unprocessed_resource_keys`](Self::set_unprocessed_resource_keys).
70    ///
71    /// <p>A list of resource keys that were not processed with the current response. The unprocessesResourceKeys value is in the same form as ResourceKeys, so the value can be directly provided to a subsequent BatchGetResourceConfig operation. If there are no unprocessed resource keys, the response contains an empty unprocessedResourceKeys list.</p>
72    pub fn unprocessed_resource_keys(mut self, input: crate::types::ResourceKey) -> Self {
73        let mut v = self.unprocessed_resource_keys.unwrap_or_default();
74        v.push(input);
75        self.unprocessed_resource_keys = ::std::option::Option::Some(v);
76        self
77    }
78    /// <p>A list of resource keys that were not processed with the current response. The unprocessesResourceKeys value is in the same form as ResourceKeys, so the value can be directly provided to a subsequent BatchGetResourceConfig operation. If there are no unprocessed resource keys, the response contains an empty unprocessedResourceKeys list.</p>
79    pub fn set_unprocessed_resource_keys(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourceKey>>) -> Self {
80        self.unprocessed_resource_keys = input;
81        self
82    }
83    /// <p>A list of resource keys that were not processed with the current response. The unprocessesResourceKeys value is in the same form as ResourceKeys, so the value can be directly provided to a subsequent BatchGetResourceConfig operation. If there are no unprocessed resource keys, the response contains an empty unprocessedResourceKeys list.</p>
84    pub fn get_unprocessed_resource_keys(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourceKey>> {
85        &self.unprocessed_resource_keys
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 [`BatchGetResourceConfigOutput`](crate::operation::batch_get_resource_config::BatchGetResourceConfigOutput).
97    pub fn build(self) -> crate::operation::batch_get_resource_config::BatchGetResourceConfigOutput {
98        crate::operation::batch_get_resource_config::BatchGetResourceConfigOutput {
99            base_configuration_items: self.base_configuration_items,
100            unprocessed_resource_keys: self.unprocessed_resource_keys,
101            _request_id: self._request_id,
102        }
103    }
104}