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}
11impl DisableControlInput {
12 /// <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>
13 pub fn control_identifier(&self) -> ::std::option::Option<&str> {
14 self.control_identifier.as_deref()
15 }
16 /// <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>
17 pub fn target_identifier(&self) -> ::std::option::Option<&str> {
18 self.target_identifier.as_deref()
19 }
20}
21impl DisableControlInput {
22 /// Creates a new builder-style object to manufacture [`DisableControlInput`](crate::operation::disable_control::DisableControlInput).
23 pub fn builder() -> crate::operation::disable_control::builders::DisableControlInputBuilder {
24 crate::operation::disable_control::builders::DisableControlInputBuilder::default()
25 }
26}
27
28/// A builder for [`DisableControlInput`](crate::operation::disable_control::DisableControlInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DisableControlInputBuilder {
32 pub(crate) control_identifier: ::std::option::Option<::std::string::String>,
33 pub(crate) target_identifier: ::std::option::Option<::std::string::String>,
34}
35impl DisableControlInputBuilder {
36 /// <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>
37 /// This field is required.
38 pub fn control_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.control_identifier = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <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>
43 pub fn set_control_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.control_identifier = input;
45 self
46 }
47 /// <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>
48 pub fn get_control_identifier(&self) -> &::std::option::Option<::std::string::String> {
49 &self.control_identifier
50 }
51 /// <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>
52 /// This field is required.
53 pub fn target_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.target_identifier = ::std::option::Option::Some(input.into());
55 self
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 set_target_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.target_identifier = input;
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 get_target_identifier(&self) -> &::std::option::Option<::std::string::String> {
64 &self.target_identifier
65 }
66 /// Consumes the builder and constructs a [`DisableControlInput`](crate::operation::disable_control::DisableControlInput).
67 pub fn build(
68 self,
69 ) -> ::std::result::Result<crate::operation::disable_control::DisableControlInput, ::aws_smithy_types::error::operation::BuildError> {
70 ::std::result::Result::Ok(crate::operation::disable_control::DisableControlInput {
71 control_identifier: self.control_identifier,
72 target_identifier: self.target_identifier,
73 })
74 }
75}