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

The authorizer result.

See Also:

AWS API * Reference

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

Authorization information.

*/ inline const AuthInfo& GetAuthInfo() const{ return m_authInfo; } /** *

Authorization information.

*/ inline bool AuthInfoHasBeenSet() const { return m_authInfoHasBeenSet; } /** *

Authorization information.

*/ inline void SetAuthInfo(const AuthInfo& value) { m_authInfoHasBeenSet = true; m_authInfo = value; } /** *

Authorization information.

*/ inline void SetAuthInfo(AuthInfo&& value) { m_authInfoHasBeenSet = true; m_authInfo = std::move(value); } /** *

Authorization information.

*/ inline AuthResult& WithAuthInfo(const AuthInfo& value) { SetAuthInfo(value); return *this;} /** *

Authorization information.

*/ inline AuthResult& WithAuthInfo(AuthInfo&& value) { SetAuthInfo(std::move(value)); return *this;} /** *

The policies and statements that allowed the specified action.

*/ inline const Allowed& GetAllowed() const{ return m_allowed; } /** *

The policies and statements that allowed the specified action.

*/ inline bool AllowedHasBeenSet() const { return m_allowedHasBeenSet; } /** *

The policies and statements that allowed the specified action.

*/ inline void SetAllowed(const Allowed& value) { m_allowedHasBeenSet = true; m_allowed = value; } /** *

The policies and statements that allowed the specified action.

*/ inline void SetAllowed(Allowed&& value) { m_allowedHasBeenSet = true; m_allowed = std::move(value); } /** *

The policies and statements that allowed the specified action.

*/ inline AuthResult& WithAllowed(const Allowed& value) { SetAllowed(value); return *this;} /** *

The policies and statements that allowed the specified action.

*/ inline AuthResult& WithAllowed(Allowed&& value) { SetAllowed(std::move(value)); return *this;} /** *

The policies and statements that denied the specified action.

*/ inline const Denied& GetDenied() const{ return m_denied; } /** *

The policies and statements that denied the specified action.

*/ inline bool DeniedHasBeenSet() const { return m_deniedHasBeenSet; } /** *

The policies and statements that denied the specified action.

*/ inline void SetDenied(const Denied& value) { m_deniedHasBeenSet = true; m_denied = value; } /** *

The policies and statements that denied the specified action.

*/ inline void SetDenied(Denied&& value) { m_deniedHasBeenSet = true; m_denied = std::move(value); } /** *

The policies and statements that denied the specified action.

*/ inline AuthResult& WithDenied(const Denied& value) { SetDenied(value); return *this;} /** *

The policies and statements that denied the specified action.

*/ inline AuthResult& WithDenied(Denied&& value) { SetDenied(std::move(value)); return *this;} /** *

The final authorization decision of this scenario. Multiple statements are * taken into account when determining the authorization decision. An explicit deny * statement can override multiple allow statements.

*/ inline const AuthDecision& GetAuthDecision() const{ return m_authDecision; } /** *

The final authorization decision of this scenario. Multiple statements are * taken into account when determining the authorization decision. An explicit deny * statement can override multiple allow statements.

*/ inline bool AuthDecisionHasBeenSet() const { return m_authDecisionHasBeenSet; } /** *

The final authorization decision of this scenario. Multiple statements are * taken into account when determining the authorization decision. An explicit deny * statement can override multiple allow statements.

*/ inline void SetAuthDecision(const AuthDecision& value) { m_authDecisionHasBeenSet = true; m_authDecision = value; } /** *

The final authorization decision of this scenario. Multiple statements are * taken into account when determining the authorization decision. An explicit deny * statement can override multiple allow statements.

*/ inline void SetAuthDecision(AuthDecision&& value) { m_authDecisionHasBeenSet = true; m_authDecision = std::move(value); } /** *

The final authorization decision of this scenario. Multiple statements are * taken into account when determining the authorization decision. An explicit deny * statement can override multiple allow statements.

*/ inline AuthResult& WithAuthDecision(const AuthDecision& value) { SetAuthDecision(value); return *this;} /** *

The final authorization decision of this scenario. Multiple statements are * taken into account when determining the authorization decision. An explicit deny * statement can override multiple allow statements.

*/ inline AuthResult& WithAuthDecision(AuthDecision&& value) { SetAuthDecision(std::move(value)); return *this;} /** *

Contains any missing context values found while evaluating policy.

*/ inline const Aws::Vector& GetMissingContextValues() const{ return m_missingContextValues; } /** *

Contains any missing context values found while evaluating policy.

*/ inline bool MissingContextValuesHasBeenSet() const { return m_missingContextValuesHasBeenSet; } /** *

Contains any missing context values found while evaluating policy.

*/ inline void SetMissingContextValues(const Aws::Vector& value) { m_missingContextValuesHasBeenSet = true; m_missingContextValues = value; } /** *

Contains any missing context values found while evaluating policy.

*/ inline void SetMissingContextValues(Aws::Vector&& value) { m_missingContextValuesHasBeenSet = true; m_missingContextValues = std::move(value); } /** *

Contains any missing context values found while evaluating policy.

*/ inline AuthResult& WithMissingContextValues(const Aws::Vector& value) { SetMissingContextValues(value); return *this;} /** *

Contains any missing context values found while evaluating policy.

*/ inline AuthResult& WithMissingContextValues(Aws::Vector&& value) { SetMissingContextValues(std::move(value)); return *this;} /** *

Contains any missing context values found while evaluating policy.

*/ inline AuthResult& AddMissingContextValues(const Aws::String& value) { m_missingContextValuesHasBeenSet = true; m_missingContextValues.push_back(value); return *this; } /** *

Contains any missing context values found while evaluating policy.

*/ inline AuthResult& AddMissingContextValues(Aws::String&& value) { m_missingContextValuesHasBeenSet = true; m_missingContextValues.push_back(std::move(value)); return *this; } /** *

Contains any missing context values found while evaluating policy.

*/ inline AuthResult& AddMissingContextValues(const char* value) { m_missingContextValuesHasBeenSet = true; m_missingContextValues.push_back(value); return *this; } private: AuthInfo m_authInfo; bool m_authInfoHasBeenSet = false; Allowed m_allowed; bool m_allowedHasBeenSet = false; Denied m_denied; bool m_deniedHasBeenSet = false; AuthDecision m_authDecision; bool m_authDecisionHasBeenSet = false; Aws::Vector m_missingContextValues; bool m_missingContextValuesHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws