aws-sdk-codestar 1.39.0

AWS SDK for AWS CodeStar
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)]
pub struct UpdateUserProfileInput {
    /// <p>The name that will be displayed as the friendly name for the user in AWS CodeStar.</p>
    pub user_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name that is displayed as the friendly name for the user in AWS CodeStar.</p>
    pub display_name: ::std::option::Option<::std::string::String>,
    /// <p>The email address that is displayed as part of the user's profile in AWS CodeStar.</p>
    pub email_address: ::std::option::Option<::std::string::String>,
    /// <p>The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.</p>
    pub ssh_public_key: ::std::option::Option<::std::string::String>,
}
impl UpdateUserProfileInput {
    /// <p>The name that will be displayed as the friendly name for the user in AWS CodeStar.</p>
    pub fn user_arn(&self) -> ::std::option::Option<&str> {
        self.user_arn.as_deref()
    }
    /// <p>The name that is displayed as the friendly name for the user in AWS CodeStar.</p>
    pub fn display_name(&self) -> ::std::option::Option<&str> {
        self.display_name.as_deref()
    }
    /// <p>The email address that is displayed as part of the user's profile in AWS CodeStar.</p>
    pub fn email_address(&self) -> ::std::option::Option<&str> {
        self.email_address.as_deref()
    }
    /// <p>The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.</p>
    pub fn ssh_public_key(&self) -> ::std::option::Option<&str> {
        self.ssh_public_key.as_deref()
    }
}
impl ::std::fmt::Debug for UpdateUserProfileInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateUserProfileInput");
        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.finish()
    }
}
impl UpdateUserProfileInput {
    /// Creates a new builder-style object to manufacture [`UpdateUserProfileInput`](crate::operation::update_user_profile::UpdateUserProfileInput).
    pub fn builder() -> crate::operation::update_user_profile::builders::UpdateUserProfileInputBuilder {
        crate::operation::update_user_profile::builders::UpdateUserProfileInputBuilder::default()
    }
}

/// A builder for [`UpdateUserProfileInput`](crate::operation::update_user_profile::UpdateUserProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateUserProfileInputBuilder {
    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>,
}
impl UpdateUserProfileInputBuilder {
    /// <p>The name that will be displayed as the friendly name for the user in AWS CodeStar.</p>
    /// This field is required.
    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
    }
    /// <p>The name that will be displayed as the friendly name for the user in AWS CodeStar.</p>
    pub fn set_user_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_arn = input;
        self
    }
    /// <p>The name that will be displayed as the friendly name for the user in AWS CodeStar.</p>
    pub fn get_user_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_arn
    }
    /// <p>The name that is displayed as the friendly name for the user in AWS CodeStar.</p>
    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
    }
    /// <p>The name that is displayed as the friendly name for the user in AWS CodeStar.</p>
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.display_name = input;
        self
    }
    /// <p>The name that is displayed as the friendly name for the user in AWS CodeStar.</p>
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.display_name
    }
    /// <p>The email address that is displayed as part of the user's profile in AWS CodeStar.</p>
    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
    }
    /// <p>The email address that is displayed as part of the user's profile in AWS CodeStar.</p>
    pub fn set_email_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.email_address = input;
        self
    }
    /// <p>The email address that is displayed as part of the user's profile in AWS CodeStar.</p>
    pub fn get_email_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.email_address
    }
    /// <p>The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.</p>
    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
    }
    /// <p>The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.</p>
    pub fn set_ssh_public_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ssh_public_key = input;
        self
    }
    /// <p>The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.</p>
    pub fn get_ssh_public_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.ssh_public_key
    }
    /// Consumes the builder and constructs a [`UpdateUserProfileInput`](crate::operation::update_user_profile::UpdateUserProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_user_profile::UpdateUserProfileInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_user_profile::UpdateUserProfileInput {
            user_arn: self.user_arn,
            display_name: self.display_name,
            email_address: self.email_address,
            ssh_public_key: self.ssh_public_key,
        })
    }
}
impl ::std::fmt::Debug for UpdateUserProfileInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateUserProfileInputBuilder");
        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.finish()
    }
}