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

The IAM principal that you allowing or denying access to an Amazon Lex * action. You must provide a service or an arn, but not * both in the same statement. For more information, see * AWS JSON policy elements: Principal .

See Also:

AWS * API Reference

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

The name of the Amazon Web Services service that should allowed or denied * access to an Amazon Lex action.

*/ inline const Aws::String& GetService() const{ return m_service; } /** *

The name of the Amazon Web Services service that should allowed or denied * access to an Amazon Lex action.

*/ inline bool ServiceHasBeenSet() const { return m_serviceHasBeenSet; } /** *

The name of the Amazon Web Services service that should allowed or denied * access to an Amazon Lex action.

*/ inline void SetService(const Aws::String& value) { m_serviceHasBeenSet = true; m_service = value; } /** *

The name of the Amazon Web Services service that should allowed or denied * access to an Amazon Lex action.

*/ inline void SetService(Aws::String&& value) { m_serviceHasBeenSet = true; m_service = std::move(value); } /** *

The name of the Amazon Web Services service that should allowed or denied * access to an Amazon Lex action.

*/ inline void SetService(const char* value) { m_serviceHasBeenSet = true; m_service.assign(value); } /** *

The name of the Amazon Web Services service that should allowed or denied * access to an Amazon Lex action.

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

The name of the Amazon Web Services service that should allowed or denied * access to an Amazon Lex action.

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

The name of the Amazon Web Services service that should allowed or denied * access to an Amazon Lex action.

*/ inline Principal& WithService(const char* value) { SetService(value); return *this;} /** *

The Amazon Resource Name (ARN) of the principal.

*/ inline const Aws::String& GetArn() const{ return m_arn; } /** *

The Amazon Resource Name (ARN) of the principal.

*/ inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the principal.

*/ inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } /** *

The Amazon Resource Name (ARN) of the principal.

*/ inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the principal.

*/ inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } /** *

The Amazon Resource Name (ARN) of the principal.

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

The Amazon Resource Name (ARN) of the principal.

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

The Amazon Resource Name (ARN) of the principal.

*/ inline Principal& WithArn(const char* value) { SetArn(value); return *this;} private: Aws::String m_service; bool m_serviceHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; }; } // namespace Model } // namespace LexModelsV2 } // namespace Aws