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, ::std::fmt::Debug)]
pub struct UpdateTeamMemberInput {
    /// <p>The ID of the project.</p>
    pub project_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the user for whom you want to change team membership attributes.</p>
    pub user_arn: ::std::option::Option<::std::string::String>,
    /// <p>The role assigned to the user in the project. Project roles have different levels of access. For more information, see <a href="http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html">Working with Teams</a> in the <i>AWS CodeStar User Guide</i>.</p>
    pub project_role: ::std::option::Option<::std::string::String>,
    /// <p>Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile. Even if this is set to True, the user must associate a public key with their profile before the user can access resources.</p>
    pub remote_access_allowed: ::std::option::Option<bool>,
}
impl UpdateTeamMemberInput {
    /// <p>The ID of the project.</p>
    pub fn project_id(&self) -> ::std::option::Option<&str> {
        self.project_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the user for whom you want to change team membership attributes.</p>
    pub fn user_arn(&self) -> ::std::option::Option<&str> {
        self.user_arn.as_deref()
    }
    /// <p>The role assigned to the user in the project. Project roles have different levels of access. For more information, see <a href="http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html">Working with Teams</a> in the <i>AWS CodeStar User Guide</i>.</p>
    pub fn project_role(&self) -> ::std::option::Option<&str> {
        self.project_role.as_deref()
    }
    /// <p>Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile. Even if this is set to True, the user must associate a public key with their profile before the user can access resources.</p>
    pub fn remote_access_allowed(&self) -> ::std::option::Option<bool> {
        self.remote_access_allowed
    }
}
impl UpdateTeamMemberInput {
    /// Creates a new builder-style object to manufacture [`UpdateTeamMemberInput`](crate::operation::update_team_member::UpdateTeamMemberInput).
    pub fn builder() -> crate::operation::update_team_member::builders::UpdateTeamMemberInputBuilder {
        crate::operation::update_team_member::builders::UpdateTeamMemberInputBuilder::default()
    }
}

/// A builder for [`UpdateTeamMemberInput`](crate::operation::update_team_member::UpdateTeamMemberInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateTeamMemberInputBuilder {
    pub(crate) project_id: ::std::option::Option<::std::string::String>,
    pub(crate) user_arn: ::std::option::Option<::std::string::String>,
    pub(crate) project_role: ::std::option::Option<::std::string::String>,
    pub(crate) remote_access_allowed: ::std::option::Option<bool>,
}
impl UpdateTeamMemberInputBuilder {
    /// <p>The ID of the project.</p>
    /// This field is required.
    pub fn project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.project_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the project.</p>
    pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.project_id = input;
        self
    }
    /// <p>The ID of the project.</p>
    pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.project_id
    }
    /// <p>The Amazon Resource Name (ARN) of the user for whom you want to change team membership attributes.</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 Amazon Resource Name (ARN) of the user for whom you want to change team membership attributes.</p>
    pub fn set_user_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the user for whom you want to change team membership attributes.</p>
    pub fn get_user_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_arn
    }
    /// <p>The role assigned to the user in the project. Project roles have different levels of access. For more information, see <a href="http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html">Working with Teams</a> in the <i>AWS CodeStar User Guide</i>.</p>
    pub fn project_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.project_role = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The role assigned to the user in the project. Project roles have different levels of access. For more information, see <a href="http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html">Working with Teams</a> in the <i>AWS CodeStar User Guide</i>.</p>
    pub fn set_project_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.project_role = input;
        self
    }
    /// <p>The role assigned to the user in the project. Project roles have different levels of access. For more information, see <a href="http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html">Working with Teams</a> in the <i>AWS CodeStar User Guide</i>.</p>
    pub fn get_project_role(&self) -> &::std::option::Option<::std::string::String> {
        &self.project_role
    }
    /// <p>Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile. Even if this is set to True, the user must associate a public key with their profile before the user can access resources.</p>
    pub fn remote_access_allowed(mut self, input: bool) -> Self {
        self.remote_access_allowed = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile. Even if this is set to True, the user must associate a public key with their profile before the user can access resources.</p>
    pub fn set_remote_access_allowed(mut self, input: ::std::option::Option<bool>) -> Self {
        self.remote_access_allowed = input;
        self
    }
    /// <p>Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile. Even if this is set to True, the user must associate a public key with their profile before the user can access resources.</p>
    pub fn get_remote_access_allowed(&self) -> &::std::option::Option<bool> {
        &self.remote_access_allowed
    }
    /// Consumes the builder and constructs a [`UpdateTeamMemberInput`](crate::operation::update_team_member::UpdateTeamMemberInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_team_member::UpdateTeamMemberInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_team_member::UpdateTeamMemberInput {
            project_id: self.project_id,
            user_arn: self.user_arn,
            project_role: self.project_role,
            remote_access_allowed: self.remote_access_allowed,
        })
    }
}