aws_sdk_eventbridge/operation/describe_rule/
_describe_rule_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeRuleOutput {
6 pub name: ::std::option::Option<::std::string::String>,
8 pub arn: ::std::option::Option<::std::string::String>,
10 pub event_pattern: ::std::option::Option<::std::string::String>,
12 pub schedule_expression: ::std::option::Option<::std::string::String>,
14 pub state: ::std::option::Option<crate::types::RuleState>,
16 pub description: ::std::option::Option<::std::string::String>,
18 pub role_arn: ::std::option::Option<::std::string::String>,
20 pub managed_by: ::std::option::Option<::std::string::String>,
22 pub event_bus_name: ::std::option::Option<::std::string::String>,
24 pub created_by: ::std::option::Option<::std::string::String>,
26 _request_id: Option<String>,
27}
28impl DescribeRuleOutput {
29 pub fn name(&self) -> ::std::option::Option<&str> {
31 self.name.as_deref()
32 }
33 pub fn arn(&self) -> ::std::option::Option<&str> {
35 self.arn.as_deref()
36 }
37 pub fn event_pattern(&self) -> ::std::option::Option<&str> {
39 self.event_pattern.as_deref()
40 }
41 pub fn schedule_expression(&self) -> ::std::option::Option<&str> {
43 self.schedule_expression.as_deref()
44 }
45 pub fn state(&self) -> ::std::option::Option<&crate::types::RuleState> {
47 self.state.as_ref()
48 }
49 pub fn description(&self) -> ::std::option::Option<&str> {
51 self.description.as_deref()
52 }
53 pub fn role_arn(&self) -> ::std::option::Option<&str> {
55 self.role_arn.as_deref()
56 }
57 pub fn managed_by(&self) -> ::std::option::Option<&str> {
59 self.managed_by.as_deref()
60 }
61 pub fn event_bus_name(&self) -> ::std::option::Option<&str> {
63 self.event_bus_name.as_deref()
64 }
65 pub fn created_by(&self) -> ::std::option::Option<&str> {
67 self.created_by.as_deref()
68 }
69}
70impl ::aws_types::request_id::RequestId for DescribeRuleOutput {
71 fn request_id(&self) -> Option<&str> {
72 self._request_id.as_deref()
73 }
74}
75impl DescribeRuleOutput {
76 pub fn builder() -> crate::operation::describe_rule::builders::DescribeRuleOutputBuilder {
78 crate::operation::describe_rule::builders::DescribeRuleOutputBuilder::default()
79 }
80}
81
82#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
84#[non_exhaustive]
85pub struct DescribeRuleOutputBuilder {
86 pub(crate) name: ::std::option::Option<::std::string::String>,
87 pub(crate) arn: ::std::option::Option<::std::string::String>,
88 pub(crate) event_pattern: ::std::option::Option<::std::string::String>,
89 pub(crate) schedule_expression: ::std::option::Option<::std::string::String>,
90 pub(crate) state: ::std::option::Option<crate::types::RuleState>,
91 pub(crate) description: ::std::option::Option<::std::string::String>,
92 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
93 pub(crate) managed_by: ::std::option::Option<::std::string::String>,
94 pub(crate) event_bus_name: ::std::option::Option<::std::string::String>,
95 pub(crate) created_by: ::std::option::Option<::std::string::String>,
96 _request_id: Option<String>,
97}
98impl DescribeRuleOutputBuilder {
99 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 self.name = ::std::option::Option::Some(input.into());
102 self
103 }
104 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.name = input;
107 self
108 }
109 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
111 &self.name
112 }
113 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.arn = ::std::option::Option::Some(input.into());
116 self
117 }
118 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.arn = input;
121 self
122 }
123 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
125 &self.arn
126 }
127 pub fn event_pattern(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.event_pattern = ::std::option::Option::Some(input.into());
130 self
131 }
132 pub fn set_event_pattern(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.event_pattern = input;
135 self
136 }
137 pub fn get_event_pattern(&self) -> &::std::option::Option<::std::string::String> {
139 &self.event_pattern
140 }
141 pub fn schedule_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143 self.schedule_expression = ::std::option::Option::Some(input.into());
144 self
145 }
146 pub fn set_schedule_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148 self.schedule_expression = input;
149 self
150 }
151 pub fn get_schedule_expression(&self) -> &::std::option::Option<::std::string::String> {
153 &self.schedule_expression
154 }
155 pub fn state(mut self, input: crate::types::RuleState) -> Self {
157 self.state = ::std::option::Option::Some(input);
158 self
159 }
160 pub fn set_state(mut self, input: ::std::option::Option<crate::types::RuleState>) -> Self {
162 self.state = input;
163 self
164 }
165 pub fn get_state(&self) -> &::std::option::Option<crate::types::RuleState> {
167 &self.state
168 }
169 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171 self.description = ::std::option::Option::Some(input.into());
172 self
173 }
174 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176 self.description = input;
177 self
178 }
179 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
181 &self.description
182 }
183 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185 self.role_arn = ::std::option::Option::Some(input.into());
186 self
187 }
188 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190 self.role_arn = input;
191 self
192 }
193 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
195 &self.role_arn
196 }
197 pub fn managed_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199 self.managed_by = ::std::option::Option::Some(input.into());
200 self
201 }
202 pub fn set_managed_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204 self.managed_by = input;
205 self
206 }
207 pub fn get_managed_by(&self) -> &::std::option::Option<::std::string::String> {
209 &self.managed_by
210 }
211 pub fn event_bus_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213 self.event_bus_name = ::std::option::Option::Some(input.into());
214 self
215 }
216 pub fn set_event_bus_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218 self.event_bus_name = input;
219 self
220 }
221 pub fn get_event_bus_name(&self) -> &::std::option::Option<::std::string::String> {
223 &self.event_bus_name
224 }
225 pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227 self.created_by = ::std::option::Option::Some(input.into());
228 self
229 }
230 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232 self.created_by = input;
233 self
234 }
235 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
237 &self.created_by
238 }
239 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
240 self._request_id = Some(request_id.into());
241 self
242 }
243
244 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
245 self._request_id = request_id;
246 self
247 }
248 pub fn build(self) -> crate::operation::describe_rule::DescribeRuleOutput {
250 crate::operation::describe_rule::DescribeRuleOutput {
251 name: self.name,
252 arn: self.arn,
253 event_pattern: self.event_pattern,
254 schedule_expression: self.schedule_expression,
255 state: self.state,
256 description: self.description,
257 role_arn: self.role_arn,
258 managed_by: self.managed_by,
259 event_bus_name: self.event_bus_name,
260 created_by: self.created_by,
261 _request_id: self._request_id,
262 }
263 }
264}