aws_sdk_cloudwatchlogs/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 name of the integration.</p>
7    pub integration_name: ::std::option::Option<::std::string::String>,
8    /// <p>The type of integration. Integrations with OpenSearch Service have the type <code>OPENSEARCH</code>.</p>
9    pub integration_type: ::std::option::Option<crate::types::IntegrationType>,
10    /// <p>The current status of this integration.</p>
11    pub integration_status: ::std::option::Option<crate::types::IntegrationStatus>,
12    /// <p>A structure that contains information about the integration configuration. For an integration with OpenSearch Service, this includes information about OpenSearch Service resources such as the collection, the workspace, and policies.</p>
13    pub integration_details: ::std::option::Option<crate::types::IntegrationDetails>,
14    _request_id: Option<String>,
15}
16impl GetIntegrationOutput {
17    /// <p>The name of the integration.</p>
18    pub fn integration_name(&self) -> ::std::option::Option<&str> {
19        self.integration_name.as_deref()
20    }
21    /// <p>The type of integration. Integrations with OpenSearch Service have the type <code>OPENSEARCH</code>.</p>
22    pub fn integration_type(&self) -> ::std::option::Option<&crate::types::IntegrationType> {
23        self.integration_type.as_ref()
24    }
25    /// <p>The current status of this integration.</p>
26    pub fn integration_status(&self) -> ::std::option::Option<&crate::types::IntegrationStatus> {
27        self.integration_status.as_ref()
28    }
29    /// <p>A structure that contains information about the integration configuration. For an integration with OpenSearch Service, this includes information about OpenSearch Service resources such as the collection, the workspace, and policies.</p>
30    pub fn integration_details(&self) -> ::std::option::Option<&crate::types::IntegrationDetails> {
31        self.integration_details.as_ref()
32    }
33}
34impl ::aws_types::request_id::RequestId for GetIntegrationOutput {
35    fn request_id(&self) -> Option<&str> {
36        self._request_id.as_deref()
37    }
38}
39impl GetIntegrationOutput {
40    /// Creates a new builder-style object to manufacture [`GetIntegrationOutput`](crate::operation::get_integration::GetIntegrationOutput).
41    pub fn builder() -> crate::operation::get_integration::builders::GetIntegrationOutputBuilder {
42        crate::operation::get_integration::builders::GetIntegrationOutputBuilder::default()
43    }
44}
45
46/// A builder for [`GetIntegrationOutput`](crate::operation::get_integration::GetIntegrationOutput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct GetIntegrationOutputBuilder {
50    pub(crate) integration_name: ::std::option::Option<::std::string::String>,
51    pub(crate) integration_type: ::std::option::Option<crate::types::IntegrationType>,
52    pub(crate) integration_status: ::std::option::Option<crate::types::IntegrationStatus>,
53    pub(crate) integration_details: ::std::option::Option<crate::types::IntegrationDetails>,
54    _request_id: Option<String>,
55}
56impl GetIntegrationOutputBuilder {
57    /// <p>The name of the integration.</p>
58    pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.integration_name = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The name of the integration.</p>
63    pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.integration_name = input;
65        self
66    }
67    /// <p>The name of the integration.</p>
68    pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> {
69        &self.integration_name
70    }
71    /// <p>The type of integration. Integrations with OpenSearch Service have the type <code>OPENSEARCH</code>.</p>
72    pub fn integration_type(mut self, input: crate::types::IntegrationType) -> Self {
73        self.integration_type = ::std::option::Option::Some(input);
74        self
75    }
76    /// <p>The type of integration. Integrations with OpenSearch Service have the type <code>OPENSEARCH</code>.</p>
77    pub fn set_integration_type(mut self, input: ::std::option::Option<crate::types::IntegrationType>) -> Self {
78        self.integration_type = input;
79        self
80    }
81    /// <p>The type of integration. Integrations with OpenSearch Service have the type <code>OPENSEARCH</code>.</p>
82    pub fn get_integration_type(&self) -> &::std::option::Option<crate::types::IntegrationType> {
83        &self.integration_type
84    }
85    /// <p>The current status of this integration.</p>
86    pub fn integration_status(mut self, input: crate::types::IntegrationStatus) -> Self {
87        self.integration_status = ::std::option::Option::Some(input);
88        self
89    }
90    /// <p>The current status of this integration.</p>
91    pub fn set_integration_status(mut self, input: ::std::option::Option<crate::types::IntegrationStatus>) -> Self {
92        self.integration_status = input;
93        self
94    }
95    /// <p>The current status of this integration.</p>
96    pub fn get_integration_status(&self) -> &::std::option::Option<crate::types::IntegrationStatus> {
97        &self.integration_status
98    }
99    /// <p>A structure that contains information about the integration configuration. For an integration with OpenSearch Service, this includes information about OpenSearch Service resources such as the collection, the workspace, and policies.</p>
100    pub fn integration_details(mut self, input: crate::types::IntegrationDetails) -> Self {
101        self.integration_details = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>A structure that contains information about the integration configuration. For an integration with OpenSearch Service, this includes information about OpenSearch Service resources such as the collection, the workspace, and policies.</p>
105    pub fn set_integration_details(mut self, input: ::std::option::Option<crate::types::IntegrationDetails>) -> Self {
106        self.integration_details = input;
107        self
108    }
109    /// <p>A structure that contains information about the integration configuration. For an integration with OpenSearch Service, this includes information about OpenSearch Service resources such as the collection, the workspace, and policies.</p>
110    pub fn get_integration_details(&self) -> &::std::option::Option<crate::types::IntegrationDetails> {
111        &self.integration_details
112    }
113    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
114        self._request_id = Some(request_id.into());
115        self
116    }
117
118    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
119        self._request_id = request_id;
120        self
121    }
122    /// Consumes the builder and constructs a [`GetIntegrationOutput`](crate::operation::get_integration::GetIntegrationOutput).
123    pub fn build(self) -> crate::operation::get_integration::GetIntegrationOutput {
124        crate::operation::get_integration::GetIntegrationOutput {
125            integration_name: self.integration_name,
126            integration_type: self.integration_type,
127            integration_status: self.integration_status,
128            integration_details: self.integration_details,
129            _request_id: self._request_id,
130        }
131    }
132}