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 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides information about your AWS account.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccountInfo {
/// <p>The identifier of the AWS account that is assigned to the user.</p>
#[doc(hidden)]
pub account_id: std::option::Option<std::string::String>,
/// <p>The display name of the AWS account that is assigned to the user.</p>
#[doc(hidden)]
pub account_name: std::option::Option<std::string::String>,
/// <p>The email address of the AWS account that is assigned to the user.</p>
#[doc(hidden)]
pub email_address: std::option::Option<std::string::String>,
}
impl AccountInfo {
/// <p>The identifier of the AWS account that is assigned to the user.</p>
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
/// <p>The display name of the AWS account that is assigned to the user.</p>
pub fn account_name(&self) -> std::option::Option<&str> {
self.account_name.as_deref()
}
/// <p>The email address of the AWS account that is assigned to the user.</p>
pub fn email_address(&self) -> std::option::Option<&str> {
self.email_address.as_deref()
}
}
/// See [`AccountInfo`](crate::model::AccountInfo).
pub mod account_info {
/// A builder for [`AccountInfo`](crate::model::AccountInfo).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) account_name: std::option::Option<std::string::String>,
pub(crate) email_address: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The identifier of the AWS account that is assigned to the user.</p>
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
/// <p>The identifier of the AWS account that is assigned to the user.</p>
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
/// <p>The display name of the AWS account that is assigned to the user.</p>
pub fn account_name(mut self, input: impl Into<std::string::String>) -> Self {
self.account_name = Some(input.into());
self
}
/// <p>The display name of the AWS account that is assigned to the user.</p>
pub fn set_account_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_name = input;
self
}
/// <p>The email address of the AWS account that is assigned to the user.</p>
pub fn email_address(mut self, input: impl Into<std::string::String>) -> Self {
self.email_address = Some(input.into());
self
}
/// <p>The email address of the AWS account that is assigned to the user.</p>
pub fn set_email_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.email_address = input;
self
}
/// Consumes the builder and constructs a [`AccountInfo`](crate::model::AccountInfo).
pub fn build(self) -> crate::model::AccountInfo {
crate::model::AccountInfo {
account_id: self.account_id,
account_name: self.account_name,
email_address: self.email_address,
}
}
}
}
impl AccountInfo {
/// Creates a new builder-style object to manufacture [`AccountInfo`](crate::model::AccountInfo).
pub fn builder() -> crate::model::account_info::Builder {
crate::model::account_info::Builder::default()
}
}
/// <p>Provides information about the role that is assigned to the user.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RoleInfo {
/// <p>The friendly name of the role that is assigned to the user.</p>
#[doc(hidden)]
pub role_name: std::option::Option<std::string::String>,
/// <p>The identifier of the AWS account assigned to the user.</p>
#[doc(hidden)]
pub account_id: std::option::Option<std::string::String>,
}
impl RoleInfo {
/// <p>The friendly name of the role that is assigned to the user.</p>
pub fn role_name(&self) -> std::option::Option<&str> {
self.role_name.as_deref()
}
/// <p>The identifier of the AWS account assigned to the user.</p>
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
}
/// See [`RoleInfo`](crate::model::RoleInfo).
pub mod role_info {
/// A builder for [`RoleInfo`](crate::model::RoleInfo).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) role_name: std::option::Option<std::string::String>,
pub(crate) account_id: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The friendly name of the role that is assigned to the user.</p>
pub fn role_name(mut self, input: impl Into<std::string::String>) -> Self {
self.role_name = Some(input.into());
self
}
/// <p>The friendly name of the role that is assigned to the user.</p>
pub fn set_role_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_name = input;
self
}
/// <p>The identifier of the AWS account assigned to the user.</p>
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
/// <p>The identifier of the AWS account assigned to the user.</p>
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
/// Consumes the builder and constructs a [`RoleInfo`](crate::model::RoleInfo).
pub fn build(self) -> crate::model::RoleInfo {
crate::model::RoleInfo {
role_name: self.role_name,
account_id: self.account_id,
}
}
}
}
impl RoleInfo {
/// Creates a new builder-style object to manufacture [`RoleInfo`](crate::model::RoleInfo).
pub fn builder() -> crate::model::role_info::Builder {
crate::model::role_info::Builder::default()
}
}
/// <p>Provides information about the role credentials that are assigned to the user.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RoleCredentials {
/// <p>The identifier used for the temporary security credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
#[doc(hidden)]
pub access_key_id: std::option::Option<std::string::String>,
/// <p>The key that is used to sign the request. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
#[doc(hidden)]
pub secret_access_key: std::option::Option<std::string::String>,
/// <p>The token used for temporary credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
#[doc(hidden)]
pub session_token: std::option::Option<std::string::String>,
/// <p>The date on which temporary security credentials expire.</p>
#[doc(hidden)]
pub expiration: i64,
}
impl RoleCredentials {
/// <p>The identifier used for the temporary security credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
pub fn access_key_id(&self) -> std::option::Option<&str> {
self.access_key_id.as_deref()
}
/// <p>The key that is used to sign the request. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
pub fn secret_access_key(&self) -> std::option::Option<&str> {
self.secret_access_key.as_deref()
}
/// <p>The token used for temporary credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
pub fn session_token(&self) -> std::option::Option<&str> {
self.session_token.as_deref()
}
/// <p>The date on which temporary security credentials expire.</p>
pub fn expiration(&self) -> i64 {
self.expiration
}
}
impl std::fmt::Debug for RoleCredentials {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RoleCredentials");
formatter.field("access_key_id", &self.access_key_id);
formatter.field("secret_access_key", &"*** Sensitive Data Redacted ***");
formatter.field("session_token", &"*** Sensitive Data Redacted ***");
formatter.field("expiration", &self.expiration);
formatter.finish()
}
}
/// See [`RoleCredentials`](crate::model::RoleCredentials).
pub mod role_credentials {
/// A builder for [`RoleCredentials`](crate::model::RoleCredentials).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) access_key_id: std::option::Option<std::string::String>,
pub(crate) secret_access_key: std::option::Option<std::string::String>,
pub(crate) session_token: std::option::Option<std::string::String>,
pub(crate) expiration: std::option::Option<i64>,
}
impl Builder {
/// <p>The identifier used for the temporary security credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
pub fn access_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.access_key_id = Some(input.into());
self
}
/// <p>The identifier used for the temporary security credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
pub fn set_access_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.access_key_id = input;
self
}
/// <p>The key that is used to sign the request. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
pub fn secret_access_key(mut self, input: impl Into<std::string::String>) -> Self {
self.secret_access_key = Some(input.into());
self
}
/// <p>The key that is used to sign the request. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
pub fn set_secret_access_key(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.secret_access_key = input;
self
}
/// <p>The token used for temporary credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
pub fn session_token(mut self, input: impl Into<std::string::String>) -> Self {
self.session_token = Some(input.into());
self
}
/// <p>The token used for temporary credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the <i>AWS IAM User Guide</i>.</p>
pub fn set_session_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.session_token = input;
self
}
/// <p>The date on which temporary security credentials expire.</p>
pub fn expiration(mut self, input: i64) -> Self {
self.expiration = Some(input);
self
}
/// <p>The date on which temporary security credentials expire.</p>
pub fn set_expiration(mut self, input: std::option::Option<i64>) -> Self {
self.expiration = input;
self
}
/// Consumes the builder and constructs a [`RoleCredentials`](crate::model::RoleCredentials).
pub fn build(self) -> crate::model::RoleCredentials {
crate::model::RoleCredentials {
access_key_id: self.access_key_id,
secret_access_key: self.secret_access_key,
session_token: self.session_token,
expiration: self.expiration.unwrap_or_default(),
}
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("access_key_id", &self.access_key_id);
formatter.field("secret_access_key", &"*** Sensitive Data Redacted ***");
formatter.field("session_token", &"*** Sensitive Data Redacted ***");
formatter.field("expiration", &self.expiration);
formatter.finish()
}
}
}
impl RoleCredentials {
/// Creates a new builder-style object to manufacture [`RoleCredentials`](crate::model::RoleCredentials).
pub fn builder() -> crate::model::role_credentials::Builder {
crate::model::role_credentials::Builder::default()
}
}