aws_sdk_opensearch/operation/upgrade_domain/
_upgrade_domain_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Container for the response returned by <code>UpgradeDomain</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpgradeDomainOutput {
7    /// <p>The unique identifier of the domain upgrade.</p>
8    pub upgrade_id: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the domain that was upgraded.</p>
10    pub domain_name: ::std::option::Option<::std::string::String>,
11    /// <p>OpenSearch or Elasticsearch version that the domain was upgraded to.</p>
12    pub target_version: ::std::option::Option<::std::string::String>,
13    /// <p>When true, indicates that an upgrade eligibility check was performed.</p>
14    pub perform_check_only: ::std::option::Option<bool>,
15    /// <p>The advanced options configuration for the domain.</p>
16    pub advanced_options: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
17    /// <p>Container for information about a configuration change happening on a domain.</p>
18    pub change_progress_details: ::std::option::Option<crate::types::ChangeProgressDetails>,
19    _request_id: Option<String>,
20}
21impl UpgradeDomainOutput {
22    /// <p>The unique identifier of the domain upgrade.</p>
23    pub fn upgrade_id(&self) -> ::std::option::Option<&str> {
24        self.upgrade_id.as_deref()
25    }
26    /// <p>The name of the domain that was upgraded.</p>
27    pub fn domain_name(&self) -> ::std::option::Option<&str> {
28        self.domain_name.as_deref()
29    }
30    /// <p>OpenSearch or Elasticsearch version that the domain was upgraded to.</p>
31    pub fn target_version(&self) -> ::std::option::Option<&str> {
32        self.target_version.as_deref()
33    }
34    /// <p>When true, indicates that an upgrade eligibility check was performed.</p>
35    pub fn perform_check_only(&self) -> ::std::option::Option<bool> {
36        self.perform_check_only
37    }
38    /// <p>The advanced options configuration for the domain.</p>
39    pub fn advanced_options(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
40        self.advanced_options.as_ref()
41    }
42    /// <p>Container for information about a configuration change happening on a domain.</p>
43    pub fn change_progress_details(&self) -> ::std::option::Option<&crate::types::ChangeProgressDetails> {
44        self.change_progress_details.as_ref()
45    }
46}
47impl ::aws_types::request_id::RequestId for UpgradeDomainOutput {
48    fn request_id(&self) -> Option<&str> {
49        self._request_id.as_deref()
50    }
51}
52impl UpgradeDomainOutput {
53    /// Creates a new builder-style object to manufacture [`UpgradeDomainOutput`](crate::operation::upgrade_domain::UpgradeDomainOutput).
54    pub fn builder() -> crate::operation::upgrade_domain::builders::UpgradeDomainOutputBuilder {
55        crate::operation::upgrade_domain::builders::UpgradeDomainOutputBuilder::default()
56    }
57}
58
59/// A builder for [`UpgradeDomainOutput`](crate::operation::upgrade_domain::UpgradeDomainOutput).
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
61#[non_exhaustive]
62pub struct UpgradeDomainOutputBuilder {
63    pub(crate) upgrade_id: ::std::option::Option<::std::string::String>,
64    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
65    pub(crate) target_version: ::std::option::Option<::std::string::String>,
66    pub(crate) perform_check_only: ::std::option::Option<bool>,
67    pub(crate) advanced_options: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
68    pub(crate) change_progress_details: ::std::option::Option<crate::types::ChangeProgressDetails>,
69    _request_id: Option<String>,
70}
71impl UpgradeDomainOutputBuilder {
72    /// <p>The unique identifier of the domain upgrade.</p>
73    pub fn upgrade_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.upgrade_id = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The unique identifier of the domain upgrade.</p>
78    pub fn set_upgrade_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.upgrade_id = input;
80        self
81    }
82    /// <p>The unique identifier of the domain upgrade.</p>
83    pub fn get_upgrade_id(&self) -> &::std::option::Option<::std::string::String> {
84        &self.upgrade_id
85    }
86    /// <p>The name of the domain that was upgraded.</p>
87    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.domain_name = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The name of the domain that was upgraded.</p>
92    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.domain_name = input;
94        self
95    }
96    /// <p>The name of the domain that was upgraded.</p>
97    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
98        &self.domain_name
99    }
100    /// <p>OpenSearch or Elasticsearch version that the domain was upgraded to.</p>
101    pub fn target_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.target_version = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>OpenSearch or Elasticsearch version that the domain was upgraded to.</p>
106    pub fn set_target_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.target_version = input;
108        self
109    }
110    /// <p>OpenSearch or Elasticsearch version that the domain was upgraded to.</p>
111    pub fn get_target_version(&self) -> &::std::option::Option<::std::string::String> {
112        &self.target_version
113    }
114    /// <p>When true, indicates that an upgrade eligibility check was performed.</p>
115    pub fn perform_check_only(mut self, input: bool) -> Self {
116        self.perform_check_only = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>When true, indicates that an upgrade eligibility check was performed.</p>
120    pub fn set_perform_check_only(mut self, input: ::std::option::Option<bool>) -> Self {
121        self.perform_check_only = input;
122        self
123    }
124    /// <p>When true, indicates that an upgrade eligibility check was performed.</p>
125    pub fn get_perform_check_only(&self) -> &::std::option::Option<bool> {
126        &self.perform_check_only
127    }
128    /// Adds a key-value pair to `advanced_options`.
129    ///
130    /// To override the contents of this collection use [`set_advanced_options`](Self::set_advanced_options).
131    ///
132    /// <p>The advanced options configuration for the domain.</p>
133    pub fn advanced_options(
134        mut self,
135        k: impl ::std::convert::Into<::std::string::String>,
136        v: impl ::std::convert::Into<::std::string::String>,
137    ) -> Self {
138        let mut hash_map = self.advanced_options.unwrap_or_default();
139        hash_map.insert(k.into(), v.into());
140        self.advanced_options = ::std::option::Option::Some(hash_map);
141        self
142    }
143    /// <p>The advanced options configuration for the domain.</p>
144    pub fn set_advanced_options(
145        mut self,
146        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
147    ) -> Self {
148        self.advanced_options = input;
149        self
150    }
151    /// <p>The advanced options configuration for the domain.</p>
152    pub fn get_advanced_options(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
153        &self.advanced_options
154    }
155    /// <p>Container for information about a configuration change happening on a domain.</p>
156    pub fn change_progress_details(mut self, input: crate::types::ChangeProgressDetails) -> Self {
157        self.change_progress_details = ::std::option::Option::Some(input);
158        self
159    }
160    /// <p>Container for information about a configuration change happening on a domain.</p>
161    pub fn set_change_progress_details(mut self, input: ::std::option::Option<crate::types::ChangeProgressDetails>) -> Self {
162        self.change_progress_details = input;
163        self
164    }
165    /// <p>Container for information about a configuration change happening on a domain.</p>
166    pub fn get_change_progress_details(&self) -> &::std::option::Option<crate::types::ChangeProgressDetails> {
167        &self.change_progress_details
168    }
169    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
170        self._request_id = Some(request_id.into());
171        self
172    }
173
174    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
175        self._request_id = request_id;
176        self
177    }
178    /// Consumes the builder and constructs a [`UpgradeDomainOutput`](crate::operation::upgrade_domain::UpgradeDomainOutput).
179    pub fn build(self) -> crate::operation::upgrade_domain::UpgradeDomainOutput {
180        crate::operation::upgrade_domain::UpgradeDomainOutput {
181            upgrade_id: self.upgrade_id,
182            domain_name: self.domain_name,
183            target_version: self.target_version,
184            perform_check_only: self.perform_check_only,
185            advanced_options: self.advanced_options,
186            change_progress_details: self.change_progress_details,
187            _request_id: self._request_id,
188        }
189    }
190}