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

A rule that maps a claim name, a claim value, and a match type to a role * ARN.

See Also:

AWS * API Reference

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

The claim name that must be present in the token, for example, "isAdmin" or * "paid".

*/ inline const Aws::String& GetClaim() const{ return m_claim; } /** *

The claim name that must be present in the token, for example, "isAdmin" or * "paid".

*/ inline bool ClaimHasBeenSet() const { return m_claimHasBeenSet; } /** *

The claim name that must be present in the token, for example, "isAdmin" or * "paid".

*/ inline void SetClaim(const Aws::String& value) { m_claimHasBeenSet = true; m_claim = value; } /** *

The claim name that must be present in the token, for example, "isAdmin" or * "paid".

*/ inline void SetClaim(Aws::String&& value) { m_claimHasBeenSet = true; m_claim = std::move(value); } /** *

The claim name that must be present in the token, for example, "isAdmin" or * "paid".

*/ inline void SetClaim(const char* value) { m_claimHasBeenSet = true; m_claim.assign(value); } /** *

The claim name that must be present in the token, for example, "isAdmin" or * "paid".

*/ inline MappingRule& WithClaim(const Aws::String& value) { SetClaim(value); return *this;} /** *

The claim name that must be present in the token, for example, "isAdmin" or * "paid".

*/ inline MappingRule& WithClaim(Aws::String&& value) { SetClaim(std::move(value)); return *this;} /** *

The claim name that must be present in the token, for example, "isAdmin" or * "paid".

*/ inline MappingRule& WithClaim(const char* value) { SetClaim(value); return *this;} /** *

The match condition that specifies how closely the claim value in the IdP * token must match Value.

*/ inline const MappingRuleMatchType& GetMatchType() const{ return m_matchType; } /** *

The match condition that specifies how closely the claim value in the IdP * token must match Value.

*/ inline bool MatchTypeHasBeenSet() const { return m_matchTypeHasBeenSet; } /** *

The match condition that specifies how closely the claim value in the IdP * token must match Value.

*/ inline void SetMatchType(const MappingRuleMatchType& value) { m_matchTypeHasBeenSet = true; m_matchType = value; } /** *

The match condition that specifies how closely the claim value in the IdP * token must match Value.

*/ inline void SetMatchType(MappingRuleMatchType&& value) { m_matchTypeHasBeenSet = true; m_matchType = std::move(value); } /** *

The match condition that specifies how closely the claim value in the IdP * token must match Value.

*/ inline MappingRule& WithMatchType(const MappingRuleMatchType& value) { SetMatchType(value); return *this;} /** *

The match condition that specifies how closely the claim value in the IdP * token must match Value.

*/ inline MappingRule& WithMatchType(MappingRuleMatchType&& value) { SetMatchType(std::move(value)); return *this;} /** *

A brief string that the claim must match, for example, "paid" or "yes".

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

A brief string that the claim must match, for example, "paid" or "yes".

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

A brief string that the claim must match, for example, "paid" or "yes".

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

A brief string that the claim must match, for example, "paid" or "yes".

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

A brief string that the claim must match, for example, "paid" or "yes".

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

A brief string that the claim must match, for example, "paid" or "yes".

*/ inline MappingRule& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

A brief string that the claim must match, for example, "paid" or "yes".

*/ inline MappingRule& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

A brief string that the claim must match, for example, "paid" or "yes".

*/ inline MappingRule& WithValue(const char* value) { SetValue(value); return *this;} /** *

The role ARN.

*/ inline const Aws::String& GetRoleARN() const{ return m_roleARN; } /** *

The role ARN.

*/ inline bool RoleARNHasBeenSet() const { return m_roleARNHasBeenSet; } /** *

The role ARN.

*/ inline void SetRoleARN(const Aws::String& value) { m_roleARNHasBeenSet = true; m_roleARN = value; } /** *

The role ARN.

*/ inline void SetRoleARN(Aws::String&& value) { m_roleARNHasBeenSet = true; m_roleARN = std::move(value); } /** *

The role ARN.

*/ inline void SetRoleARN(const char* value) { m_roleARNHasBeenSet = true; m_roleARN.assign(value); } /** *

The role ARN.

*/ inline MappingRule& WithRoleARN(const Aws::String& value) { SetRoleARN(value); return *this;} /** *

The role ARN.

*/ inline MappingRule& WithRoleARN(Aws::String&& value) { SetRoleARN(std::move(value)); return *this;} /** *

The role ARN.

*/ inline MappingRule& WithRoleARN(const char* value) { SetRoleARN(value); return *this;} private: Aws::String m_claim; bool m_claimHasBeenSet = false; MappingRuleMatchType m_matchType; bool m_matchTypeHasBeenSet = false; Aws::String m_value; bool m_valueHasBeenSet = false; Aws::String m_roleARN; bool m_roleARNHasBeenSet = false; }; } // namespace Model } // namespace CognitoIdentity } // namespace Aws