/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Macie2 { namespace Model { /** *

Provides information about the type and other characteristics of an entity * that performed an action on an affected resource.

See Also:

AWS * API Reference

*/ class UserIdentity { public: AWS_MACIE2_API UserIdentity(); AWS_MACIE2_API UserIdentity(Aws::Utils::Json::JsonView jsonValue); AWS_MACIE2_API UserIdentity& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_MACIE2_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

If the action was performed with temporary security credentials that were * obtained using the AssumeRole operation of the Security Token Service (STS) API, * the identifiers, session context, and other details about the identity.

*/ inline const AssumedRole& GetAssumedRole() const{ return m_assumedRole; } /** *

If the action was performed with temporary security credentials that were * obtained using the AssumeRole operation of the Security Token Service (STS) API, * the identifiers, session context, and other details about the identity.

*/ inline bool AssumedRoleHasBeenSet() const { return m_assumedRoleHasBeenSet; } /** *

If the action was performed with temporary security credentials that were * obtained using the AssumeRole operation of the Security Token Service (STS) API, * the identifiers, session context, and other details about the identity.

*/ inline void SetAssumedRole(const AssumedRole& value) { m_assumedRoleHasBeenSet = true; m_assumedRole = value; } /** *

If the action was performed with temporary security credentials that were * obtained using the AssumeRole operation of the Security Token Service (STS) API, * the identifiers, session context, and other details about the identity.

*/ inline void SetAssumedRole(AssumedRole&& value) { m_assumedRoleHasBeenSet = true; m_assumedRole = std::move(value); } /** *

If the action was performed with temporary security credentials that were * obtained using the AssumeRole operation of the Security Token Service (STS) API, * the identifiers, session context, and other details about the identity.

*/ inline UserIdentity& WithAssumedRole(const AssumedRole& value) { SetAssumedRole(value); return *this;} /** *

If the action was performed with temporary security credentials that were * obtained using the AssumeRole operation of the Security Token Service (STS) API, * the identifiers, session context, and other details about the identity.

*/ inline UserIdentity& WithAssumedRole(AssumedRole&& value) { SetAssumedRole(std::move(value)); return *this;} /** *

If the action was performed using the credentials for another Amazon Web * Services account, the details of that account.

*/ inline const AwsAccount& GetAwsAccount() const{ return m_awsAccount; } /** *

If the action was performed using the credentials for another Amazon Web * Services account, the details of that account.

*/ inline bool AwsAccountHasBeenSet() const { return m_awsAccountHasBeenSet; } /** *

If the action was performed using the credentials for another Amazon Web * Services account, the details of that account.

*/ inline void SetAwsAccount(const AwsAccount& value) { m_awsAccountHasBeenSet = true; m_awsAccount = value; } /** *

If the action was performed using the credentials for another Amazon Web * Services account, the details of that account.

*/ inline void SetAwsAccount(AwsAccount&& value) { m_awsAccountHasBeenSet = true; m_awsAccount = std::move(value); } /** *

If the action was performed using the credentials for another Amazon Web * Services account, the details of that account.

*/ inline UserIdentity& WithAwsAccount(const AwsAccount& value) { SetAwsAccount(value); return *this;} /** *

If the action was performed using the credentials for another Amazon Web * Services account, the details of that account.

*/ inline UserIdentity& WithAwsAccount(AwsAccount&& value) { SetAwsAccount(std::move(value)); return *this;} /** *

If the action was performed by an Amazon Web Services account that belongs to * an Amazon Web Service, the name of the service.

*/ inline const AwsService& GetAwsService() const{ return m_awsService; } /** *

If the action was performed by an Amazon Web Services account that belongs to * an Amazon Web Service, the name of the service.

*/ inline bool AwsServiceHasBeenSet() const { return m_awsServiceHasBeenSet; } /** *

If the action was performed by an Amazon Web Services account that belongs to * an Amazon Web Service, the name of the service.

*/ inline void SetAwsService(const AwsService& value) { m_awsServiceHasBeenSet = true; m_awsService = value; } /** *

If the action was performed by an Amazon Web Services account that belongs to * an Amazon Web Service, the name of the service.

*/ inline void SetAwsService(AwsService&& value) { m_awsServiceHasBeenSet = true; m_awsService = std::move(value); } /** *

If the action was performed by an Amazon Web Services account that belongs to * an Amazon Web Service, the name of the service.

*/ inline UserIdentity& WithAwsService(const AwsService& value) { SetAwsService(value); return *this;} /** *

If the action was performed by an Amazon Web Services account that belongs to * an Amazon Web Service, the name of the service.

*/ inline UserIdentity& WithAwsService(AwsService&& value) { SetAwsService(std::move(value)); return *this;} /** *

If the action was performed with temporary security credentials that were * obtained using the GetFederationToken operation of the Security Token Service * (STS) API, the identifiers, session context, and other details about the * identity.

*/ inline const FederatedUser& GetFederatedUser() const{ return m_federatedUser; } /** *

If the action was performed with temporary security credentials that were * obtained using the GetFederationToken operation of the Security Token Service * (STS) API, the identifiers, session context, and other details about the * identity.

*/ inline bool FederatedUserHasBeenSet() const { return m_federatedUserHasBeenSet; } /** *

If the action was performed with temporary security credentials that were * obtained using the GetFederationToken operation of the Security Token Service * (STS) API, the identifiers, session context, and other details about the * identity.

*/ inline void SetFederatedUser(const FederatedUser& value) { m_federatedUserHasBeenSet = true; m_federatedUser = value; } /** *

If the action was performed with temporary security credentials that were * obtained using the GetFederationToken operation of the Security Token Service * (STS) API, the identifiers, session context, and other details about the * identity.

*/ inline void SetFederatedUser(FederatedUser&& value) { m_federatedUserHasBeenSet = true; m_federatedUser = std::move(value); } /** *

If the action was performed with temporary security credentials that were * obtained using the GetFederationToken operation of the Security Token Service * (STS) API, the identifiers, session context, and other details about the * identity.

*/ inline UserIdentity& WithFederatedUser(const FederatedUser& value) { SetFederatedUser(value); return *this;} /** *

If the action was performed with temporary security credentials that were * obtained using the GetFederationToken operation of the Security Token Service * (STS) API, the identifiers, session context, and other details about the * identity.

*/ inline UserIdentity& WithFederatedUser(FederatedUser&& value) { SetFederatedUser(std::move(value)); return *this;} /** *

If the action was performed using the credentials for an Identity and Access * Management (IAM) user, the name and other details about the user.

*/ inline const IamUser& GetIamUser() const{ return m_iamUser; } /** *

If the action was performed using the credentials for an Identity and Access * Management (IAM) user, the name and other details about the user.

*/ inline bool IamUserHasBeenSet() const { return m_iamUserHasBeenSet; } /** *

If the action was performed using the credentials for an Identity and Access * Management (IAM) user, the name and other details about the user.

*/ inline void SetIamUser(const IamUser& value) { m_iamUserHasBeenSet = true; m_iamUser = value; } /** *

If the action was performed using the credentials for an Identity and Access * Management (IAM) user, the name and other details about the user.

*/ inline void SetIamUser(IamUser&& value) { m_iamUserHasBeenSet = true; m_iamUser = std::move(value); } /** *

If the action was performed using the credentials for an Identity and Access * Management (IAM) user, the name and other details about the user.

*/ inline UserIdentity& WithIamUser(const IamUser& value) { SetIamUser(value); return *this;} /** *

If the action was performed using the credentials for an Identity and Access * Management (IAM) user, the name and other details about the user.

*/ inline UserIdentity& WithIamUser(IamUser&& value) { SetIamUser(std::move(value)); return *this;} /** *

If the action was performed using the credentials for your Amazon Web * Services account, the details of your account.

*/ inline const UserIdentityRoot& GetRoot() const{ return m_root; } /** *

If the action was performed using the credentials for your Amazon Web * Services account, the details of your account.

*/ inline bool RootHasBeenSet() const { return m_rootHasBeenSet; } /** *

If the action was performed using the credentials for your Amazon Web * Services account, the details of your account.

*/ inline void SetRoot(const UserIdentityRoot& value) { m_rootHasBeenSet = true; m_root = value; } /** *

If the action was performed using the credentials for your Amazon Web * Services account, the details of your account.

*/ inline void SetRoot(UserIdentityRoot&& value) { m_rootHasBeenSet = true; m_root = std::move(value); } /** *

If the action was performed using the credentials for your Amazon Web * Services account, the details of your account.

*/ inline UserIdentity& WithRoot(const UserIdentityRoot& value) { SetRoot(value); return *this;} /** *

If the action was performed using the credentials for your Amazon Web * Services account, the details of your account.

*/ inline UserIdentity& WithRoot(UserIdentityRoot&& value) { SetRoot(std::move(value)); return *this;} /** *

The type of entity that performed the action.

*/ inline const UserIdentityType& GetType() const{ return m_type; } /** *

The type of entity that performed the action.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of entity that performed the action.

*/ inline void SetType(const UserIdentityType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of entity that performed the action.

*/ inline void SetType(UserIdentityType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of entity that performed the action.

*/ inline UserIdentity& WithType(const UserIdentityType& value) { SetType(value); return *this;} /** *

The type of entity that performed the action.

*/ inline UserIdentity& WithType(UserIdentityType&& value) { SetType(std::move(value)); return *this;} private: AssumedRole m_assumedRole; bool m_assumedRoleHasBeenSet = false; AwsAccount m_awsAccount; bool m_awsAccountHasBeenSet = false; AwsService m_awsService; bool m_awsServiceHasBeenSet = false; FederatedUser m_federatedUser; bool m_federatedUserHasBeenSet = false; IamUser m_iamUser; bool m_iamUserHasBeenSet = false; UserIdentityRoot m_root; bool m_rootHasBeenSet = false; UserIdentityType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace Macie2 } // namespace Aws