aws_sdk_datapipeline/operation/query_objects/
_query_objects_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the output of QueryObjects.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct QueryObjectsOutput {
7    /// <p>The identifiers that match the query selectors.</p>
8    pub ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
9    /// <p>The starting point for the next page of results. To view the next page of results, call <code>QueryObjects</code> again with this marker value. If the value is null, there are no more results.</p>
10    pub marker: ::std::option::Option<::std::string::String>,
11    /// <p>Indicates whether there are more results that can be obtained by a subsequent call.</p>
12    pub has_more_results: bool,
13    _request_id: Option<String>,
14}
15impl QueryObjectsOutput {
16    /// <p>The identifiers that match the query selectors.</p>
17    ///
18    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.ids.is_none()`.
19    pub fn ids(&self) -> &[::std::string::String] {
20        self.ids.as_deref().unwrap_or_default()
21    }
22    /// <p>The starting point for the next page of results. To view the next page of results, call <code>QueryObjects</code> again with this marker value. If the value is null, there are no more results.</p>
23    pub fn marker(&self) -> ::std::option::Option<&str> {
24        self.marker.as_deref()
25    }
26    /// <p>Indicates whether there are more results that can be obtained by a subsequent call.</p>
27    pub fn has_more_results(&self) -> bool {
28        self.has_more_results
29    }
30}
31impl ::aws_types::request_id::RequestId for QueryObjectsOutput {
32    fn request_id(&self) -> Option<&str> {
33        self._request_id.as_deref()
34    }
35}
36impl QueryObjectsOutput {
37    /// Creates a new builder-style object to manufacture [`QueryObjectsOutput`](crate::operation::query_objects::QueryObjectsOutput).
38    pub fn builder() -> crate::operation::query_objects::builders::QueryObjectsOutputBuilder {
39        crate::operation::query_objects::builders::QueryObjectsOutputBuilder::default()
40    }
41}
42
43/// A builder for [`QueryObjectsOutput`](crate::operation::query_objects::QueryObjectsOutput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
45#[non_exhaustive]
46pub struct QueryObjectsOutputBuilder {
47    pub(crate) ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
48    pub(crate) marker: ::std::option::Option<::std::string::String>,
49    pub(crate) has_more_results: ::std::option::Option<bool>,
50    _request_id: Option<String>,
51}
52impl QueryObjectsOutputBuilder {
53    /// Appends an item to `ids`.
54    ///
55    /// To override the contents of this collection use [`set_ids`](Self::set_ids).
56    ///
57    /// <p>The identifiers that match the query selectors.</p>
58    pub fn ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        let mut v = self.ids.unwrap_or_default();
60        v.push(input.into());
61        self.ids = ::std::option::Option::Some(v);
62        self
63    }
64    /// <p>The identifiers that match the query selectors.</p>
65    pub fn set_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
66        self.ids = input;
67        self
68    }
69    /// <p>The identifiers that match the query selectors.</p>
70    pub fn get_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
71        &self.ids
72    }
73    /// <p>The starting point for the next page of results. To view the next page of results, call <code>QueryObjects</code> again with this marker value. If the value is null, there are no more results.</p>
74    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.marker = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The starting point for the next page of results. To view the next page of results, call <code>QueryObjects</code> again with this marker value. If the value is null, there are no more results.</p>
79    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.marker = input;
81        self
82    }
83    /// <p>The starting point for the next page of results. To view the next page of results, call <code>QueryObjects</code> again with this marker value. If the value is null, there are no more results.</p>
84    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
85        &self.marker
86    }
87    /// <p>Indicates whether there are more results that can be obtained by a subsequent call.</p>
88    pub fn has_more_results(mut self, input: bool) -> Self {
89        self.has_more_results = ::std::option::Option::Some(input);
90        self
91    }
92    /// <p>Indicates whether there are more results that can be obtained by a subsequent call.</p>
93    pub fn set_has_more_results(mut self, input: ::std::option::Option<bool>) -> Self {
94        self.has_more_results = input;
95        self
96    }
97    /// <p>Indicates whether there are more results that can be obtained by a subsequent call.</p>
98    pub fn get_has_more_results(&self) -> &::std::option::Option<bool> {
99        &self.has_more_results
100    }
101    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
102        self._request_id = Some(request_id.into());
103        self
104    }
105
106    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
107        self._request_id = request_id;
108        self
109    }
110    /// Consumes the builder and constructs a [`QueryObjectsOutput`](crate::operation::query_objects::QueryObjectsOutput).
111    pub fn build(self) -> crate::operation::query_objects::QueryObjectsOutput {
112        crate::operation::query_objects::QueryObjectsOutput {
113            ids: self.ids,
114            marker: self.marker,
115            has_more_results: self.has_more_results.unwrap_or_default(),
116            _request_id: self._request_id,
117        }
118    }
119}