aws-sdk-organizations 1.119.1

AWS SDK for AWS Organizations
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct MoveAccountInput {
    /// <p>ID for the account that you want to move.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for an account ID string requires exactly 12 digits.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>ID for the root or organizational unit that you want to move the account from.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
    /// <li>
    /// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
    /// </ul>
    pub source_parent_id: ::std::option::Option<::std::string::String>,
    /// <p>ID for the root or organizational unit that you want to move the account to.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
    /// <li>
    /// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
    /// </ul>
    pub destination_parent_id: ::std::option::Option<::std::string::String>,
}
impl MoveAccountInput {
    /// <p>ID for the account that you want to move.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for an account ID string requires exactly 12 digits.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>ID for the root or organizational unit that you want to move the account from.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
    /// <li>
    /// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
    /// </ul>
    pub fn source_parent_id(&self) -> ::std::option::Option<&str> {
        self.source_parent_id.as_deref()
    }
    /// <p>ID for the root or organizational unit that you want to move the account to.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
    /// <li>
    /// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
    /// </ul>
    pub fn destination_parent_id(&self) -> ::std::option::Option<&str> {
        self.destination_parent_id.as_deref()
    }
}
impl MoveAccountInput {
    /// Creates a new builder-style object to manufacture [`MoveAccountInput`](crate::operation::move_account::MoveAccountInput).
    pub fn builder() -> crate::operation::move_account::builders::MoveAccountInputBuilder {
        crate::operation::move_account::builders::MoveAccountInputBuilder::default()
    }
}

/// A builder for [`MoveAccountInput`](crate::operation::move_account::MoveAccountInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct MoveAccountInputBuilder {
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) source_parent_id: ::std::option::Option<::std::string::String>,
    pub(crate) destination_parent_id: ::std::option::Option<::std::string::String>,
}
impl MoveAccountInputBuilder {
    /// <p>ID for the account that you want to move.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for an account ID string requires exactly 12 digits.</p>
    /// This field is required.
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ID for the account that you want to move.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for an account ID string requires exactly 12 digits.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_id = input;
        self
    }
    /// <p>ID for the account that you want to move.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for an account ID string requires exactly 12 digits.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>ID for the root or organizational unit that you want to move the account from.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
    /// <li>
    /// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
    /// </ul>
    /// This field is required.
    pub fn source_parent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_parent_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ID for the root or organizational unit that you want to move the account from.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
    /// <li>
    /// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
    /// </ul>
    pub fn set_source_parent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_parent_id = input;
        self
    }
    /// <p>ID for the root or organizational unit that you want to move the account from.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
    /// <li>
    /// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
    /// </ul>
    pub fn get_source_parent_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_parent_id
    }
    /// <p>ID for the root or organizational unit that you want to move the account to.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
    /// <li>
    /// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
    /// </ul>
    /// This field is required.
    pub fn destination_parent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.destination_parent_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ID for the root or organizational unit that you want to move the account to.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
    /// <li>
    /// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
    /// </ul>
    pub fn set_destination_parent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.destination_parent_id = input;
        self
    }
    /// <p>ID for the root or organizational unit that you want to move the account to.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
    /// <li>
    /// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
    /// </ul>
    pub fn get_destination_parent_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.destination_parent_id
    }
    /// Consumes the builder and constructs a [`MoveAccountInput`](crate::operation::move_account::MoveAccountInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::move_account::MoveAccountInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::move_account::MoveAccountInput {
            account_id: self.account_id,
            source_parent_id: self.source_parent_id,
            destination_parent_id: self.destination_parent_id,
        })
    }
}