/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Provides user and group information for user
* context filtering.See Also:
AWS
* API Reference
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 document access to the principal.
*/ inline const ReadAccessType& GetAccess() const{ return m_access; } /** *Whether to allow or deny document access to the principal.
*/ inline bool AccessHasBeenSet() const { return m_accessHasBeenSet; } /** *Whether to allow or deny document access to the principal.
*/ inline void SetAccess(const ReadAccessType& value) { m_accessHasBeenSet = true; m_access = value; } /** *Whether to allow or deny document access to the principal.
*/ inline void SetAccess(ReadAccessType&& value) { m_accessHasBeenSet = true; m_access = std::move(value); } /** *Whether to allow or deny document access to the principal.
*/ inline Principal& WithAccess(const ReadAccessType& value) { SetAccess(value); return *this;} /** *Whether to allow or deny document access to the principal.
*/ inline Principal& WithAccess(ReadAccessType&& value) { SetAccess(std::move(value)); return *this;} /** *The identifier of the data source the principal should access documents * from.
*/ inline const Aws::String& GetDataSourceId() const{ return m_dataSourceId; } /** *The identifier of the data source the principal should access documents * from.
*/ inline bool DataSourceIdHasBeenSet() const { return m_dataSourceIdHasBeenSet; } /** *The identifier of the data source the principal should access documents * from.
*/ inline void SetDataSourceId(const Aws::String& value) { m_dataSourceIdHasBeenSet = true; m_dataSourceId = value; } /** *The identifier of the data source the principal should access documents * from.
*/ inline void SetDataSourceId(Aws::String&& value) { m_dataSourceIdHasBeenSet = true; m_dataSourceId = std::move(value); } /** *The identifier of the data source the principal should access documents * from.
*/ inline void SetDataSourceId(const char* value) { m_dataSourceIdHasBeenSet = true; m_dataSourceId.assign(value); } /** *The identifier of the data source the principal should access documents * from.
*/ inline Principal& WithDataSourceId(const Aws::String& value) { SetDataSourceId(value); return *this;} /** *The identifier of the data source the principal should access documents * from.
*/ inline Principal& WithDataSourceId(Aws::String&& value) { SetDataSourceId(std::move(value)); return *this;} /** *The identifier of the data source the principal should access documents * from.
*/ inline Principal& WithDataSourceId(const char* value) { SetDataSourceId(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; PrincipalType m_type; bool m_typeHasBeenSet = false; ReadAccessType m_access; bool m_accessHasBeenSet = false; Aws::String m_dataSourceId; bool m_dataSourceIdHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws