aws_sdk_controltower/operation/enable_control/
_enable_control_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct EnableControlOutput {
6    pub operation_identifier: ::std::string::String,
8    pub arn: ::std::option::Option<::std::string::String>,
10    _request_id: Option<String>,
11}
12impl EnableControlOutput {
13    pub fn operation_identifier(&self) -> &str {
15        use std::ops::Deref;
16        self.operation_identifier.deref()
17    }
18    pub fn arn(&self) -> ::std::option::Option<&str> {
20        self.arn.as_deref()
21    }
22}
23impl ::aws_types::request_id::RequestId for EnableControlOutput {
24    fn request_id(&self) -> Option<&str> {
25        self._request_id.as_deref()
26    }
27}
28impl EnableControlOutput {
29    pub fn builder() -> crate::operation::enable_control::builders::EnableControlOutputBuilder {
31        crate::operation::enable_control::builders::EnableControlOutputBuilder::default()
32    }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct EnableControlOutputBuilder {
39    pub(crate) operation_identifier: ::std::option::Option<::std::string::String>,
40    pub(crate) arn: ::std::option::Option<::std::string::String>,
41    _request_id: Option<String>,
42}
43impl EnableControlOutputBuilder {
44    pub fn operation_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.operation_identifier = ::std::option::Option::Some(input.into());
48        self
49    }
50    pub fn set_operation_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.operation_identifier = input;
53        self
54    }
55    pub fn get_operation_identifier(&self) -> &::std::option::Option<::std::string::String> {
57        &self.operation_identifier
58    }
59    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.arn = ::std::option::Option::Some(input.into());
62        self
63    }
64    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.arn = input;
67        self
68    }
69    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
71        &self.arn
72    }
73    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
74        self._request_id = Some(request_id.into());
75        self
76    }
77
78    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
79        self._request_id = request_id;
80        self
81    }
82    pub fn build(
86        self,
87    ) -> ::std::result::Result<crate::operation::enable_control::EnableControlOutput, ::aws_smithy_types::error::operation::BuildError> {
88        ::std::result::Result::Ok(crate::operation::enable_control::EnableControlOutput {
89            operation_identifier: self.operation_identifier.ok_or_else(|| {
90                ::aws_smithy_types::error::operation::BuildError::missing_field(
91                    "operation_identifier",
92                    "operation_identifier was not specified but it is required when building EnableControlOutput",
93                )
94            })?,
95            arn: self.arn,
96            _request_id: self._request_id,
97        })
98    }
99}