aws-sdk-wellarchitected 1.80.0

AWS SDK for AWS Well-Architected Tool
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 UpdateProfileInput {
    /// <p>The profile ARN.</p>
    pub profile_arn: ::std::option::Option<::std::string::String>,
    /// <p>The profile description.</p>
    pub profile_description: ::std::option::Option<::std::string::String>,
    /// <p>Profile questions.</p>
    pub profile_questions: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestionUpdate>>,
}
impl UpdateProfileInput {
    /// <p>The profile ARN.</p>
    pub fn profile_arn(&self) -> ::std::option::Option<&str> {
        self.profile_arn.as_deref()
    }
    /// <p>The profile description.</p>
    pub fn profile_description(&self) -> ::std::option::Option<&str> {
        self.profile_description.as_deref()
    }
    /// <p>Profile questions.</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 `.profile_questions.is_none()`.
    pub fn profile_questions(&self) -> &[crate::types::ProfileQuestionUpdate] {
        self.profile_questions.as_deref().unwrap_or_default()
    }
}
impl UpdateProfileInput {
    /// Creates a new builder-style object to manufacture [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
    pub fn builder() -> crate::operation::update_profile::builders::UpdateProfileInputBuilder {
        crate::operation::update_profile::builders::UpdateProfileInputBuilder::default()
    }
}

/// A builder for [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateProfileInputBuilder {
    pub(crate) profile_arn: ::std::option::Option<::std::string::String>,
    pub(crate) profile_description: ::std::option::Option<::std::string::String>,
    pub(crate) profile_questions: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestionUpdate>>,
}
impl UpdateProfileInputBuilder {
    /// <p>The profile ARN.</p>
    /// This field is required.
    pub fn profile_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The profile ARN.</p>
    pub fn set_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_arn = input;
        self
    }
    /// <p>The profile ARN.</p>
    pub fn get_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_arn
    }
    /// <p>The profile description.</p>
    pub fn profile_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The profile description.</p>
    pub fn set_profile_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_description = input;
        self
    }
    /// <p>The profile description.</p>
    pub fn get_profile_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_description
    }
    /// Appends an item to `profile_questions`.
    ///
    /// To override the contents of this collection use [`set_profile_questions`](Self::set_profile_questions).
    ///
    /// <p>Profile questions.</p>
    pub fn profile_questions(mut self, input: crate::types::ProfileQuestionUpdate) -> Self {
        let mut v = self.profile_questions.unwrap_or_default();
        v.push(input);
        self.profile_questions = ::std::option::Option::Some(v);
        self
    }
    /// <p>Profile questions.</p>
    pub fn set_profile_questions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestionUpdate>>) -> Self {
        self.profile_questions = input;
        self
    }
    /// <p>Profile questions.</p>
    pub fn get_profile_questions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestionUpdate>> {
        &self.profile_questions
    }
    /// Consumes the builder and constructs a [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_profile::UpdateProfileInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_profile::UpdateProfileInput {
            profile_arn: self.profile_arn,
            profile_description: self.profile_description,
            profile_questions: self.profile_questions,
        })
    }
}