#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateComputerInput {
pub directory_id: ::std::option::Option<::std::string::String>,
pub computer_name: ::std::option::Option<::std::string::String>,
pub password: ::std::option::Option<::std::string::String>,
pub organizational_unit_distinguished_name: ::std::option::Option<::std::string::String>,
pub computer_attributes: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>,
}
impl CreateComputerInput {
pub fn directory_id(&self) -> ::std::option::Option<&str> {
self.directory_id.as_deref()
}
pub fn computer_name(&self) -> ::std::option::Option<&str> {
self.computer_name.as_deref()
}
pub fn password(&self) -> ::std::option::Option<&str> {
self.password.as_deref()
}
pub fn organizational_unit_distinguished_name(&self) -> ::std::option::Option<&str> {
self.organizational_unit_distinguished_name.as_deref()
}
pub fn computer_attributes(&self) -> &[crate::types::Attribute] {
self.computer_attributes.as_deref().unwrap_or_default()
}
}
impl ::std::fmt::Debug for CreateComputerInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateComputerInput");
formatter.field("directory_id", &self.directory_id);
formatter.field("computer_name", &self.computer_name);
formatter.field("password", &"*** Sensitive Data Redacted ***");
formatter.field("organizational_unit_distinguished_name", &self.organizational_unit_distinguished_name);
formatter.field("computer_attributes", &self.computer_attributes);
formatter.finish()
}
}
impl CreateComputerInput {
pub fn builder() -> crate::operation::create_computer::builders::CreateComputerInputBuilder {
crate::operation::create_computer::builders::CreateComputerInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateComputerInputBuilder {
pub(crate) directory_id: ::std::option::Option<::std::string::String>,
pub(crate) computer_name: ::std::option::Option<::std::string::String>,
pub(crate) password: ::std::option::Option<::std::string::String>,
pub(crate) organizational_unit_distinguished_name: ::std::option::Option<::std::string::String>,
pub(crate) computer_attributes: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>,
}
impl CreateComputerInputBuilder {
pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.directory_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.directory_id = input;
self
}
pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
&self.directory_id
}
pub fn computer_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.computer_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_computer_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.computer_name = input;
self
}
pub fn get_computer_name(&self) -> &::std::option::Option<::std::string::String> {
&self.computer_name
}
pub fn password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.password = ::std::option::Option::Some(input.into());
self
}
pub fn set_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.password = input;
self
}
pub fn get_password(&self) -> &::std::option::Option<::std::string::String> {
&self.password
}
pub fn organizational_unit_distinguished_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.organizational_unit_distinguished_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_organizational_unit_distinguished_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.organizational_unit_distinguished_name = input;
self
}
pub fn get_organizational_unit_distinguished_name(&self) -> &::std::option::Option<::std::string::String> {
&self.organizational_unit_distinguished_name
}
pub fn computer_attributes(mut self, input: crate::types::Attribute) -> Self {
let mut v = self.computer_attributes.unwrap_or_default();
v.push(input);
self.computer_attributes = ::std::option::Option::Some(v);
self
}
pub fn set_computer_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>) -> Self {
self.computer_attributes = input;
self
}
pub fn get_computer_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Attribute>> {
&self.computer_attributes
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_computer::CreateComputerInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_computer::CreateComputerInput {
directory_id: self.directory_id,
computer_name: self.computer_name,
password: self.password,
organizational_unit_distinguished_name: self.organizational_unit_distinguished_name,
computer_attributes: self.computer_attributes,
})
}
}
impl ::std::fmt::Debug for CreateComputerInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateComputerInputBuilder");
formatter.field("directory_id", &self.directory_id);
formatter.field("computer_name", &self.computer_name);
formatter.field("password", &"*** Sensitive Data Redacted ***");
formatter.field("organizational_unit_distinguished_name", &self.organizational_unit_distinguished_name);
formatter.field("computer_attributes", &self.computer_attributes);
formatter.finish()
}
}