aws_sdk_wellarchitected/operation/update_profile/
_update_profile_input.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// 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,
        })
    }
}