aws_sdk_wellarchitected/operation/update_profile/
_update_profile_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateProfileInput {
6 pub profile_arn: ::std::option::Option<::std::string::String>,
8 pub profile_description: ::std::option::Option<::std::string::String>,
10 pub profile_questions: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestionUpdate>>,
12}
13impl UpdateProfileInput {
14 pub fn profile_arn(&self) -> ::std::option::Option<&str> {
16 self.profile_arn.as_deref()
17 }
18 pub fn profile_description(&self) -> ::std::option::Option<&str> {
20 self.profile_description.as_deref()
21 }
22 pub fn profile_questions(&self) -> &[crate::types::ProfileQuestionUpdate] {
26 self.profile_questions.as_deref().unwrap_or_default()
27 }
28}
29impl UpdateProfileInput {
30 pub fn builder() -> crate::operation::update_profile::builders::UpdateProfileInputBuilder {
32 crate::operation::update_profile::builders::UpdateProfileInputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct UpdateProfileInputBuilder {
40 pub(crate) profile_arn: ::std::option::Option<::std::string::String>,
41 pub(crate) profile_description: ::std::option::Option<::std::string::String>,
42 pub(crate) profile_questions: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestionUpdate>>,
43}
44impl UpdateProfileInputBuilder {
45 pub fn profile_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48 self.profile_arn = ::std::option::Option::Some(input.into());
49 self
50 }
51 pub fn set_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53 self.profile_arn = input;
54 self
55 }
56 pub fn get_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
58 &self.profile_arn
59 }
60 pub fn profile_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.profile_description = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_profile_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.profile_description = input;
68 self
69 }
70 pub fn get_profile_description(&self) -> &::std::option::Option<::std::string::String> {
72 &self.profile_description
73 }
74 pub fn profile_questions(mut self, input: crate::types::ProfileQuestionUpdate) -> Self {
80 let mut v = self.profile_questions.unwrap_or_default();
81 v.push(input);
82 self.profile_questions = ::std::option::Option::Some(v);
83 self
84 }
85 pub fn set_profile_questions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestionUpdate>>) -> Self {
87 self.profile_questions = input;
88 self
89 }
90 pub fn get_profile_questions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestionUpdate>> {
92 &self.profile_questions
93 }
94 pub fn build(
96 self,
97 ) -> ::std::result::Result<crate::operation::update_profile::UpdateProfileInput, ::aws_smithy_types::error::operation::BuildError> {
98 ::std::result::Result::Ok(crate::operation::update_profile::UpdateProfileInput {
99 profile_arn: self.profile_arn,
100 profile_description: self.profile_description,
101 profile_questions: self.profile_questions,
102 })
103 }
104}