Skip to main content

aws_sdk_continuum/operation/get_integration/
_get_integration_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Contains metadata for the requested integration.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetIntegrationOutput {
7    /// The unique identifier of the integration.
8    pub integration_id: ::std::string::String,
9    /// The ARN of the integration.
10    pub integration_arn: ::std::string::String,
11    /// The name of the integration.
12    pub name: ::std::string::String,
13    /// The immutable provider type for the integration.
14    pub integration_type: crate::types::IntegrationType,
15    /// Provider-specific details for the integration.
16    pub provider_details: ::std::option::Option<crate::types::ProviderDetails>,
17    /// The timestamp when the integration was created.
18    pub created_at: ::aws_smithy_types::DateTime,
19    /// The timestamp when the integration was last updated.
20    pub updated_at: ::aws_smithy_types::DateTime,
21    _request_id: Option<String>,
22}
23impl GetIntegrationOutput {
24    /// The unique identifier of the integration.
25    pub fn integration_id(&self) -> &str {
26        use std::ops::Deref;
27        self.integration_id.deref()
28    }
29    /// The ARN of the integration.
30    pub fn integration_arn(&self) -> &str {
31        use std::ops::Deref;
32        self.integration_arn.deref()
33    }
34    /// The name of the integration.
35    pub fn name(&self) -> &str {
36        use std::ops::Deref;
37        self.name.deref()
38    }
39    /// The immutable provider type for the integration.
40    pub fn integration_type(&self) -> &crate::types::IntegrationType {
41        &self.integration_type
42    }
43    /// Provider-specific details for the integration.
44    pub fn provider_details(&self) -> ::std::option::Option<&crate::types::ProviderDetails> {
45        self.provider_details.as_ref()
46    }
47    /// The timestamp when the integration was created.
48    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
49        &self.created_at
50    }
51    /// The timestamp when the integration was last updated.
52    pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
53        &self.updated_at
54    }
55}
56impl ::aws_types::request_id::RequestId for GetIntegrationOutput {
57    fn request_id(&self) -> Option<&str> {
58        self._request_id.as_deref()
59    }
60}
61impl GetIntegrationOutput {
62    /// Creates a new builder-style object to manufacture [`GetIntegrationOutput`](crate::operation::get_integration::GetIntegrationOutput).
63    pub fn builder() -> crate::operation::get_integration::builders::GetIntegrationOutputBuilder {
64        crate::operation::get_integration::builders::GetIntegrationOutputBuilder::default()
65    }
66}
67
68/// A builder for [`GetIntegrationOutput`](crate::operation::get_integration::GetIntegrationOutput).
69#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
70#[non_exhaustive]
71pub struct GetIntegrationOutputBuilder {
72    pub(crate) integration_id: ::std::option::Option<::std::string::String>,
73    pub(crate) integration_arn: ::std::option::Option<::std::string::String>,
74    pub(crate) name: ::std::option::Option<::std::string::String>,
75    pub(crate) integration_type: ::std::option::Option<crate::types::IntegrationType>,
76    pub(crate) provider_details: ::std::option::Option<crate::types::ProviderDetails>,
77    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
78    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
79    _request_id: Option<String>,
80}
81impl GetIntegrationOutputBuilder {
82    /// The unique identifier of the integration.
83    /// This field is required.
84    pub fn integration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.integration_id = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// The unique identifier of the integration.
89    pub fn set_integration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.integration_id = input;
91        self
92    }
93    /// The unique identifier of the integration.
94    pub fn get_integration_id(&self) -> &::std::option::Option<::std::string::String> {
95        &self.integration_id
96    }
97    /// The ARN of the integration.
98    /// This field is required.
99    pub fn integration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100        self.integration_arn = ::std::option::Option::Some(input.into());
101        self
102    }
103    /// The ARN of the integration.
104    pub fn set_integration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.integration_arn = input;
106        self
107    }
108    /// The ARN of the integration.
109    pub fn get_integration_arn(&self) -> &::std::option::Option<::std::string::String> {
110        &self.integration_arn
111    }
112    /// The name of the integration.
113    /// This field is required.
114    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.name = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// The name of the integration.
119    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.name = input;
121        self
122    }
123    /// The name of the integration.
124    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
125        &self.name
126    }
127    /// The immutable provider type for the integration.
128    /// This field is required.
129    pub fn integration_type(mut self, input: crate::types::IntegrationType) -> Self {
130        self.integration_type = ::std::option::Option::Some(input);
131        self
132    }
133    /// The immutable provider type for the integration.
134    pub fn set_integration_type(mut self, input: ::std::option::Option<crate::types::IntegrationType>) -> Self {
135        self.integration_type = input;
136        self
137    }
138    /// The immutable provider type for the integration.
139    pub fn get_integration_type(&self) -> &::std::option::Option<crate::types::IntegrationType> {
140        &self.integration_type
141    }
142    /// Provider-specific details for the integration.
143    /// This field is required.
144    pub fn provider_details(mut self, input: crate::types::ProviderDetails) -> Self {
145        self.provider_details = ::std::option::Option::Some(input);
146        self
147    }
148    /// Provider-specific details for the integration.
149    pub fn set_provider_details(mut self, input: ::std::option::Option<crate::types::ProviderDetails>) -> Self {
150        self.provider_details = input;
151        self
152    }
153    /// Provider-specific details for the integration.
154    pub fn get_provider_details(&self) -> &::std::option::Option<crate::types::ProviderDetails> {
155        &self.provider_details
156    }
157    /// The timestamp when the integration was created.
158    /// This field is required.
159    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
160        self.created_at = ::std::option::Option::Some(input);
161        self
162    }
163    /// The timestamp when the integration was created.
164    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
165        self.created_at = input;
166        self
167    }
168    /// The timestamp when the integration was created.
169    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
170        &self.created_at
171    }
172    /// The timestamp when the integration was last updated.
173    /// This field is required.
174    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
175        self.updated_at = ::std::option::Option::Some(input);
176        self
177    }
178    /// The timestamp when the integration was last updated.
179    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
180        self.updated_at = input;
181        self
182    }
183    /// The timestamp when the integration was last updated.
184    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
185        &self.updated_at
186    }
187    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
188        self._request_id = Some(request_id.into());
189        self
190    }
191
192    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
193        self._request_id = request_id;
194        self
195    }
196    /// Consumes the builder and constructs a [`GetIntegrationOutput`](crate::operation::get_integration::GetIntegrationOutput).
197    /// This method will fail if any of the following fields are not set:
198    /// - [`integration_id`](crate::operation::get_integration::builders::GetIntegrationOutputBuilder::integration_id)
199    /// - [`integration_arn`](crate::operation::get_integration::builders::GetIntegrationOutputBuilder::integration_arn)
200    /// - [`name`](crate::operation::get_integration::builders::GetIntegrationOutputBuilder::name)
201    /// - [`integration_type`](crate::operation::get_integration::builders::GetIntegrationOutputBuilder::integration_type)
202    /// - [`created_at`](crate::operation::get_integration::builders::GetIntegrationOutputBuilder::created_at)
203    /// - [`updated_at`](crate::operation::get_integration::builders::GetIntegrationOutputBuilder::updated_at)
204    pub fn build(
205        self,
206    ) -> ::std::result::Result<crate::operation::get_integration::GetIntegrationOutput, ::aws_smithy_types::error::operation::BuildError> {
207        ::std::result::Result::Ok(crate::operation::get_integration::GetIntegrationOutput {
208            integration_id: self.integration_id.ok_or_else(|| {
209                ::aws_smithy_types::error::operation::BuildError::missing_field(
210                    "integration_id",
211                    "integration_id was not specified but it is required when building GetIntegrationOutput",
212                )
213            })?,
214            integration_arn: self.integration_arn.ok_or_else(|| {
215                ::aws_smithy_types::error::operation::BuildError::missing_field(
216                    "integration_arn",
217                    "integration_arn was not specified but it is required when building GetIntegrationOutput",
218                )
219            })?,
220            name: self.name.ok_or_else(|| {
221                ::aws_smithy_types::error::operation::BuildError::missing_field(
222                    "name",
223                    "name was not specified but it is required when building GetIntegrationOutput",
224                )
225            })?,
226            integration_type: self.integration_type.ok_or_else(|| {
227                ::aws_smithy_types::error::operation::BuildError::missing_field(
228                    "integration_type",
229                    "integration_type was not specified but it is required when building GetIntegrationOutput",
230                )
231            })?,
232            provider_details: self.provider_details,
233            created_at: self.created_at.ok_or_else(|| {
234                ::aws_smithy_types::error::operation::BuildError::missing_field(
235                    "created_at",
236                    "created_at was not specified but it is required when building GetIntegrationOutput",
237                )
238            })?,
239            updated_at: self.updated_at.ok_or_else(|| {
240                ::aws_smithy_types::error::operation::BuildError::missing_field(
241                    "updated_at",
242                    "updated_at was not specified but it is required when building GetIntegrationOutput",
243                )
244            })?,
245            _request_id: self._request_id,
246        })
247    }
248}