aws_sdk_schemas/operation/describe_discoverer/
_describe_discoverer_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 DescribeDiscovererOutput {
6    /// <p>The description of the discoverer.</p>
7    pub description: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the discoverer.</p>
9    pub discoverer_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The ID of the discoverer.</p>
11    pub discoverer_id: ::std::option::Option<::std::string::String>,
12    /// <p>The ARN of the event bus.</p>
13    pub source_arn: ::std::option::Option<::std::string::String>,
14    /// <p>The state of the discoverer.</p>
15    pub state: ::std::option::Option<crate::types::DiscovererState>,
16    /// <p>The Status if the discoverer will discover schemas from events sent from another account.</p>
17    pub cross_account: ::std::option::Option<bool>,
18    /// <p>Tags associated with the resource.</p>
19    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20    _request_id: Option<String>,
21}
22impl DescribeDiscovererOutput {
23    /// <p>The description of the discoverer.</p>
24    pub fn description(&self) -> ::std::option::Option<&str> {
25        self.description.as_deref()
26    }
27    /// <p>The ARN of the discoverer.</p>
28    pub fn discoverer_arn(&self) -> ::std::option::Option<&str> {
29        self.discoverer_arn.as_deref()
30    }
31    /// <p>The ID of the discoverer.</p>
32    pub fn discoverer_id(&self) -> ::std::option::Option<&str> {
33        self.discoverer_id.as_deref()
34    }
35    /// <p>The ARN of the event bus.</p>
36    pub fn source_arn(&self) -> ::std::option::Option<&str> {
37        self.source_arn.as_deref()
38    }
39    /// <p>The state of the discoverer.</p>
40    pub fn state(&self) -> ::std::option::Option<&crate::types::DiscovererState> {
41        self.state.as_ref()
42    }
43    /// <p>The Status if the discoverer will discover schemas from events sent from another account.</p>
44    pub fn cross_account(&self) -> ::std::option::Option<bool> {
45        self.cross_account
46    }
47    /// <p>Tags associated with the resource.</p>
48    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
49        self.tags.as_ref()
50    }
51}
52impl ::aws_types::request_id::RequestId for DescribeDiscovererOutput {
53    fn request_id(&self) -> Option<&str> {
54        self._request_id.as_deref()
55    }
56}
57impl DescribeDiscovererOutput {
58    /// Creates a new builder-style object to manufacture [`DescribeDiscovererOutput`](crate::operation::describe_discoverer::DescribeDiscovererOutput).
59    pub fn builder() -> crate::operation::describe_discoverer::builders::DescribeDiscovererOutputBuilder {
60        crate::operation::describe_discoverer::builders::DescribeDiscovererOutputBuilder::default()
61    }
62}
63
64/// A builder for [`DescribeDiscovererOutput`](crate::operation::describe_discoverer::DescribeDiscovererOutput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct DescribeDiscovererOutputBuilder {
68    pub(crate) description: ::std::option::Option<::std::string::String>,
69    pub(crate) discoverer_arn: ::std::option::Option<::std::string::String>,
70    pub(crate) discoverer_id: ::std::option::Option<::std::string::String>,
71    pub(crate) source_arn: ::std::option::Option<::std::string::String>,
72    pub(crate) state: ::std::option::Option<crate::types::DiscovererState>,
73    pub(crate) cross_account: ::std::option::Option<bool>,
74    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
75    _request_id: Option<String>,
76}
77impl DescribeDiscovererOutputBuilder {
78    /// <p>The description of the discoverer.</p>
79    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.description = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The description of the discoverer.</p>
84    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.description = input;
86        self
87    }
88    /// <p>The description of the discoverer.</p>
89    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
90        &self.description
91    }
92    /// <p>The ARN of the discoverer.</p>
93    pub fn discoverer_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.discoverer_arn = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The ARN of the discoverer.</p>
98    pub fn set_discoverer_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.discoverer_arn = input;
100        self
101    }
102    /// <p>The ARN of the discoverer.</p>
103    pub fn get_discoverer_arn(&self) -> &::std::option::Option<::std::string::String> {
104        &self.discoverer_arn
105    }
106    /// <p>The ID of the discoverer.</p>
107    pub fn discoverer_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.discoverer_id = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The ID of the discoverer.</p>
112    pub fn set_discoverer_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.discoverer_id = input;
114        self
115    }
116    /// <p>The ID of the discoverer.</p>
117    pub fn get_discoverer_id(&self) -> &::std::option::Option<::std::string::String> {
118        &self.discoverer_id
119    }
120    /// <p>The ARN of the event bus.</p>
121    pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.source_arn = ::std::option::Option::Some(input.into());
123        self
124    }
125    /// <p>The ARN of the event bus.</p>
126    pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.source_arn = input;
128        self
129    }
130    /// <p>The ARN of the event bus.</p>
131    pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> {
132        &self.source_arn
133    }
134    /// <p>The state of the discoverer.</p>
135    pub fn state(mut self, input: crate::types::DiscovererState) -> Self {
136        self.state = ::std::option::Option::Some(input);
137        self
138    }
139    /// <p>The state of the discoverer.</p>
140    pub fn set_state(mut self, input: ::std::option::Option<crate::types::DiscovererState>) -> Self {
141        self.state = input;
142        self
143    }
144    /// <p>The state of the discoverer.</p>
145    pub fn get_state(&self) -> &::std::option::Option<crate::types::DiscovererState> {
146        &self.state
147    }
148    /// <p>The Status if the discoverer will discover schemas from events sent from another account.</p>
149    pub fn cross_account(mut self, input: bool) -> Self {
150        self.cross_account = ::std::option::Option::Some(input);
151        self
152    }
153    /// <p>The Status if the discoverer will discover schemas from events sent from another account.</p>
154    pub fn set_cross_account(mut self, input: ::std::option::Option<bool>) -> Self {
155        self.cross_account = input;
156        self
157    }
158    /// <p>The Status if the discoverer will discover schemas from events sent from another account.</p>
159    pub fn get_cross_account(&self) -> &::std::option::Option<bool> {
160        &self.cross_account
161    }
162    /// Adds a key-value pair to `tags`.
163    ///
164    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
165    ///
166    /// <p>Tags associated with the resource.</p>
167    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
168        let mut hash_map = self.tags.unwrap_or_default();
169        hash_map.insert(k.into(), v.into());
170        self.tags = ::std::option::Option::Some(hash_map);
171        self
172    }
173    /// <p>Tags associated with the resource.</p>
174    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
175        self.tags = input;
176        self
177    }
178    /// <p>Tags associated with the resource.</p>
179    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
180        &self.tags
181    }
182    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
183        self._request_id = Some(request_id.into());
184        self
185    }
186
187    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
188        self._request_id = request_id;
189        self
190    }
191    /// Consumes the builder and constructs a [`DescribeDiscovererOutput`](crate::operation::describe_discoverer::DescribeDiscovererOutput).
192    pub fn build(self) -> crate::operation::describe_discoverer::DescribeDiscovererOutput {
193        crate::operation::describe_discoverer::DescribeDiscovererOutput {
194            description: self.description,
195            discoverer_arn: self.discoverer_arn,
196            discoverer_id: self.discoverer_id,
197            source_arn: self.source_arn,
198            state: self.state,
199            cross_account: self.cross_account,
200            tags: self.tags,
201            _request_id: self._request_id,
202        }
203    }
204}