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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a user's SSH information.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UserProfile {
    /// <p>The user's IAM ARN.</p>
    pub iam_user_arn: ::std::option::Option<::std::string::String>,
    /// <p>The user's name.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The user's SSH user name.</p>
    pub ssh_username: ::std::option::Option<::std::string::String>,
    /// <p>The user's SSH public key.</p>
    pub ssh_public_key: ::std::option::Option<::std::string::String>,
    /// <p>Whether users can specify their own SSH public key through the My Settings page. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing User Permissions</a>.</p>
    pub allow_self_management: ::std::option::Option<bool>,
}
impl UserProfile {
    /// <p>The user's IAM ARN.</p>
    pub fn iam_user_arn(&self) -> ::std::option::Option<&str> {
        self.iam_user_arn.as_deref()
    }
    /// <p>The user's name.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The user's SSH user name.</p>
    pub fn ssh_username(&self) -> ::std::option::Option<&str> {
        self.ssh_username.as_deref()
    }
    /// <p>The user's SSH public key.</p>
    pub fn ssh_public_key(&self) -> ::std::option::Option<&str> {
        self.ssh_public_key.as_deref()
    }
    /// <p>Whether users can specify their own SSH public key through the My Settings page. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing User Permissions</a>.</p>
    pub fn allow_self_management(&self) -> ::std::option::Option<bool> {
        self.allow_self_management
    }
}
impl UserProfile {
    /// Creates a new builder-style object to manufacture [`UserProfile`](crate::types::UserProfile).
    pub fn builder() -> crate::types::builders::UserProfileBuilder {
        crate::types::builders::UserProfileBuilder::default()
    }
}

/// A builder for [`UserProfile`](crate::types::UserProfile).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UserProfileBuilder {
    pub(crate) iam_user_arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) ssh_username: ::std::option::Option<::std::string::String>,
    pub(crate) ssh_public_key: ::std::option::Option<::std::string::String>,
    pub(crate) allow_self_management: ::std::option::Option<bool>,
}
impl UserProfileBuilder {
    /// <p>The user's IAM ARN.</p>
    pub fn iam_user_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.iam_user_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The user's IAM ARN.</p>
    pub fn set_iam_user_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.iam_user_arn = input;
        self
    }
    /// <p>The user's IAM ARN.</p>
    pub fn get_iam_user_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.iam_user_arn
    }
    /// <p>The user's name.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The user's name.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The user's name.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The user's SSH user name.</p>
    pub fn ssh_username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ssh_username = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The user's SSH user name.</p>
    pub fn set_ssh_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ssh_username = input;
        self
    }
    /// <p>The user's SSH user name.</p>
    pub fn get_ssh_username(&self) -> &::std::option::Option<::std::string::String> {
        &self.ssh_username
    }
    /// <p>The user's SSH public key.</p>
    pub fn ssh_public_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ssh_public_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The user's SSH public key.</p>
    pub fn set_ssh_public_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ssh_public_key = input;
        self
    }
    /// <p>The user's SSH public key.</p>
    pub fn get_ssh_public_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.ssh_public_key
    }
    /// <p>Whether users can specify their own SSH public key through the My Settings page. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing User Permissions</a>.</p>
    pub fn allow_self_management(mut self, input: bool) -> Self {
        self.allow_self_management = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether users can specify their own SSH public key through the My Settings page. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing User Permissions</a>.</p>
    pub fn set_allow_self_management(mut self, input: ::std::option::Option<bool>) -> Self {
        self.allow_self_management = input;
        self
    }
    /// <p>Whether users can specify their own SSH public key through the My Settings page. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing User Permissions</a>.</p>
    pub fn get_allow_self_management(&self) -> &::std::option::Option<bool> {
        &self.allow_self_management
    }
    /// Consumes the builder and constructs a [`UserProfile`](crate::types::UserProfile).
    pub fn build(self) -> crate::types::UserProfile {
        crate::types::UserProfile {
            iam_user_arn: self.iam_user_arn,
            name: self.name,
            ssh_username: self.ssh_username,
            ssh_public_key: self.ssh_public_key,
            allow_self_management: self.allow_self_management,
        }
    }
}