aws_sdk_eventbridge/operation/describe_endpoint/
_describe_endpoint_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 DescribeEndpointOutput {
6    /// <p>The name of the endpoint you asked for information about.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The description of the endpoint you asked for information about.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The ARN of the endpoint you asked for information about.</p>
11    pub arn: ::std::option::Option<::std::string::String>,
12    /// <p>The routing configuration of the endpoint you asked for information about.</p>
13    pub routing_config: ::std::option::Option<crate::types::RoutingConfig>,
14    /// <p>Whether replication is enabled or disabled for the endpoint you asked for information about.</p>
15    pub replication_config: ::std::option::Option<crate::types::ReplicationConfig>,
16    /// <p>The event buses being used by the endpoint you asked for information about.</p>
17    pub event_buses: ::std::option::Option<::std::vec::Vec<crate::types::EndpointEventBus>>,
18    /// <p>The ARN of the role used by the endpoint you asked for information about.</p>
19    pub role_arn: ::std::option::Option<::std::string::String>,
20    /// <p>The ID of the endpoint you asked for information about.</p>
21    pub endpoint_id: ::std::option::Option<::std::string::String>,
22    /// <p>The URL of the endpoint you asked for information about.</p>
23    pub endpoint_url: ::std::option::Option<::std::string::String>,
24    /// <p>The current state of the endpoint you asked for information about.</p>
25    pub state: ::std::option::Option<crate::types::EndpointState>,
26    /// <p>The reason the endpoint you asked for information about is in its current state.</p>
27    pub state_reason: ::std::option::Option<::std::string::String>,
28    /// <p>The time the endpoint you asked for information about was created.</p>
29    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
30    /// <p>The last time the endpoint you asked for information about was modified.</p>
31    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
32    _request_id: Option<String>,
33}
34impl DescribeEndpointOutput {
35    /// <p>The name of the endpoint you asked for information about.</p>
36    pub fn name(&self) -> ::std::option::Option<&str> {
37        self.name.as_deref()
38    }
39    /// <p>The description of the endpoint you asked for information about.</p>
40    pub fn description(&self) -> ::std::option::Option<&str> {
41        self.description.as_deref()
42    }
43    /// <p>The ARN of the endpoint you asked for information about.</p>
44    pub fn arn(&self) -> ::std::option::Option<&str> {
45        self.arn.as_deref()
46    }
47    /// <p>The routing configuration of the endpoint you asked for information about.</p>
48    pub fn routing_config(&self) -> ::std::option::Option<&crate::types::RoutingConfig> {
49        self.routing_config.as_ref()
50    }
51    /// <p>Whether replication is enabled or disabled for the endpoint you asked for information about.</p>
52    pub fn replication_config(&self) -> ::std::option::Option<&crate::types::ReplicationConfig> {
53        self.replication_config.as_ref()
54    }
55    /// <p>The event buses being used by the endpoint you asked for information about.</p>
56    ///
57    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.event_buses.is_none()`.
58    pub fn event_buses(&self) -> &[crate::types::EndpointEventBus] {
59        self.event_buses.as_deref().unwrap_or_default()
60    }
61    /// <p>The ARN of the role used by the endpoint you asked for information about.</p>
62    pub fn role_arn(&self) -> ::std::option::Option<&str> {
63        self.role_arn.as_deref()
64    }
65    /// <p>The ID of the endpoint you asked for information about.</p>
66    pub fn endpoint_id(&self) -> ::std::option::Option<&str> {
67        self.endpoint_id.as_deref()
68    }
69    /// <p>The URL of the endpoint you asked for information about.</p>
70    pub fn endpoint_url(&self) -> ::std::option::Option<&str> {
71        self.endpoint_url.as_deref()
72    }
73    /// <p>The current state of the endpoint you asked for information about.</p>
74    pub fn state(&self) -> ::std::option::Option<&crate::types::EndpointState> {
75        self.state.as_ref()
76    }
77    /// <p>The reason the endpoint you asked for information about is in its current state.</p>
78    pub fn state_reason(&self) -> ::std::option::Option<&str> {
79        self.state_reason.as_deref()
80    }
81    /// <p>The time the endpoint you asked for information about was created.</p>
82    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
83        self.creation_time.as_ref()
84    }
85    /// <p>The last time the endpoint you asked for information about was modified.</p>
86    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
87        self.last_modified_time.as_ref()
88    }
89}
90impl ::aws_types::request_id::RequestId for DescribeEndpointOutput {
91    fn request_id(&self) -> Option<&str> {
92        self._request_id.as_deref()
93    }
94}
95impl DescribeEndpointOutput {
96    /// Creates a new builder-style object to manufacture [`DescribeEndpointOutput`](crate::operation::describe_endpoint::DescribeEndpointOutput).
97    pub fn builder() -> crate::operation::describe_endpoint::builders::DescribeEndpointOutputBuilder {
98        crate::operation::describe_endpoint::builders::DescribeEndpointOutputBuilder::default()
99    }
100}
101
102/// A builder for [`DescribeEndpointOutput`](crate::operation::describe_endpoint::DescribeEndpointOutput).
103#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
104#[non_exhaustive]
105pub struct DescribeEndpointOutputBuilder {
106    pub(crate) name: ::std::option::Option<::std::string::String>,
107    pub(crate) description: ::std::option::Option<::std::string::String>,
108    pub(crate) arn: ::std::option::Option<::std::string::String>,
109    pub(crate) routing_config: ::std::option::Option<crate::types::RoutingConfig>,
110    pub(crate) replication_config: ::std::option::Option<crate::types::ReplicationConfig>,
111    pub(crate) event_buses: ::std::option::Option<::std::vec::Vec<crate::types::EndpointEventBus>>,
112    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
113    pub(crate) endpoint_id: ::std::option::Option<::std::string::String>,
114    pub(crate) endpoint_url: ::std::option::Option<::std::string::String>,
115    pub(crate) state: ::std::option::Option<crate::types::EndpointState>,
116    pub(crate) state_reason: ::std::option::Option<::std::string::String>,
117    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
118    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
119    _request_id: Option<String>,
120}
121impl DescribeEndpointOutputBuilder {
122    /// <p>The name of the endpoint you asked for information about.</p>
123    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.name = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>The name of the endpoint you asked for information about.</p>
128    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.name = input;
130        self
131    }
132    /// <p>The name of the endpoint you asked for information about.</p>
133    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
134        &self.name
135    }
136    /// <p>The description of the endpoint you asked for information about.</p>
137    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.description = ::std::option::Option::Some(input.into());
139        self
140    }
141    /// <p>The description of the endpoint you asked for information about.</p>
142    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.description = input;
144        self
145    }
146    /// <p>The description of the endpoint you asked for information about.</p>
147    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
148        &self.description
149    }
150    /// <p>The ARN of the endpoint you asked for information about.</p>
151    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152        self.arn = ::std::option::Option::Some(input.into());
153        self
154    }
155    /// <p>The ARN of the endpoint you asked for information about.</p>
156    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157        self.arn = input;
158        self
159    }
160    /// <p>The ARN of the endpoint you asked for information about.</p>
161    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
162        &self.arn
163    }
164    /// <p>The routing configuration of the endpoint you asked for information about.</p>
165    pub fn routing_config(mut self, input: crate::types::RoutingConfig) -> Self {
166        self.routing_config = ::std::option::Option::Some(input);
167        self
168    }
169    /// <p>The routing configuration of the endpoint you asked for information about.</p>
170    pub fn set_routing_config(mut self, input: ::std::option::Option<crate::types::RoutingConfig>) -> Self {
171        self.routing_config = input;
172        self
173    }
174    /// <p>The routing configuration of the endpoint you asked for information about.</p>
175    pub fn get_routing_config(&self) -> &::std::option::Option<crate::types::RoutingConfig> {
176        &self.routing_config
177    }
178    /// <p>Whether replication is enabled or disabled for the endpoint you asked for information about.</p>
179    pub fn replication_config(mut self, input: crate::types::ReplicationConfig) -> Self {
180        self.replication_config = ::std::option::Option::Some(input);
181        self
182    }
183    /// <p>Whether replication is enabled or disabled for the endpoint you asked for information about.</p>
184    pub fn set_replication_config(mut self, input: ::std::option::Option<crate::types::ReplicationConfig>) -> Self {
185        self.replication_config = input;
186        self
187    }
188    /// <p>Whether replication is enabled or disabled for the endpoint you asked for information about.</p>
189    pub fn get_replication_config(&self) -> &::std::option::Option<crate::types::ReplicationConfig> {
190        &self.replication_config
191    }
192    /// Appends an item to `event_buses`.
193    ///
194    /// To override the contents of this collection use [`set_event_buses`](Self::set_event_buses).
195    ///
196    /// <p>The event buses being used by the endpoint you asked for information about.</p>
197    pub fn event_buses(mut self, input: crate::types::EndpointEventBus) -> Self {
198        let mut v = self.event_buses.unwrap_or_default();
199        v.push(input);
200        self.event_buses = ::std::option::Option::Some(v);
201        self
202    }
203    /// <p>The event buses being used by the endpoint you asked for information about.</p>
204    pub fn set_event_buses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EndpointEventBus>>) -> Self {
205        self.event_buses = input;
206        self
207    }
208    /// <p>The event buses being used by the endpoint you asked for information about.</p>
209    pub fn get_event_buses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EndpointEventBus>> {
210        &self.event_buses
211    }
212    /// <p>The ARN of the role used by the endpoint you asked for information about.</p>
213    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214        self.role_arn = ::std::option::Option::Some(input.into());
215        self
216    }
217    /// <p>The ARN of the role used by the endpoint you asked for information about.</p>
218    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219        self.role_arn = input;
220        self
221    }
222    /// <p>The ARN of the role used by the endpoint you asked for information about.</p>
223    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
224        &self.role_arn
225    }
226    /// <p>The ID of the endpoint you asked for information about.</p>
227    pub fn endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
228        self.endpoint_id = ::std::option::Option::Some(input.into());
229        self
230    }
231    /// <p>The ID of the endpoint you asked for information about.</p>
232    pub fn set_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
233        self.endpoint_id = input;
234        self
235    }
236    /// <p>The ID of the endpoint you asked for information about.</p>
237    pub fn get_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
238        &self.endpoint_id
239    }
240    /// <p>The URL of the endpoint you asked for information about.</p>
241    pub fn endpoint_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
242        self.endpoint_url = ::std::option::Option::Some(input.into());
243        self
244    }
245    /// <p>The URL of the endpoint you asked for information about.</p>
246    pub fn set_endpoint_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
247        self.endpoint_url = input;
248        self
249    }
250    /// <p>The URL of the endpoint you asked for information about.</p>
251    pub fn get_endpoint_url(&self) -> &::std::option::Option<::std::string::String> {
252        &self.endpoint_url
253    }
254    /// <p>The current state of the endpoint you asked for information about.</p>
255    pub fn state(mut self, input: crate::types::EndpointState) -> Self {
256        self.state = ::std::option::Option::Some(input);
257        self
258    }
259    /// <p>The current state of the endpoint you asked for information about.</p>
260    pub fn set_state(mut self, input: ::std::option::Option<crate::types::EndpointState>) -> Self {
261        self.state = input;
262        self
263    }
264    /// <p>The current state of the endpoint you asked for information about.</p>
265    pub fn get_state(&self) -> &::std::option::Option<crate::types::EndpointState> {
266        &self.state
267    }
268    /// <p>The reason the endpoint you asked for information about is in its current state.</p>
269    pub fn state_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
270        self.state_reason = ::std::option::Option::Some(input.into());
271        self
272    }
273    /// <p>The reason the endpoint you asked for information about is in its current state.</p>
274    pub fn set_state_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
275        self.state_reason = input;
276        self
277    }
278    /// <p>The reason the endpoint you asked for information about is in its current state.</p>
279    pub fn get_state_reason(&self) -> &::std::option::Option<::std::string::String> {
280        &self.state_reason
281    }
282    /// <p>The time the endpoint you asked for information about was created.</p>
283    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
284        self.creation_time = ::std::option::Option::Some(input);
285        self
286    }
287    /// <p>The time the endpoint you asked for information about was created.</p>
288    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
289        self.creation_time = input;
290        self
291    }
292    /// <p>The time the endpoint you asked for information about was created.</p>
293    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
294        &self.creation_time
295    }
296    /// <p>The last time the endpoint you asked for information about was modified.</p>
297    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
298        self.last_modified_time = ::std::option::Option::Some(input);
299        self
300    }
301    /// <p>The last time the endpoint you asked for information about was modified.</p>
302    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
303        self.last_modified_time = input;
304        self
305    }
306    /// <p>The last time the endpoint you asked for information about was modified.</p>
307    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
308        &self.last_modified_time
309    }
310    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
311        self._request_id = Some(request_id.into());
312        self
313    }
314
315    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
316        self._request_id = request_id;
317        self
318    }
319    /// Consumes the builder and constructs a [`DescribeEndpointOutput`](crate::operation::describe_endpoint::DescribeEndpointOutput).
320    pub fn build(self) -> crate::operation::describe_endpoint::DescribeEndpointOutput {
321        crate::operation::describe_endpoint::DescribeEndpointOutput {
322            name: self.name,
323            description: self.description,
324            arn: self.arn,
325            routing_config: self.routing_config,
326            replication_config: self.replication_config,
327            event_buses: self.event_buses,
328            role_arn: self.role_arn,
329            endpoint_id: self.endpoint_id,
330            endpoint_url: self.endpoint_url,
331            state: self.state,
332            state_reason: self.state_reason,
333            creation_time: self.creation_time,
334            last_modified_time: self.last_modified_time,
335            _request_id: self._request_id,
336        }
337    }
338}