aws_sdk_workdocs/operation/get_resources/
_get_resources_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 GetResourcesOutput {
6    /// <p>The folders in the specified folder.</p>
7    pub folders: ::std::option::Option<::std::vec::Vec<crate::types::FolderMetadata>>,
8    /// <p>The documents in the specified collection.</p>
9    pub documents: ::std::option::Option<::std::vec::Vec<crate::types::DocumentMetadata>>,
10    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
11    pub marker: ::std::option::Option<::std::string::String>,
12    _request_id: Option<String>,
13}
14impl GetResourcesOutput {
15    /// <p>The folders in the specified folder.</p>
16    ///
17    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.folders.is_none()`.
18    pub fn folders(&self) -> &[crate::types::FolderMetadata] {
19        self.folders.as_deref().unwrap_or_default()
20    }
21    /// <p>The documents in the specified collection.</p>
22    ///
23    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.documents.is_none()`.
24    pub fn documents(&self) -> &[crate::types::DocumentMetadata] {
25        self.documents.as_deref().unwrap_or_default()
26    }
27    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
28    pub fn marker(&self) -> ::std::option::Option<&str> {
29        self.marker.as_deref()
30    }
31}
32impl ::aws_types::request_id::RequestId for GetResourcesOutput {
33    fn request_id(&self) -> Option<&str> {
34        self._request_id.as_deref()
35    }
36}
37impl GetResourcesOutput {
38    /// Creates a new builder-style object to manufacture [`GetResourcesOutput`](crate::operation::get_resources::GetResourcesOutput).
39    pub fn builder() -> crate::operation::get_resources::builders::GetResourcesOutputBuilder {
40        crate::operation::get_resources::builders::GetResourcesOutputBuilder::default()
41    }
42}
43
44/// A builder for [`GetResourcesOutput`](crate::operation::get_resources::GetResourcesOutput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct GetResourcesOutputBuilder {
48    pub(crate) folders: ::std::option::Option<::std::vec::Vec<crate::types::FolderMetadata>>,
49    pub(crate) documents: ::std::option::Option<::std::vec::Vec<crate::types::DocumentMetadata>>,
50    pub(crate) marker: ::std::option::Option<::std::string::String>,
51    _request_id: Option<String>,
52}
53impl GetResourcesOutputBuilder {
54    /// Appends an item to `folders`.
55    ///
56    /// To override the contents of this collection use [`set_folders`](Self::set_folders).
57    ///
58    /// <p>The folders in the specified folder.</p>
59    pub fn folders(mut self, input: crate::types::FolderMetadata) -> Self {
60        let mut v = self.folders.unwrap_or_default();
61        v.push(input);
62        self.folders = ::std::option::Option::Some(v);
63        self
64    }
65    /// <p>The folders in the specified folder.</p>
66    pub fn set_folders(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FolderMetadata>>) -> Self {
67        self.folders = input;
68        self
69    }
70    /// <p>The folders in the specified folder.</p>
71    pub fn get_folders(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FolderMetadata>> {
72        &self.folders
73    }
74    /// Appends an item to `documents`.
75    ///
76    /// To override the contents of this collection use [`set_documents`](Self::set_documents).
77    ///
78    /// <p>The documents in the specified collection.</p>
79    pub fn documents(mut self, input: crate::types::DocumentMetadata) -> Self {
80        let mut v = self.documents.unwrap_or_default();
81        v.push(input);
82        self.documents = ::std::option::Option::Some(v);
83        self
84    }
85    /// <p>The documents in the specified collection.</p>
86    pub fn set_documents(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentMetadata>>) -> Self {
87        self.documents = input;
88        self
89    }
90    /// <p>The documents in the specified collection.</p>
91    pub fn get_documents(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentMetadata>> {
92        &self.documents
93    }
94    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
95    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.marker = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
100    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.marker = input;
102        self
103    }
104    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
105    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
106        &self.marker
107    }
108    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
109        self._request_id = Some(request_id.into());
110        self
111    }
112
113    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
114        self._request_id = request_id;
115        self
116    }
117    /// Consumes the builder and constructs a [`GetResourcesOutput`](crate::operation::get_resources::GetResourcesOutput).
118    pub fn build(self) -> crate::operation::get_resources::GetResourcesOutput {
119        crate::operation::get_resources::GetResourcesOutput {
120            folders: self.folders,
121            documents: self.documents,
122            marker: self.marker,
123            _request_id: self._request_id,
124        }
125    }
126}