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 AcceptHandshakeInput {
    /// <p>ID for the handshake that you want to accept.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters or digits.</p>
    pub handshake_id: ::std::option::Option<::std::string::String>,
}
impl AcceptHandshakeInput {
    /// <p>ID for the handshake that you want to accept.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters or digits.</p>
    pub fn handshake_id(&self) -> ::std::option::Option<&str> {
        self.handshake_id.as_deref()
    }
}
impl AcceptHandshakeInput {
    /// Creates a new builder-style object to manufacture [`AcceptHandshakeInput`](crate::operation::accept_handshake::AcceptHandshakeInput).
    pub fn builder() -> crate::operation::accept_handshake::builders::AcceptHandshakeInputBuilder {
        crate::operation::accept_handshake::builders::AcceptHandshakeInputBuilder::default()
    }
}

/// A builder for [`AcceptHandshakeInput`](crate::operation::accept_handshake::AcceptHandshakeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AcceptHandshakeInputBuilder {
    pub(crate) handshake_id: ::std::option::Option<::std::string::String>,
}
impl AcceptHandshakeInputBuilder {
    /// <p>ID for the handshake that you want to accept.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters or digits.</p>
    /// This field is required.
    pub fn handshake_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.handshake_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ID for the handshake that you want to accept.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters or digits.</p>
    pub fn set_handshake_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.handshake_id = input;
        self
    }
    /// <p>ID for the handshake that you want to accept.</p>
    /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for handshake ID string requires "h-" followed by from 8 to 32 lowercase letters or digits.</p>
    pub fn get_handshake_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.handshake_id
    }
    /// Consumes the builder and constructs a [`AcceptHandshakeInput`](crate::operation::accept_handshake::AcceptHandshakeInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::accept_handshake::AcceptHandshakeInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::accept_handshake::AcceptHandshakeInput {
            handshake_id: self.handshake_id,
        })
    }
}