aws_sdk_controltower/operation/disable_control/
_disable_control_input.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 DisableControlInput {
6    /// <p>The ARN of the control. Only <b>Strongly recommended</b> and <b>Elective</b> controls are permitted, with the exception of the <b>Region deny</b> control. For information on how to find the <code>controlIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
7    pub control_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the organizational unit. For information on how to find the <code>targetIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
9    pub target_identifier: ::std::option::Option<::std::string::String>,
10    /// <p>The ARN of the enabled control to be disabled, which uniquely identifies the control instance on the target organizational unit.</p>
11    pub enabled_control_identifier: ::std::option::Option<::std::string::String>,
12}
13impl DisableControlInput {
14    /// <p>The ARN of the control. Only <b>Strongly recommended</b> and <b>Elective</b> controls are permitted, with the exception of the <b>Region deny</b> control. For information on how to find the <code>controlIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
15    pub fn control_identifier(&self) -> ::std::option::Option<&str> {
16        self.control_identifier.as_deref()
17    }
18    /// <p>The ARN of the organizational unit. For information on how to find the <code>targetIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
19    pub fn target_identifier(&self) -> ::std::option::Option<&str> {
20        self.target_identifier.as_deref()
21    }
22    /// <p>The ARN of the enabled control to be disabled, which uniquely identifies the control instance on the target organizational unit.</p>
23    pub fn enabled_control_identifier(&self) -> ::std::option::Option<&str> {
24        self.enabled_control_identifier.as_deref()
25    }
26}
27impl DisableControlInput {
28    /// Creates a new builder-style object to manufacture [`DisableControlInput`](crate::operation::disable_control::DisableControlInput).
29    pub fn builder() -> crate::operation::disable_control::builders::DisableControlInputBuilder {
30        crate::operation::disable_control::builders::DisableControlInputBuilder::default()
31    }
32}
33
34/// A builder for [`DisableControlInput`](crate::operation::disable_control::DisableControlInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DisableControlInputBuilder {
38    pub(crate) control_identifier: ::std::option::Option<::std::string::String>,
39    pub(crate) target_identifier: ::std::option::Option<::std::string::String>,
40    pub(crate) enabled_control_identifier: ::std::option::Option<::std::string::String>,
41}
42impl DisableControlInputBuilder {
43    /// <p>The ARN of the control. Only <b>Strongly recommended</b> and <b>Elective</b> controls are permitted, with the exception of the <b>Region deny</b> control. For information on how to find the <code>controlIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
44    pub fn control_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.control_identifier = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>The ARN of the control. Only <b>Strongly recommended</b> and <b>Elective</b> controls are permitted, with the exception of the <b>Region deny</b> control. For information on how to find the <code>controlIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
49    pub fn set_control_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.control_identifier = input;
51        self
52    }
53    /// <p>The ARN of the control. Only <b>Strongly recommended</b> and <b>Elective</b> controls are permitted, with the exception of the <b>Region deny</b> control. For information on how to find the <code>controlIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
54    pub fn get_control_identifier(&self) -> &::std::option::Option<::std::string::String> {
55        &self.control_identifier
56    }
57    /// <p>The ARN of the organizational unit. For information on how to find the <code>targetIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
58    pub fn target_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.target_identifier = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The ARN of the organizational unit. For information on how to find the <code>targetIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
63    pub fn set_target_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.target_identifier = input;
65        self
66    }
67    /// <p>The ARN of the organizational unit. For information on how to find the <code>targetIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
68    pub fn get_target_identifier(&self) -> &::std::option::Option<::std::string::String> {
69        &self.target_identifier
70    }
71    /// <p>The ARN of the enabled control to be disabled, which uniquely identifies the control instance on the target organizational unit.</p>
72    pub fn enabled_control_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.enabled_control_identifier = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The ARN of the enabled control to be disabled, which uniquely identifies the control instance on the target organizational unit.</p>
77    pub fn set_enabled_control_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.enabled_control_identifier = input;
79        self
80    }
81    /// <p>The ARN of the enabled control to be disabled, which uniquely identifies the control instance on the target organizational unit.</p>
82    pub fn get_enabled_control_identifier(&self) -> &::std::option::Option<::std::string::String> {
83        &self.enabled_control_identifier
84    }
85    /// Consumes the builder and constructs a [`DisableControlInput`](crate::operation::disable_control::DisableControlInput).
86    pub fn build(
87        self,
88    ) -> ::std::result::Result<crate::operation::disable_control::DisableControlInput, ::aws_smithy_types::error::operation::BuildError> {
89        ::std::result::Result::Ok(crate::operation::disable_control::DisableControlInput {
90            control_identifier: self.control_identifier,
91            target_identifier: self.target_identifier,
92            enabled_control_identifier: self.enabled_control_identifier,
93        })
94    }
95}