aws_sdk_datapipeline/operation/describe_objects/
_describe_objects_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the output of DescribeObjects.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeObjectsOutput {
7    /// <p>An array of object definitions.</p>
8    pub pipeline_objects: ::std::vec::Vec<crate::types::PipelineObject>,
9    /// <p>The starting point for the next page of results. To view the next page of results, call <code>DescribeObjects</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 to return.</p>
12    pub has_more_results: bool,
13    _request_id: Option<String>,
14}
15impl DescribeObjectsOutput {
16    /// <p>An array of object definitions.</p>
17    pub fn pipeline_objects(&self) -> &[crate::types::PipelineObject] {
18        use std::ops::Deref;
19        self.pipeline_objects.deref()
20    }
21    /// <p>The starting point for the next page of results. To view the next page of results, call <code>DescribeObjects</code> again with this marker value. If the value is null, there are no more results.</p>
22    pub fn marker(&self) -> ::std::option::Option<&str> {
23        self.marker.as_deref()
24    }
25    /// <p>Indicates whether there are more results to return.</p>
26    pub fn has_more_results(&self) -> bool {
27        self.has_more_results
28    }
29}
30impl ::aws_types::request_id::RequestId for DescribeObjectsOutput {
31    fn request_id(&self) -> Option<&str> {
32        self._request_id.as_deref()
33    }
34}
35impl DescribeObjectsOutput {
36    /// Creates a new builder-style object to manufacture [`DescribeObjectsOutput`](crate::operation::describe_objects::DescribeObjectsOutput).
37    pub fn builder() -> crate::operation::describe_objects::builders::DescribeObjectsOutputBuilder {
38        crate::operation::describe_objects::builders::DescribeObjectsOutputBuilder::default()
39    }
40}
41
42/// A builder for [`DescribeObjectsOutput`](crate::operation::describe_objects::DescribeObjectsOutput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct DescribeObjectsOutputBuilder {
46    pub(crate) pipeline_objects: ::std::option::Option<::std::vec::Vec<crate::types::PipelineObject>>,
47    pub(crate) marker: ::std::option::Option<::std::string::String>,
48    pub(crate) has_more_results: ::std::option::Option<bool>,
49    _request_id: Option<String>,
50}
51impl DescribeObjectsOutputBuilder {
52    /// Appends an item to `pipeline_objects`.
53    ///
54    /// To override the contents of this collection use [`set_pipeline_objects`](Self::set_pipeline_objects).
55    ///
56    /// <p>An array of object definitions.</p>
57    pub fn pipeline_objects(mut self, input: crate::types::PipelineObject) -> Self {
58        let mut v = self.pipeline_objects.unwrap_or_default();
59        v.push(input);
60        self.pipeline_objects = ::std::option::Option::Some(v);
61        self
62    }
63    /// <p>An array of object definitions.</p>
64    pub fn set_pipeline_objects(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PipelineObject>>) -> Self {
65        self.pipeline_objects = input;
66        self
67    }
68    /// <p>An array of object definitions.</p>
69    pub fn get_pipeline_objects(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PipelineObject>> {
70        &self.pipeline_objects
71    }
72    /// <p>The starting point for the next page of results. To view the next page of results, call <code>DescribeObjects</code> again with this marker value. If the value is null, there are no more results.</p>
73    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.marker = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The starting point for the next page of results. To view the next page of results, call <code>DescribeObjects</code> again with this marker value. If the value is null, there are no more results.</p>
78    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.marker = input;
80        self
81    }
82    /// <p>The starting point for the next page of results. To view the next page of results, call <code>DescribeObjects</code> again with this marker value. If the value is null, there are no more results.</p>
83    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
84        &self.marker
85    }
86    /// <p>Indicates whether there are more results to return.</p>
87    pub fn has_more_results(mut self, input: bool) -> Self {
88        self.has_more_results = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>Indicates whether there are more results to return.</p>
92    pub fn set_has_more_results(mut self, input: ::std::option::Option<bool>) -> Self {
93        self.has_more_results = input;
94        self
95    }
96    /// <p>Indicates whether there are more results to return.</p>
97    pub fn get_has_more_results(&self) -> &::std::option::Option<bool> {
98        &self.has_more_results
99    }
100    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
101        self._request_id = Some(request_id.into());
102        self
103    }
104
105    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
106        self._request_id = request_id;
107        self
108    }
109    /// Consumes the builder and constructs a [`DescribeObjectsOutput`](crate::operation::describe_objects::DescribeObjectsOutput).
110    /// This method will fail if any of the following fields are not set:
111    /// - [`pipeline_objects`](crate::operation::describe_objects::builders::DescribeObjectsOutputBuilder::pipeline_objects)
112    pub fn build(
113        self,
114    ) -> ::std::result::Result<crate::operation::describe_objects::DescribeObjectsOutput, ::aws_smithy_types::error::operation::BuildError> {
115        ::std::result::Result::Ok(crate::operation::describe_objects::DescribeObjectsOutput {
116            pipeline_objects: self.pipeline_objects.ok_or_else(|| {
117                ::aws_smithy_types::error::operation::BuildError::missing_field(
118                    "pipeline_objects",
119                    "pipeline_objects was not specified but it is required when building DescribeObjectsOutput",
120                )
121            })?,
122            marker: self.marker,
123            has_more_results: self.has_more_results.unwrap_or_default(),
124            _request_id: self._request_id,
125        })
126    }
127}