aws_sdk_devopsagent/operation/associate_service/
_associate_service_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AssociateServiceOutput {
7 pub association: ::std::option::Option<crate::types::Association>,
9 pub webhook: ::std::option::Option<crate::types::GenericWebhook>,
11 _request_id: Option<String>,
12}
13impl AssociateServiceOutput {
14 pub fn association(&self) -> ::std::option::Option<&crate::types::Association> {
16 self.association.as_ref()
17 }
18 pub fn webhook(&self) -> ::std::option::Option<&crate::types::GenericWebhook> {
20 self.webhook.as_ref()
21 }
22}
23impl ::aws_types::request_id::RequestId for AssociateServiceOutput {
24 fn request_id(&self) -> Option<&str> {
25 self._request_id.as_deref()
26 }
27}
28impl AssociateServiceOutput {
29 pub fn builder() -> crate::operation::associate_service::builders::AssociateServiceOutputBuilder {
31 crate::operation::associate_service::builders::AssociateServiceOutputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct AssociateServiceOutputBuilder {
39 pub(crate) association: ::std::option::Option<crate::types::Association>,
40 pub(crate) webhook: ::std::option::Option<crate::types::GenericWebhook>,
41 _request_id: Option<String>,
42}
43impl AssociateServiceOutputBuilder {
44 pub fn association(mut self, input: crate::types::Association) -> Self {
47 self.association = ::std::option::Option::Some(input);
48 self
49 }
50 pub fn set_association(mut self, input: ::std::option::Option<crate::types::Association>) -> Self {
52 self.association = input;
53 self
54 }
55 pub fn get_association(&self) -> &::std::option::Option<crate::types::Association> {
57 &self.association
58 }
59 pub fn webhook(mut self, input: crate::types::GenericWebhook) -> Self {
61 self.webhook = ::std::option::Option::Some(input);
62 self
63 }
64 pub fn set_webhook(mut self, input: ::std::option::Option<crate::types::GenericWebhook>) -> Self {
66 self.webhook = input;
67 self
68 }
69 pub fn get_webhook(&self) -> &::std::option::Option<crate::types::GenericWebhook> {
71 &self.webhook
72 }
73 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
74 self._request_id = Some(request_id.into());
75 self
76 }
77
78 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
79 self._request_id = request_id;
80 self
81 }
82 pub fn build(self) -> crate::operation::associate_service::AssociateServiceOutput {
84 crate::operation::associate_service::AssociateServiceOutput {
85 association: self.association,
86 webhook: self.webhook,
87 _request_id: self._request_id,
88 }
89 }
90}