aws_sdk_datazone/operation/delete_domain/
_delete_domain_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 DeleteDomainOutput {
6    /// <p>The status of the domain.</p>
7    pub status: crate::types::DomainStatus,
8    _request_id: Option<String>,
9}
10impl DeleteDomainOutput {
11    /// <p>The status of the domain.</p>
12    pub fn status(&self) -> &crate::types::DomainStatus {
13        &self.status
14    }
15}
16impl ::aws_types::request_id::RequestId for DeleteDomainOutput {
17    fn request_id(&self) -> Option<&str> {
18        self._request_id.as_deref()
19    }
20}
21impl DeleteDomainOutput {
22    /// Creates a new builder-style object to manufacture [`DeleteDomainOutput`](crate::operation::delete_domain::DeleteDomainOutput).
23    pub fn builder() -> crate::operation::delete_domain::builders::DeleteDomainOutputBuilder {
24        crate::operation::delete_domain::builders::DeleteDomainOutputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteDomainOutput`](crate::operation::delete_domain::DeleteDomainOutput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteDomainOutputBuilder {
32    pub(crate) status: ::std::option::Option<crate::types::DomainStatus>,
33    _request_id: Option<String>,
34}
35impl DeleteDomainOutputBuilder {
36    /// <p>The status of the domain.</p>
37    /// This field is required.
38    pub fn status(mut self, input: crate::types::DomainStatus) -> Self {
39        self.status = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>The status of the domain.</p>
43    pub fn set_status(mut self, input: ::std::option::Option<crate::types::DomainStatus>) -> Self {
44        self.status = input;
45        self
46    }
47    /// <p>The status of the domain.</p>
48    pub fn get_status(&self) -> &::std::option::Option<crate::types::DomainStatus> {
49        &self.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    /// This method will fail if any of the following fields are not set:
62    /// - [`status`](crate::operation::delete_domain::builders::DeleteDomainOutputBuilder::status)
63    pub fn build(
64        self,
65    ) -> ::std::result::Result<crate::operation::delete_domain::DeleteDomainOutput, ::aws_smithy_types::error::operation::BuildError> {
66        ::std::result::Result::Ok(crate::operation::delete_domain::DeleteDomainOutput {
67            status: self.status.ok_or_else(|| {
68                ::aws_smithy_types::error::operation::BuildError::missing_field(
69                    "status",
70                    "status was not specified but it is required when building DeleteDomainOutput",
71                )
72            })?,
73            _request_id: self._request_id,
74        })
75    }
76}