aws_sdk_kendra/operation/get_snapshots/
_get_snapshots_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetSnapshotsOutput {
6 pub snap_shot_time_filter: ::std::option::Option<crate::types::TimeRange>,
8 pub snapshots_data_header: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10 pub snapshots_data: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
12 pub next_token: ::std::option::Option<::std::string::String>,
14 _request_id: Option<String>,
15}
16impl GetSnapshotsOutput {
17 pub fn snap_shot_time_filter(&self) -> ::std::option::Option<&crate::types::TimeRange> {
19 self.snap_shot_time_filter.as_ref()
20 }
21 pub fn snapshots_data_header(&self) -> &[::std::string::String] {
25 self.snapshots_data_header.as_deref().unwrap_or_default()
26 }
27 pub fn snapshots_data(&self) -> &[::std::vec::Vec<::std::string::String>] {
31 self.snapshots_data.as_deref().unwrap_or_default()
32 }
33 pub fn next_token(&self) -> ::std::option::Option<&str> {
35 self.next_token.as_deref()
36 }
37}
38impl ::aws_types::request_id::RequestId for GetSnapshotsOutput {
39 fn request_id(&self) -> Option<&str> {
40 self._request_id.as_deref()
41 }
42}
43impl GetSnapshotsOutput {
44 pub fn builder() -> crate::operation::get_snapshots::builders::GetSnapshotsOutputBuilder {
46 crate::operation::get_snapshots::builders::GetSnapshotsOutputBuilder::default()
47 }
48}
49
50#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct GetSnapshotsOutputBuilder {
54 pub(crate) snap_shot_time_filter: ::std::option::Option<crate::types::TimeRange>,
55 pub(crate) snapshots_data_header: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
56 pub(crate) snapshots_data: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
57 pub(crate) next_token: ::std::option::Option<::std::string::String>,
58 _request_id: Option<String>,
59}
60impl GetSnapshotsOutputBuilder {
61 pub fn snap_shot_time_filter(mut self, input: crate::types::TimeRange) -> Self {
63 self.snap_shot_time_filter = ::std::option::Option::Some(input);
64 self
65 }
66 pub fn set_snap_shot_time_filter(mut self, input: ::std::option::Option<crate::types::TimeRange>) -> Self {
68 self.snap_shot_time_filter = input;
69 self
70 }
71 pub fn get_snap_shot_time_filter(&self) -> &::std::option::Option<crate::types::TimeRange> {
73 &self.snap_shot_time_filter
74 }
75 pub fn snapshots_data_header(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 let mut v = self.snapshots_data_header.unwrap_or_default();
82 v.push(input.into());
83 self.snapshots_data_header = ::std::option::Option::Some(v);
84 self
85 }
86 pub fn set_snapshots_data_header(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
88 self.snapshots_data_header = input;
89 self
90 }
91 pub fn get_snapshots_data_header(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
93 &self.snapshots_data_header
94 }
95 pub fn snapshots_data(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
101 let mut v = self.snapshots_data.unwrap_or_default();
102 v.push(input);
103 self.snapshots_data = ::std::option::Option::Some(v);
104 self
105 }
106 pub fn set_snapshots_data(mut self, input: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>) -> Self {
108 self.snapshots_data = input;
109 self
110 }
111 pub fn get_snapshots_data(&self) -> &::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>> {
113 &self.snapshots_data
114 }
115 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.next_token = ::std::option::Option::Some(input.into());
118 self
119 }
120 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.next_token = input;
123 self
124 }
125 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
127 &self.next_token
128 }
129 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
130 self._request_id = Some(request_id.into());
131 self
132 }
133
134 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
135 self._request_id = request_id;
136 self
137 }
138 pub fn build(self) -> crate::operation::get_snapshots::GetSnapshotsOutput {
140 crate::operation::get_snapshots::GetSnapshotsOutput {
141 snap_shot_time_filter: self.snap_shot_time_filter,
142 snapshots_data_header: self.snapshots_data_header,
143 snapshots_data: self.snapshots_data,
144 next_token: self.next_token,
145 _request_id: self._request_id,
146 }
147 }
148}