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

Describes a principal for use with AWS Resource Access Manager.

See * Also:

AWS API * Reference

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

The ID of the principal.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The ID of the principal.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The ID of the principal.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The ID of the principal.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The ID of the principal.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The ID of the principal.

*/ inline Principal& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The ID of the principal.

*/ inline Principal& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The ID of the principal.

*/ inline Principal& WithId(const char* value) { SetId(value); return *this;} /** *

The Amazon Resource Name (ARN) of the resource share.

*/ inline const Aws::String& GetResourceShareArn() const{ return m_resourceShareArn; } /** *

The Amazon Resource Name (ARN) of the resource share.

*/ inline bool ResourceShareArnHasBeenSet() const { return m_resourceShareArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the resource share.

*/ inline void SetResourceShareArn(const Aws::String& value) { m_resourceShareArnHasBeenSet = true; m_resourceShareArn = value; } /** *

The Amazon Resource Name (ARN) of the resource share.

*/ inline void SetResourceShareArn(Aws::String&& value) { m_resourceShareArnHasBeenSet = true; m_resourceShareArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the resource share.

*/ inline void SetResourceShareArn(const char* value) { m_resourceShareArnHasBeenSet = true; m_resourceShareArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the resource share.

*/ inline Principal& WithResourceShareArn(const Aws::String& value) { SetResourceShareArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the resource share.

*/ inline Principal& WithResourceShareArn(Aws::String&& value) { SetResourceShareArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the resource share.

*/ inline Principal& WithResourceShareArn(const char* value) { SetResourceShareArn(value); return *this;} /** *

The time when the principal was associated with the resource share.

*/ inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; } /** *

The time when the principal was associated with the resource share.

*/ inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; } /** *

The time when the principal was associated with the resource share.

*/ inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; } /** *

The time when the principal was associated with the resource share.

*/ inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); } /** *

The time when the principal was associated with the resource share.

*/ inline Principal& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;} /** *

The time when the principal was associated with the resource share.

*/ inline Principal& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(std::move(value)); return *this;} /** *

The time when the association was last updated.

*/ inline const Aws::Utils::DateTime& GetLastUpdatedTime() const{ return m_lastUpdatedTime; } /** *

The time when the association was last updated.

*/ inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; } /** *

The time when the association was last updated.

*/ inline void SetLastUpdatedTime(const Aws::Utils::DateTime& value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = value; } /** *

The time when the association was last updated.

*/ inline void SetLastUpdatedTime(Aws::Utils::DateTime&& value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = std::move(value); } /** *

The time when the association was last updated.

*/ inline Principal& WithLastUpdatedTime(const Aws::Utils::DateTime& value) { SetLastUpdatedTime(value); return *this;} /** *

The time when the association was last updated.

*/ inline Principal& WithLastUpdatedTime(Aws::Utils::DateTime&& value) { SetLastUpdatedTime(std::move(value)); return *this;} /** *

Indicates whether the principal belongs to the same AWS organization as the * AWS account that owns the resource share.

*/ inline bool GetExternal() const{ return m_external; } /** *

Indicates whether the principal belongs to the same AWS organization as the * AWS account that owns the resource share.

*/ inline bool ExternalHasBeenSet() const { return m_externalHasBeenSet; } /** *

Indicates whether the principal belongs to the same AWS organization as the * AWS account that owns the resource share.

*/ inline void SetExternal(bool value) { m_externalHasBeenSet = true; m_external = value; } /** *

Indicates whether the principal belongs to the same AWS organization as the * AWS account that owns the resource share.

*/ inline Principal& WithExternal(bool value) { SetExternal(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet; Aws::String m_resourceShareArn; bool m_resourceShareArnHasBeenSet; Aws::Utils::DateTime m_creationTime; bool m_creationTimeHasBeenSet; Aws::Utils::DateTime m_lastUpdatedTime; bool m_lastUpdatedTimeHasBeenSet; bool m_external; bool m_externalHasBeenSet; }; } // namespace Model } // namespace RAM } // namespace Aws