/** * 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 ElasticsearchService { namespace Model { /** *

Information about an account or service that has access to an Amazon * OpenSearch Service domain through the use of an interface VPC * endpoint.

See Also:

AWS * API Reference

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

The type of principal.

*/ inline const PrincipalType& GetPrincipalType() const{ return m_principalType; } /** *

The type of principal.

*/ inline bool PrincipalTypeHasBeenSet() const { return m_principalTypeHasBeenSet; } /** *

The type of principal.

*/ inline void SetPrincipalType(const PrincipalType& value) { m_principalTypeHasBeenSet = true; m_principalType = value; } /** *

The type of principal.

*/ inline void SetPrincipalType(PrincipalType&& value) { m_principalTypeHasBeenSet = true; m_principalType = std::move(value); } /** *

The type of principal.

*/ inline AuthorizedPrincipal& WithPrincipalType(const PrincipalType& value) { SetPrincipalType(value); return *this;} /** *

The type of principal.

*/ inline AuthorizedPrincipal& WithPrincipalType(PrincipalType&& value) { SetPrincipalType(std::move(value)); return *this;} /** *

The IAM principal that is allowed access to the domain.

*/ inline const Aws::String& GetPrincipal() const{ return m_principal; } /** *

The IAM principal that is allowed access to the domain.

*/ inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; } /** *

The IAM principal that is allowed access to the domain.

*/ inline void SetPrincipal(const Aws::String& value) { m_principalHasBeenSet = true; m_principal = value; } /** *

The IAM principal that is allowed access to the domain.

*/ inline void SetPrincipal(Aws::String&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); } /** *

The IAM principal that is allowed access to the domain.

*/ inline void SetPrincipal(const char* value) { m_principalHasBeenSet = true; m_principal.assign(value); } /** *

The IAM principal that is allowed access to the domain.

*/ inline AuthorizedPrincipal& WithPrincipal(const Aws::String& value) { SetPrincipal(value); return *this;} /** *

The IAM principal that is allowed access to the domain.

*/ inline AuthorizedPrincipal& WithPrincipal(Aws::String&& value) { SetPrincipal(std::move(value)); return *this;} /** *

The IAM principal that is allowed access to the domain.

*/ inline AuthorizedPrincipal& WithPrincipal(const char* value) { SetPrincipal(value); return *this;} private: PrincipalType m_principalType; bool m_principalTypeHasBeenSet = false; Aws::String m_principal; bool m_principalHasBeenSet = false; }; } // namespace Model } // namespace ElasticsearchService } // namespace Aws