Skip to main content

aws_sdk_devopsagent/operation/get_association/
_get_association_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Output containing the requested association details.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetAssociationOutput {
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    _request_id: Option<String>,
10}
11impl GetAssociationOutput {
12    /// Represents a service association within an AgentSpace, defining how the agent interacts with external services.
13    pub fn association(&self) -> ::std::option::Option<&crate::types::Association> {
14        self.association.as_ref()
15    }
16}
17impl ::aws_types::request_id::RequestId for GetAssociationOutput {
18    fn request_id(&self) -> Option<&str> {
19        self._request_id.as_deref()
20    }
21}
22impl GetAssociationOutput {
23    /// Creates a new builder-style object to manufacture [`GetAssociationOutput`](crate::operation::get_association::GetAssociationOutput).
24    pub fn builder() -> crate::operation::get_association::builders::GetAssociationOutputBuilder {
25        crate::operation::get_association::builders::GetAssociationOutputBuilder::default()
26    }
27}
28
29/// A builder for [`GetAssociationOutput`](crate::operation::get_association::GetAssociationOutput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct GetAssociationOutputBuilder {
33    pub(crate) association: ::std::option::Option<crate::types::Association>,
34    _request_id: Option<String>,
35}
36impl GetAssociationOutputBuilder {
37    /// Represents a service association within an AgentSpace, defining how the agent interacts with external services.
38    /// This field is required.
39    pub fn association(mut self, input: crate::types::Association) -> Self {
40        self.association = ::std::option::Option::Some(input);
41        self
42    }
43    /// Represents a service association within an AgentSpace, defining how the agent interacts with external services.
44    pub fn set_association(mut self, input: ::std::option::Option<crate::types::Association>) -> Self {
45        self.association = input;
46        self
47    }
48    /// Represents a service association within an AgentSpace, defining how the agent interacts with external services.
49    pub fn get_association(&self) -> &::std::option::Option<crate::types::Association> {
50        &self.association
51    }
52    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
53        self._request_id = Some(request_id.into());
54        self
55    }
56
57    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
58        self._request_id = request_id;
59        self
60    }
61    /// Consumes the builder and constructs a [`GetAssociationOutput`](crate::operation::get_association::GetAssociationOutput).
62    pub fn build(self) -> crate::operation::get_association::GetAssociationOutput {
63        crate::operation::get_association::GetAssociationOutput {
64            association: self.association,
65            _request_id: self._request_id,
66        }
67    }
68}