Skip to main content

aws_sdk_devopsagent/operation/associate_service/
_associate_service_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Output containing the newly created association and optional webhook configuration.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AssociateServiceOutput {
7    /// Represents a service association within an AgentSpace, defining how the agent interacts with external services.
8    pub association: ::std::option::Option<crate::types::Association>,
9    /// Generic webhook configuration
10    pub webhook: ::std::option::Option<crate::types::GenericWebhook>,
11    _request_id: Option<String>,
12}
13impl AssociateServiceOutput {
14    /// Represents a service association within an AgentSpace, defining how the agent interacts with external services.
15    pub fn association(&self) -> ::std::option::Option<&crate::types::Association> {
16        self.association.as_ref()
17    }
18    /// Generic webhook configuration
19    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    /// Creates a new builder-style object to manufacture [`AssociateServiceOutput`](crate::operation::associate_service::AssociateServiceOutput).
30    pub fn builder() -> crate::operation::associate_service::builders::AssociateServiceOutputBuilder {
31        crate::operation::associate_service::builders::AssociateServiceOutputBuilder::default()
32    }
33}
34
35/// A builder for [`AssociateServiceOutput`](crate::operation::associate_service::AssociateServiceOutput).
36#[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    /// Represents a service association within an AgentSpace, defining how the agent interacts with external services.
45    /// This field is required.
46    pub fn association(mut self, input: crate::types::Association) -> Self {
47        self.association = ::std::option::Option::Some(input);
48        self
49    }
50    /// Represents a service association within an AgentSpace, defining how the agent interacts with external services.
51    pub fn set_association(mut self, input: ::std::option::Option<crate::types::Association>) -> Self {
52        self.association = input;
53        self
54    }
55    /// Represents a service association within an AgentSpace, defining how the agent interacts with external services.
56    pub fn get_association(&self) -> &::std::option::Option<crate::types::Association> {
57        &self.association
58    }
59    /// Generic webhook configuration
60    pub fn webhook(mut self, input: crate::types::GenericWebhook) -> Self {
61        self.webhook = ::std::option::Option::Some(input);
62        self
63    }
64    /// Generic webhook configuration
65    pub fn set_webhook(mut self, input: ::std::option::Option<crate::types::GenericWebhook>) -> Self {
66        self.webhook = input;
67        self
68    }
69    /// Generic webhook configuration
70    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    /// Consumes the builder and constructs a [`AssociateServiceOutput`](crate::operation::associate_service::AssociateServiceOutput).
83    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}