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

Provides user and group information for document access * filtering.

See Also:

AWS * API Reference

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

The name of the user or group.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the user or group.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the user or group.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the user or group.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the user or group.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the user or group.

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

The name of the user or group.

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

The name of the user or group.

*/ inline Principal& WithName(const char* value) { SetName(value); return *this;} /** *

The type of principal.

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

The type of principal.

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

The type of principal.

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

The type of principal.

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

The type of principal.

*/ inline Principal& WithType(const PrincipalType& value) { SetType(value); return *this;} /** *

The type of principal.

*/ inline Principal& WithType(PrincipalType&& value) { SetType(std::move(value)); return *this;} /** *

Whether to allow or deny access to the principal.

*/ inline const ReadAccessType& GetAccess() const{ return m_access; } /** *

Whether to allow or deny access to the principal.

*/ inline bool AccessHasBeenSet() const { return m_accessHasBeenSet; } /** *

Whether to allow or deny access to the principal.

*/ inline void SetAccess(const ReadAccessType& value) { m_accessHasBeenSet = true; m_access = value; } /** *

Whether to allow or deny access to the principal.

*/ inline void SetAccess(ReadAccessType&& value) { m_accessHasBeenSet = true; m_access = std::move(value); } /** *

Whether to allow or deny access to the principal.

*/ inline Principal& WithAccess(const ReadAccessType& value) { SetAccess(value); return *this;} /** *

Whether to allow or deny access to the principal.

*/ inline Principal& WithAccess(ReadAccessType&& value) { SetAccess(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet; PrincipalType m_type; bool m_typeHasBeenSet; ReadAccessType m_access; bool m_accessHasBeenSet; }; } // namespace Model } // namespace kendra } // namespace Aws