aws_sdk_opensearch/operation/delete_domain/
_delete_domain_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The results of a <code>DeleteDomain</code> request. Contains the status of the pending deletion, or a "domain not found" error if the domain and all of its resources have been deleted.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteDomainOutput {
7    /// <p>The status of the domain being deleted.</p>
8    pub domain_status: ::std::option::Option<crate::types::DomainStatus>,
9    _request_id: Option<String>,
10}
11impl DeleteDomainOutput {
12    /// <p>The status of the domain being deleted.</p>
13    pub fn domain_status(&self) -> ::std::option::Option<&crate::types::DomainStatus> {
14        self.domain_status.as_ref()
15    }
16}
17impl ::aws_types::request_id::RequestId for DeleteDomainOutput {
18    fn request_id(&self) -> Option<&str> {
19        self._request_id.as_deref()
20    }
21}
22impl DeleteDomainOutput {
23    /// Creates a new builder-style object to manufacture [`DeleteDomainOutput`](crate::operation::delete_domain::DeleteDomainOutput).
24    pub fn builder() -> crate::operation::delete_domain::builders::DeleteDomainOutputBuilder {
25        crate::operation::delete_domain::builders::DeleteDomainOutputBuilder::default()
26    }
27}
28
29/// A builder for [`DeleteDomainOutput`](crate::operation::delete_domain::DeleteDomainOutput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct DeleteDomainOutputBuilder {
33    pub(crate) domain_status: ::std::option::Option<crate::types::DomainStatus>,
34    _request_id: Option<String>,
35}
36impl DeleteDomainOutputBuilder {
37    /// <p>The status of the domain being deleted.</p>
38    pub fn domain_status(mut self, input: crate::types::DomainStatus) -> Self {
39        self.domain_status = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>The status of the domain being deleted.</p>
43    pub fn set_domain_status(mut self, input: ::std::option::Option<crate::types::DomainStatus>) -> Self {
44        self.domain_status = input;
45        self
46    }
47    /// <p>The status of the domain being deleted.</p>
48    pub fn get_domain_status(&self) -> &::std::option::Option<crate::types::DomainStatus> {
49        &self.domain_status
50    }
51    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52        self._request_id = Some(request_id.into());
53        self
54    }
55
56    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57        self._request_id = request_id;
58        self
59    }
60    /// Consumes the builder and constructs a [`DeleteDomainOutput`](crate::operation::delete_domain::DeleteDomainOutput).
61    pub fn build(self) -> crate::operation::delete_domain::DeleteDomainOutput {
62        crate::operation::delete_domain::DeleteDomainOutput {
63            domain_status: self.domain_status,
64            _request_id: self._request_id,
65        }
66    }
67}