Skip to main content

aws_sdk_securityagent/operation/get_integration/
_get_integration_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetIntegrationOutput {
6    /// <p>The unique identifier of the integration.</p>
7    pub integration_id: ::std::string::String,
8    /// <p>The installation identifier from the integration provider.</p>
9    pub installation_id: ::std::string::String,
10    /// <p>The integration provider.</p>
11    pub provider: crate::types::Provider,
12    /// <p>The type of the integration provider.</p>
13    pub provider_type: crate::types::ProviderType,
14    /// <p>The display name of the integration.</p>
15    pub display_name: ::std::option::Option<::std::string::String>,
16    /// <p>The identifier of the AWS KMS key used to encrypt data associated with the integration.</p>
17    pub kms_key_id: ::std::option::Option<::std::string::String>,
18    /// <p>The HTTPS URL of the customer self-hosted instance, such as a GitHub Enterprise Server or self-managed GitLab instance. This value is absent for SaaS integrations.</p>
19    pub target_url: ::std::option::Option<::std::string::String>,
20    /// <p>The name of the private connection used to reach the integration's self-hosted instance over private networking, if one is configured.</p>
21    pub private_connection_name: ::std::option::Option<::std::string::String>,
22    _request_id: Option<String>,
23}
24impl GetIntegrationOutput {
25    /// <p>The unique identifier of the integration.</p>
26    pub fn integration_id(&self) -> &str {
27        use std::ops::Deref;
28        self.integration_id.deref()
29    }
30    /// <p>The installation identifier from the integration provider.</p>
31    pub fn installation_id(&self) -> &str {
32        use std::ops::Deref;
33        self.installation_id.deref()
34    }
35    /// <p>The integration provider.</p>
36    pub fn provider(&self) -> &crate::types::Provider {
37        &self.provider
38    }
39    /// <p>The type of the integration provider.</p>
40    pub fn provider_type(&self) -> &crate::types::ProviderType {
41        &self.provider_type
42    }
43    /// <p>The display name of the integration.</p>
44    pub fn display_name(&self) -> ::std::option::Option<&str> {
45        self.display_name.as_deref()
46    }
47    /// <p>The identifier of the AWS KMS key used to encrypt data associated with the integration.</p>
48    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
49        self.kms_key_id.as_deref()
50    }
51    /// <p>The HTTPS URL of the customer self-hosted instance, such as a GitHub Enterprise Server or self-managed GitLab instance. This value is absent for SaaS integrations.</p>
52    pub fn target_url(&self) -> ::std::option::Option<&str> {
53        self.target_url.as_deref()
54    }
55    /// <p>The name of the private connection used to reach the integration's self-hosted instance over private networking, if one is configured.</p>
56    pub fn private_connection_name(&self) -> ::std::option::Option<&str> {
57        self.private_connection_name.as_deref()
58    }
59}
60impl ::aws_types::request_id::RequestId for GetIntegrationOutput {
61    fn request_id(&self) -> Option<&str> {
62        self._request_id.as_deref()
63    }
64}
65impl GetIntegrationOutput {
66    /// Creates a new builder-style object to manufacture [`GetIntegrationOutput`](crate::operation::get_integration::GetIntegrationOutput).
67    pub fn builder() -> crate::operation::get_integration::builders::GetIntegrationOutputBuilder {
68        crate::operation::get_integration::builders::GetIntegrationOutputBuilder::default()
69    }
70}
71
72/// A builder for [`GetIntegrationOutput`](crate::operation::get_integration::GetIntegrationOutput).
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
74#[non_exhaustive]
75pub struct GetIntegrationOutputBuilder {
76    pub(crate) integration_id: ::std::option::Option<::std::string::String>,
77    pub(crate) installation_id: ::std::option::Option<::std::string::String>,
78    pub(crate) provider: ::std::option::Option<crate::types::Provider>,
79    pub(crate) provider_type: ::std::option::Option<crate::types::ProviderType>,
80    pub(crate) display_name: ::std::option::Option<::std::string::String>,
81    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
82    pub(crate) target_url: ::std::option::Option<::std::string::String>,
83    pub(crate) private_connection_name: ::std::option::Option<::std::string::String>,
84    _request_id: Option<String>,
85}
86impl GetIntegrationOutputBuilder {
87    /// <p>The unique identifier of the integration.</p>
88    /// This field is required.
89    pub fn integration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.integration_id = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The unique identifier of the integration.</p>
94    pub fn set_integration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.integration_id = input;
96        self
97    }
98    /// <p>The unique identifier of the integration.</p>
99    pub fn get_integration_id(&self) -> &::std::option::Option<::std::string::String> {
100        &self.integration_id
101    }
102    /// <p>The installation identifier from the integration provider.</p>
103    /// This field is required.
104    pub fn installation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105        self.installation_id = ::std::option::Option::Some(input.into());
106        self
107    }
108    /// <p>The installation identifier from the integration provider.</p>
109    pub fn set_installation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110        self.installation_id = input;
111        self
112    }
113    /// <p>The installation identifier from the integration provider.</p>
114    pub fn get_installation_id(&self) -> &::std::option::Option<::std::string::String> {
115        &self.installation_id
116    }
117    /// <p>The integration provider.</p>
118    /// This field is required.
119    pub fn provider(mut self, input: crate::types::Provider) -> Self {
120        self.provider = ::std::option::Option::Some(input);
121        self
122    }
123    /// <p>The integration provider.</p>
124    pub fn set_provider(mut self, input: ::std::option::Option<crate::types::Provider>) -> Self {
125        self.provider = input;
126        self
127    }
128    /// <p>The integration provider.</p>
129    pub fn get_provider(&self) -> &::std::option::Option<crate::types::Provider> {
130        &self.provider
131    }
132    /// <p>The type of the integration provider.</p>
133    /// This field is required.
134    pub fn provider_type(mut self, input: crate::types::ProviderType) -> Self {
135        self.provider_type = ::std::option::Option::Some(input);
136        self
137    }
138    /// <p>The type of the integration provider.</p>
139    pub fn set_provider_type(mut self, input: ::std::option::Option<crate::types::ProviderType>) -> Self {
140        self.provider_type = input;
141        self
142    }
143    /// <p>The type of the integration provider.</p>
144    pub fn get_provider_type(&self) -> &::std::option::Option<crate::types::ProviderType> {
145        &self.provider_type
146    }
147    /// <p>The display name of the integration.</p>
148    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149        self.display_name = ::std::option::Option::Some(input.into());
150        self
151    }
152    /// <p>The display name of the integration.</p>
153    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154        self.display_name = input;
155        self
156    }
157    /// <p>The display name of the integration.</p>
158    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
159        &self.display_name
160    }
161    /// <p>The identifier of the AWS KMS key used to encrypt data associated with the integration.</p>
162    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.kms_key_id = ::std::option::Option::Some(input.into());
164        self
165    }
166    /// <p>The identifier of the AWS KMS key used to encrypt data associated with the integration.</p>
167    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168        self.kms_key_id = input;
169        self
170    }
171    /// <p>The identifier of the AWS KMS key used to encrypt data associated with the integration.</p>
172    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
173        &self.kms_key_id
174    }
175    /// <p>The HTTPS URL of the customer self-hosted instance, such as a GitHub Enterprise Server or self-managed GitLab instance. This value is absent for SaaS integrations.</p>
176    pub fn target_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.target_url = ::std::option::Option::Some(input.into());
178        self
179    }
180    /// <p>The HTTPS URL of the customer self-hosted instance, such as a GitHub Enterprise Server or self-managed GitLab instance. This value is absent for SaaS integrations.</p>
181    pub fn set_target_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182        self.target_url = input;
183        self
184    }
185    /// <p>The HTTPS URL of the customer self-hosted instance, such as a GitHub Enterprise Server or self-managed GitLab instance. This value is absent for SaaS integrations.</p>
186    pub fn get_target_url(&self) -> &::std::option::Option<::std::string::String> {
187        &self.target_url
188    }
189    /// <p>The name of the private connection used to reach the integration's self-hosted instance over private networking, if one is configured.</p>
190    pub fn private_connection_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191        self.private_connection_name = ::std::option::Option::Some(input.into());
192        self
193    }
194    /// <p>The name of the private connection used to reach the integration's self-hosted instance over private networking, if one is configured.</p>
195    pub fn set_private_connection_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196        self.private_connection_name = input;
197        self
198    }
199    /// <p>The name of the private connection used to reach the integration's self-hosted instance over private networking, if one is configured.</p>
200    pub fn get_private_connection_name(&self) -> &::std::option::Option<::std::string::String> {
201        &self.private_connection_name
202    }
203    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
204        self._request_id = Some(request_id.into());
205        self
206    }
207
208    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
209        self._request_id = request_id;
210        self
211    }
212    /// Consumes the builder and constructs a [`GetIntegrationOutput`](crate::operation::get_integration::GetIntegrationOutput).
213    /// This method will fail if any of the following fields are not set:
214    /// - [`integration_id`](crate::operation::get_integration::builders::GetIntegrationOutputBuilder::integration_id)
215    /// - [`installation_id`](crate::operation::get_integration::builders::GetIntegrationOutputBuilder::installation_id)
216    /// - [`provider`](crate::operation::get_integration::builders::GetIntegrationOutputBuilder::provider)
217    /// - [`provider_type`](crate::operation::get_integration::builders::GetIntegrationOutputBuilder::provider_type)
218    pub fn build(
219        self,
220    ) -> ::std::result::Result<crate::operation::get_integration::GetIntegrationOutput, ::aws_smithy_types::error::operation::BuildError> {
221        ::std::result::Result::Ok(crate::operation::get_integration::GetIntegrationOutput {
222            integration_id: self.integration_id.ok_or_else(|| {
223                ::aws_smithy_types::error::operation::BuildError::missing_field(
224                    "integration_id",
225                    "integration_id was not specified but it is required when building GetIntegrationOutput",
226                )
227            })?,
228            installation_id: self.installation_id.ok_or_else(|| {
229                ::aws_smithy_types::error::operation::BuildError::missing_field(
230                    "installation_id",
231                    "installation_id was not specified but it is required when building GetIntegrationOutput",
232                )
233            })?,
234            provider: self.provider.ok_or_else(|| {
235                ::aws_smithy_types::error::operation::BuildError::missing_field(
236                    "provider",
237                    "provider was not specified but it is required when building GetIntegrationOutput",
238                )
239            })?,
240            provider_type: self.provider_type.ok_or_else(|| {
241                ::aws_smithy_types::error::operation::BuildError::missing_field(
242                    "provider_type",
243                    "provider_type was not specified but it is required when building GetIntegrationOutput",
244                )
245            })?,
246            display_name: self.display_name,
247            kms_key_id: self.kms_key_id,
248            target_url: self.target_url,
249            private_connection_name: self.private_connection_name,
250            _request_id: self._request_id,
251        })
252    }
253}