#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateUserProfileOutput {
pub user_arn: ::std::string::String,
pub display_name: ::std::option::Option<::std::string::String>,
pub email_address: ::std::option::Option<::std::string::String>,
pub ssh_public_key: ::std::option::Option<::std::string::String>,
pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub last_modified_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl CreateUserProfileOutput {
pub fn user_arn(&self) -> &str {
use std::ops::Deref;
self.user_arn.deref()
}
pub fn display_name(&self) -> ::std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn email_address(&self) -> ::std::option::Option<&str> {
self.email_address.as_deref()
}
pub fn ssh_public_key(&self) -> ::std::option::Option<&str> {
self.ssh_public_key.as_deref()
}
pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_timestamp.as_ref()
}
pub fn last_modified_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_modified_timestamp.as_ref()
}
}
impl ::std::fmt::Debug for CreateUserProfileOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateUserProfileOutput");
formatter.field("user_arn", &self.user_arn);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("email_address", &"*** Sensitive Data Redacted ***");
formatter.field("ssh_public_key", &self.ssh_public_key);
formatter.field("created_timestamp", &self.created_timestamp);
formatter.field("last_modified_timestamp", &self.last_modified_timestamp);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for CreateUserProfileOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateUserProfileOutput {
pub fn builder() -> crate::operation::create_user_profile::builders::CreateUserProfileOutputBuilder {
crate::operation::create_user_profile::builders::CreateUserProfileOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateUserProfileOutputBuilder {
pub(crate) user_arn: ::std::option::Option<::std::string::String>,
pub(crate) display_name: ::std::option::Option<::std::string::String>,
pub(crate) email_address: ::std::option::Option<::std::string::String>,
pub(crate) ssh_public_key: ::std::option::Option<::std::string::String>,
pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_modified_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl CreateUserProfileOutputBuilder {
pub fn user_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.user_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_user_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.user_arn = input;
self
}
pub fn get_user_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.user_arn
}
pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.display_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.display_name = input;
self
}
pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
&self.display_name
}
pub fn email_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.email_address = ::std::option::Option::Some(input.into());
self
}
pub fn set_email_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.email_address = input;
self
}
pub fn get_email_address(&self) -> &::std::option::Option<::std::string::String> {
&self.email_address
}
pub fn ssh_public_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ssh_public_key = ::std::option::Option::Some(input.into());
self
}
pub fn set_ssh_public_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ssh_public_key = input;
self
}
pub fn get_ssh_public_key(&self) -> &::std::option::Option<::std::string::String> {
&self.ssh_public_key
}
pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_timestamp = ::std::option::Option::Some(input);
self
}
pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_timestamp = input;
self
}
pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_timestamp
}
pub fn last_modified_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_modified_timestamp = ::std::option::Option::Some(input);
self
}
pub fn set_last_modified_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_modified_timestamp = input;
self
}
pub fn get_last_modified_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_modified_timestamp
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_user_profile::CreateUserProfileOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_user_profile::CreateUserProfileOutput {
user_arn: self.user_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"user_arn",
"user_arn was not specified but it is required when building CreateUserProfileOutput",
)
})?,
display_name: self.display_name,
email_address: self.email_address,
ssh_public_key: self.ssh_public_key,
created_timestamp: self.created_timestamp,
last_modified_timestamp: self.last_modified_timestamp,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for CreateUserProfileOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateUserProfileOutputBuilder");
formatter.field("user_arn", &self.user_arn);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("email_address", &"*** Sensitive Data Redacted ***");
formatter.field("ssh_public_key", &self.ssh_public_key);
formatter.field("created_timestamp", &self.created_timestamp);
formatter.field("last_modified_timestamp", &self.last_modified_timestamp);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}