aws-sdk-mpa 1.21.0

AWS SDK for AWS Multi-party Approval
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 UpdateApprovalTeamInput {
    /// <p>An <code>ApprovalStrategy</code> object. Contains details for how the team grants approval.</p>
    pub approval_strategy: ::std::option::Option<crate::types::ApprovalStrategy>,
    /// <p>An array of <code>ApprovalTeamRequestApprover</code> objects. Contains details for the approvers in the team.</p>
    pub approvers: ::std::option::Option<::std::vec::Vec<crate::types::ApprovalTeamRequestApprover>>,
    /// <p>Description for the team.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Amazon Resource Name (ARN) for the team.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>A list of <code>UpdateAction</code> to perform when updating the team.</p>
    pub update_actions: ::std::option::Option<::std::vec::Vec<crate::types::UpdateAction>>,
}
impl UpdateApprovalTeamInput {
    /// <p>An <code>ApprovalStrategy</code> object. Contains details for how the team grants approval.</p>
    pub fn approval_strategy(&self) -> ::std::option::Option<&crate::types::ApprovalStrategy> {
        self.approval_strategy.as_ref()
    }
    /// <p>An array of <code>ApprovalTeamRequestApprover</code> objects. Contains details for the approvers in the team.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.approvers.is_none()`.
    pub fn approvers(&self) -> &[crate::types::ApprovalTeamRequestApprover] {
        self.approvers.as_deref().unwrap_or_default()
    }
    /// <p>Description for the team.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Amazon Resource Name (ARN) for the team.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>A list of <code>UpdateAction</code> to perform when updating the team.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.update_actions.is_none()`.
    pub fn update_actions(&self) -> &[crate::types::UpdateAction] {
        self.update_actions.as_deref().unwrap_or_default()
    }
}
impl ::std::fmt::Debug for UpdateApprovalTeamInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateApprovalTeamInput");
        formatter.field("approval_strategy", &self.approval_strategy);
        formatter.field("approvers", &self.approvers);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("arn", &self.arn);
        formatter.field("update_actions", &self.update_actions);
        formatter.finish()
    }
}
impl UpdateApprovalTeamInput {
    /// Creates a new builder-style object to manufacture [`UpdateApprovalTeamInput`](crate::operation::update_approval_team::UpdateApprovalTeamInput).
    pub fn builder() -> crate::operation::update_approval_team::builders::UpdateApprovalTeamInputBuilder {
        crate::operation::update_approval_team::builders::UpdateApprovalTeamInputBuilder::default()
    }
}

/// A builder for [`UpdateApprovalTeamInput`](crate::operation::update_approval_team::UpdateApprovalTeamInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateApprovalTeamInputBuilder {
    pub(crate) approval_strategy: ::std::option::Option<crate::types::ApprovalStrategy>,
    pub(crate) approvers: ::std::option::Option<::std::vec::Vec<crate::types::ApprovalTeamRequestApprover>>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) update_actions: ::std::option::Option<::std::vec::Vec<crate::types::UpdateAction>>,
}
impl UpdateApprovalTeamInputBuilder {
    /// <p>An <code>ApprovalStrategy</code> object. Contains details for how the team grants approval.</p>
    pub fn approval_strategy(mut self, input: crate::types::ApprovalStrategy) -> Self {
        self.approval_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>An <code>ApprovalStrategy</code> object. Contains details for how the team grants approval.</p>
    pub fn set_approval_strategy(mut self, input: ::std::option::Option<crate::types::ApprovalStrategy>) -> Self {
        self.approval_strategy = input;
        self
    }
    /// <p>An <code>ApprovalStrategy</code> object. Contains details for how the team grants approval.</p>
    pub fn get_approval_strategy(&self) -> &::std::option::Option<crate::types::ApprovalStrategy> {
        &self.approval_strategy
    }
    /// Appends an item to `approvers`.
    ///
    /// To override the contents of this collection use [`set_approvers`](Self::set_approvers).
    ///
    /// <p>An array of <code>ApprovalTeamRequestApprover</code> objects. Contains details for the approvers in the team.</p>
    pub fn approvers(mut self, input: crate::types::ApprovalTeamRequestApprover) -> Self {
        let mut v = self.approvers.unwrap_or_default();
        v.push(input);
        self.approvers = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of <code>ApprovalTeamRequestApprover</code> objects. Contains details for the approvers in the team.</p>
    pub fn set_approvers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ApprovalTeamRequestApprover>>) -> Self {
        self.approvers = input;
        self
    }
    /// <p>An array of <code>ApprovalTeamRequestApprover</code> objects. Contains details for the approvers in the team.</p>
    pub fn get_approvers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ApprovalTeamRequestApprover>> {
        &self.approvers
    }
    /// <p>Description for the team.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Description for the team.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>Description for the team.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Amazon Resource Name (ARN) for the team.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Amazon Resource Name (ARN) for the team.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>Amazon Resource Name (ARN) for the team.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// Appends an item to `update_actions`.
    ///
    /// To override the contents of this collection use [`set_update_actions`](Self::set_update_actions).
    ///
    /// <p>A list of <code>UpdateAction</code> to perform when updating the team.</p>
    pub fn update_actions(mut self, input: crate::types::UpdateAction) -> Self {
        let mut v = self.update_actions.unwrap_or_default();
        v.push(input);
        self.update_actions = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of <code>UpdateAction</code> to perform when updating the team.</p>
    pub fn set_update_actions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UpdateAction>>) -> Self {
        self.update_actions = input;
        self
    }
    /// <p>A list of <code>UpdateAction</code> to perform when updating the team.</p>
    pub fn get_update_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UpdateAction>> {
        &self.update_actions
    }
    /// Consumes the builder and constructs a [`UpdateApprovalTeamInput`](crate::operation::update_approval_team::UpdateApprovalTeamInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_approval_team::UpdateApprovalTeamInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_approval_team::UpdateApprovalTeamInput {
            approval_strategy: self.approval_strategy,
            approvers: self.approvers,
            description: self.description,
            arn: self.arn,
            update_actions: self.update_actions,
        })
    }
}
impl ::std::fmt::Debug for UpdateApprovalTeamInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateApprovalTeamInputBuilder");
        formatter.field("approval_strategy", &self.approval_strategy);
        formatter.field("approvers", &self.approvers);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("arn", &self.arn);
        formatter.field("update_actions", &self.update_actions);
        formatter.finish()
    }
}