aws_sdk_eventbridge/operation/update_endpoint/
_update_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 UpdateEndpointOutput {
6    /// <p>The name of the endpoint you updated in this request.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the endpoint you updated in this request.</p>
9    pub arn: ::std::option::Option<::std::string::String>,
10    /// <p>The routing configuration you updated in this request.</p>
11    pub routing_config: ::std::option::Option<crate::types::RoutingConfig>,
12    /// <p>Whether event replication was enabled or disabled for the endpoint you updated in this request.</p>
13    pub replication_config: ::std::option::Option<crate::types::ReplicationConfig>,
14    /// <p>The event buses used for replication for the endpoint you updated in this request.</p>
15    pub event_buses: ::std::option::Option<::std::vec::Vec<crate::types::EndpointEventBus>>,
16    /// <p>The ARN of the role used by event replication for the endpoint you updated in this request.</p>
17    pub role_arn: ::std::option::Option<::std::string::String>,
18    /// <p>The ID of the endpoint you updated in this request.</p>
19    pub endpoint_id: ::std::option::Option<::std::string::String>,
20    /// <p>The URL of the endpoint you updated in this request.</p>
21    pub endpoint_url: ::std::option::Option<::std::string::String>,
22    /// <p>The state of the endpoint you updated in this request.</p>
23    pub state: ::std::option::Option<crate::types::EndpointState>,
24    _request_id: Option<String>,
25}
26impl UpdateEndpointOutput {
27    /// <p>The name of the endpoint you updated in this request.</p>
28    pub fn name(&self) -> ::std::option::Option<&str> {
29        self.name.as_deref()
30    }
31    /// <p>The ARN of the endpoint you updated in this request.</p>
32    pub fn arn(&self) -> ::std::option::Option<&str> {
33        self.arn.as_deref()
34    }
35    /// <p>The routing configuration you updated in this request.</p>
36    pub fn routing_config(&self) -> ::std::option::Option<&crate::types::RoutingConfig> {
37        self.routing_config.as_ref()
38    }
39    /// <p>Whether event replication was enabled or disabled for the endpoint you updated in this request.</p>
40    pub fn replication_config(&self) -> ::std::option::Option<&crate::types::ReplicationConfig> {
41        self.replication_config.as_ref()
42    }
43    /// <p>The event buses used for replication for the endpoint you updated in this request.</p>
44    ///
45    /// 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()`.
46    pub fn event_buses(&self) -> &[crate::types::EndpointEventBus] {
47        self.event_buses.as_deref().unwrap_or_default()
48    }
49    /// <p>The ARN of the role used by event replication for the endpoint you updated in this request.</p>
50    pub fn role_arn(&self) -> ::std::option::Option<&str> {
51        self.role_arn.as_deref()
52    }
53    /// <p>The ID of the endpoint you updated in this request.</p>
54    pub fn endpoint_id(&self) -> ::std::option::Option<&str> {
55        self.endpoint_id.as_deref()
56    }
57    /// <p>The URL of the endpoint you updated in this request.</p>
58    pub fn endpoint_url(&self) -> ::std::option::Option<&str> {
59        self.endpoint_url.as_deref()
60    }
61    /// <p>The state of the endpoint you updated in this request.</p>
62    pub fn state(&self) -> ::std::option::Option<&crate::types::EndpointState> {
63        self.state.as_ref()
64    }
65}
66impl ::aws_types::request_id::RequestId for UpdateEndpointOutput {
67    fn request_id(&self) -> Option<&str> {
68        self._request_id.as_deref()
69    }
70}
71impl UpdateEndpointOutput {
72    /// Creates a new builder-style object to manufacture [`UpdateEndpointOutput`](crate::operation::update_endpoint::UpdateEndpointOutput).
73    pub fn builder() -> crate::operation::update_endpoint::builders::UpdateEndpointOutputBuilder {
74        crate::operation::update_endpoint::builders::UpdateEndpointOutputBuilder::default()
75    }
76}
77
78/// A builder for [`UpdateEndpointOutput`](crate::operation::update_endpoint::UpdateEndpointOutput).
79#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
80#[non_exhaustive]
81pub struct UpdateEndpointOutputBuilder {
82    pub(crate) name: ::std::option::Option<::std::string::String>,
83    pub(crate) arn: ::std::option::Option<::std::string::String>,
84    pub(crate) routing_config: ::std::option::Option<crate::types::RoutingConfig>,
85    pub(crate) replication_config: ::std::option::Option<crate::types::ReplicationConfig>,
86    pub(crate) event_buses: ::std::option::Option<::std::vec::Vec<crate::types::EndpointEventBus>>,
87    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
88    pub(crate) endpoint_id: ::std::option::Option<::std::string::String>,
89    pub(crate) endpoint_url: ::std::option::Option<::std::string::String>,
90    pub(crate) state: ::std::option::Option<crate::types::EndpointState>,
91    _request_id: Option<String>,
92}
93impl UpdateEndpointOutputBuilder {
94    /// <p>The name of the endpoint you updated in this request.</p>
95    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.name = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The name of the endpoint you updated in this request.</p>
100    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.name = input;
102        self
103    }
104    /// <p>The name of the endpoint you updated in this request.</p>
105    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
106        &self.name
107    }
108    /// <p>The ARN of the endpoint you updated in this request.</p>
109    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.arn = ::std::option::Option::Some(input.into());
111        self
112    }
113    /// <p>The ARN of the endpoint you updated in this request.</p>
114    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115        self.arn = input;
116        self
117    }
118    /// <p>The ARN of the endpoint you updated in this request.</p>
119    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
120        &self.arn
121    }
122    /// <p>The routing configuration you updated in this request.</p>
123    pub fn routing_config(mut self, input: crate::types::RoutingConfig) -> Self {
124        self.routing_config = ::std::option::Option::Some(input);
125        self
126    }
127    /// <p>The routing configuration you updated in this request.</p>
128    pub fn set_routing_config(mut self, input: ::std::option::Option<crate::types::RoutingConfig>) -> Self {
129        self.routing_config = input;
130        self
131    }
132    /// <p>The routing configuration you updated in this request.</p>
133    pub fn get_routing_config(&self) -> &::std::option::Option<crate::types::RoutingConfig> {
134        &self.routing_config
135    }
136    /// <p>Whether event replication was enabled or disabled for the endpoint you updated in this request.</p>
137    pub fn replication_config(mut self, input: crate::types::ReplicationConfig) -> Self {
138        self.replication_config = ::std::option::Option::Some(input);
139        self
140    }
141    /// <p>Whether event replication was enabled or disabled for the endpoint you updated in this request.</p>
142    pub fn set_replication_config(mut self, input: ::std::option::Option<crate::types::ReplicationConfig>) -> Self {
143        self.replication_config = input;
144        self
145    }
146    /// <p>Whether event replication was enabled or disabled for the endpoint you updated in this request.</p>
147    pub fn get_replication_config(&self) -> &::std::option::Option<crate::types::ReplicationConfig> {
148        &self.replication_config
149    }
150    /// Appends an item to `event_buses`.
151    ///
152    /// To override the contents of this collection use [`set_event_buses`](Self::set_event_buses).
153    ///
154    /// <p>The event buses used for replication for the endpoint you updated in this request.</p>
155    pub fn event_buses(mut self, input: crate::types::EndpointEventBus) -> Self {
156        let mut v = self.event_buses.unwrap_or_default();
157        v.push(input);
158        self.event_buses = ::std::option::Option::Some(v);
159        self
160    }
161    /// <p>The event buses used for replication for the endpoint you updated in this request.</p>
162    pub fn set_event_buses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EndpointEventBus>>) -> Self {
163        self.event_buses = input;
164        self
165    }
166    /// <p>The event buses used for replication for the endpoint you updated in this request.</p>
167    pub fn get_event_buses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EndpointEventBus>> {
168        &self.event_buses
169    }
170    /// <p>The ARN of the role used by event replication for the endpoint you updated in this request.</p>
171    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172        self.role_arn = ::std::option::Option::Some(input.into());
173        self
174    }
175    /// <p>The ARN of the role used by event replication for the endpoint you updated in this request.</p>
176    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177        self.role_arn = input;
178        self
179    }
180    /// <p>The ARN of the role used by event replication for the endpoint you updated in this request.</p>
181    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
182        &self.role_arn
183    }
184    /// <p>The ID of the endpoint you updated in this request.</p>
185    pub fn endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186        self.endpoint_id = ::std::option::Option::Some(input.into());
187        self
188    }
189    /// <p>The ID of the endpoint you updated in this request.</p>
190    pub fn set_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
191        self.endpoint_id = input;
192        self
193    }
194    /// <p>The ID of the endpoint you updated in this request.</p>
195    pub fn get_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
196        &self.endpoint_id
197    }
198    /// <p>The URL of the endpoint you updated in this request.</p>
199    pub fn endpoint_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200        self.endpoint_url = ::std::option::Option::Some(input.into());
201        self
202    }
203    /// <p>The URL of the endpoint you updated in this request.</p>
204    pub fn set_endpoint_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205        self.endpoint_url = input;
206        self
207    }
208    /// <p>The URL of the endpoint you updated in this request.</p>
209    pub fn get_endpoint_url(&self) -> &::std::option::Option<::std::string::String> {
210        &self.endpoint_url
211    }
212    /// <p>The state of the endpoint you updated in this request.</p>
213    pub fn state(mut self, input: crate::types::EndpointState) -> Self {
214        self.state = ::std::option::Option::Some(input);
215        self
216    }
217    /// <p>The state of the endpoint you updated in this request.</p>
218    pub fn set_state(mut self, input: ::std::option::Option<crate::types::EndpointState>) -> Self {
219        self.state = input;
220        self
221    }
222    /// <p>The state of the endpoint you updated in this request.</p>
223    pub fn get_state(&self) -> &::std::option::Option<crate::types::EndpointState> {
224        &self.state
225    }
226    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
227        self._request_id = Some(request_id.into());
228        self
229    }
230
231    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
232        self._request_id = request_id;
233        self
234    }
235    /// Consumes the builder and constructs a [`UpdateEndpointOutput`](crate::operation::update_endpoint::UpdateEndpointOutput).
236    pub fn build(self) -> crate::operation::update_endpoint::UpdateEndpointOutput {
237        crate::operation::update_endpoint::UpdateEndpointOutput {
238            name: self.name,
239            arn: self.arn,
240            routing_config: self.routing_config,
241            replication_config: self.replication_config,
242            event_buses: self.event_buses,
243            role_arn: self.role_arn,
244            endpoint_id: self.endpoint_id,
245            endpoint_url: self.endpoint_url,
246            state: self.state,
247            _request_id: self._request_id,
248        }
249    }
250}