aws_sdk_wellarchitected/operation/update_profile/
_update_profile_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateProfileInput {
pub profile_arn: ::std::option::Option<::std::string::String>,
pub profile_description: ::std::option::Option<::std::string::String>,
pub profile_questions: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestionUpdate>>,
}
impl UpdateProfileInput {
pub fn profile_arn(&self) -> ::std::option::Option<&str> {
self.profile_arn.as_deref()
}
pub fn profile_description(&self) -> ::std::option::Option<&str> {
self.profile_description.as_deref()
}
pub fn profile_questions(&self) -> &[crate::types::ProfileQuestionUpdate] {
self.profile_questions.as_deref().unwrap_or_default()
}
}
impl UpdateProfileInput {
pub fn builder() -> crate::operation::update_profile::builders::UpdateProfileInputBuilder {
crate::operation::update_profile::builders::UpdateProfileInputBuilder::default()
}
}
#[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 {
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
}
pub fn set_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profile_arn = input;
self
}
pub fn get_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.profile_arn
}
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
}
pub fn set_profile_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profile_description = input;
self
}
pub fn get_profile_description(&self) -> &::std::option::Option<::std::string::String> {
&self.profile_description
}
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
}
pub fn set_profile_questions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestionUpdate>>) -> Self {
self.profile_questions = input;
self
}
pub fn get_profile_questions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestionUpdate>> {
&self.profile_questions
}
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,
})
}
}