aws_sdk_datapipeline/operation/describe_objects/
_describe_objects_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeObjectsOutput {
7 pub pipeline_objects: ::std::vec::Vec<crate::types::PipelineObject>,
9 pub marker: ::std::option::Option<::std::string::String>,
11 pub has_more_results: bool,
13 _request_id: Option<String>,
14}
15impl DescribeObjectsOutput {
16 pub fn pipeline_objects(&self) -> &[crate::types::PipelineObject] {
18 use std::ops::Deref;
19 self.pipeline_objects.deref()
20 }
21 pub fn marker(&self) -> ::std::option::Option<&str> {
23 self.marker.as_deref()
24 }
25 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 pub fn builder() -> crate::operation::describe_objects::builders::DescribeObjectsOutputBuilder {
38 crate::operation::describe_objects::builders::DescribeObjectsOutputBuilder::default()
39 }
40}
41
42#[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 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 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 pub fn get_pipeline_objects(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PipelineObject>> {
70 &self.pipeline_objects
71 }
72 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 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.marker = input;
80 self
81 }
82 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
84 &self.marker
85 }
86 pub fn has_more_results(mut self, input: bool) -> Self {
88 self.has_more_results = ::std::option::Option::Some(input);
89 self
90 }
91 pub fn set_has_more_results(mut self, input: ::std::option::Option<bool>) -> Self {
93 self.has_more_results = input;
94 self
95 }
96 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 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}