/** * 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 Resource Access Manager.

See * Also:

AWS API * Reference

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

The ID of the principal that can be associated with a resource share.

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

The ID of the principal that can be associated with a resource share.

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

The ID of the principal that can be associated with a resource share.

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

The ID of the principal that can be associated with a resource share.

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

The ID of the principal that can be associated with a resource share.

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

The ID of the principal that can be associated with a resource share.

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

The ID of the principal that can be associated with a resource share.

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

The ID of the principal that can be associated with a resource share.

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

The Amazon * Resource Name (ARN) of a resource share the principal is associated * with.

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

The Amazon * Resource Name (ARN) of a resource share the principal is associated * with.

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

The Amazon * Resource Name (ARN) of a resource share the principal is associated * with.

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

The Amazon * Resource Name (ARN) of a resource share the principal is associated * with.

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

The Amazon * Resource Name (ARN) of a resource share the principal is associated * with.

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

The Amazon * Resource Name (ARN) of a resource share the principal is associated * with.

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

The Amazon * Resource Name (ARN) of a resource share the principal is associated * with.

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

The Amazon * Resource Name (ARN) of a resource share the principal is associated * with.

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

The date and time when the principal was associated with the resource * share.

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

The date and time when the principal was associated with the resource * share.

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

The date and 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 date and 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 date and time when the principal was associated with the resource * share.

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

The date and time when the principal was associated with the resource * share.

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

The date and time when the association between the resource share and the * principal was last updated.

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

The date and time when the association between the resource share and the * principal was last updated.

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

The date and time when the association between the resource share and the * principal was last updated.

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

The date and time when the association between the resource share and the * principal was last updated.

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

The date and time when the association between the resource share and the * principal was last updated.

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

The date and time when the association between the resource share and the * principal was last updated.

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

Indicates the relationship between the Amazon Web Services account the * principal belongs to and the account that owns the resource share:

  • *

    True – The two accounts belong to same organization.

  • *
  • False – The two accounts do not belong to the same * organization.

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

Indicates the relationship between the Amazon Web Services account the * principal belongs to and the account that owns the resource share:

  • *

    True – The two accounts belong to same organization.

  • *
  • False – The two accounts do not belong to the same * organization.

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

Indicates the relationship between the Amazon Web Services account the * principal belongs to and the account that owns the resource share:

  • *

    True – The two accounts belong to same organization.

  • *
  • False – The two accounts do not belong to the same * organization.

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

Indicates the relationship between the Amazon Web Services account the * principal belongs to and the account that owns the resource share:

  • *

    True – The two accounts belong to same organization.

  • *
  • False – The two accounts do not belong to the same * organization.

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