/** * 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 namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace VerifiedPermissions { namespace Model { class IsAuthorizedResult { public: AWS_VERIFIEDPERMISSIONS_API IsAuthorizedResult(); AWS_VERIFIEDPERMISSIONS_API IsAuthorizedResult(const Aws::AmazonWebServiceResult& result); AWS_VERIFIEDPERMISSIONS_API IsAuthorizedResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

An authorization decision that indicates if the authorization request should * be allowed or denied.

*/ inline const Decision& GetDecision() const{ return m_decision; } /** *

An authorization decision that indicates if the authorization request should * be allowed or denied.

*/ inline void SetDecision(const Decision& value) { m_decision = value; } /** *

An authorization decision that indicates if the authorization request should * be allowed or denied.

*/ inline void SetDecision(Decision&& value) { m_decision = std::move(value); } /** *

An authorization decision that indicates if the authorization request should * be allowed or denied.

*/ inline IsAuthorizedResult& WithDecision(const Decision& value) { SetDecision(value); return *this;} /** *

An authorization decision that indicates if the authorization request should * be allowed or denied.

*/ inline IsAuthorizedResult& WithDecision(Decision&& value) { SetDecision(std::move(value)); return *this;} /** *

The list of determining policies used to make the authorization decision. For * example, if there are two matching policies, where one is a forbid and the other * is a permit, then the forbid policy will be the determining policy. In the case * of multiple matching permit policies then there would be multiple determining * policies. In the case that no policies match, and hence the response is DENY, * there would be no determining policies.

*/ inline const Aws::Vector& GetDeterminingPolicies() const{ return m_determiningPolicies; } /** *

The list of determining policies used to make the authorization decision. For * example, if there are two matching policies, where one is a forbid and the other * is a permit, then the forbid policy will be the determining policy. In the case * of multiple matching permit policies then there would be multiple determining * policies. In the case that no policies match, and hence the response is DENY, * there would be no determining policies.

*/ inline void SetDeterminingPolicies(const Aws::Vector& value) { m_determiningPolicies = value; } /** *

The list of determining policies used to make the authorization decision. For * example, if there are two matching policies, where one is a forbid and the other * is a permit, then the forbid policy will be the determining policy. In the case * of multiple matching permit policies then there would be multiple determining * policies. In the case that no policies match, and hence the response is DENY, * there would be no determining policies.

*/ inline void SetDeterminingPolicies(Aws::Vector&& value) { m_determiningPolicies = std::move(value); } /** *

The list of determining policies used to make the authorization decision. For * example, if there are two matching policies, where one is a forbid and the other * is a permit, then the forbid policy will be the determining policy. In the case * of multiple matching permit policies then there would be multiple determining * policies. In the case that no policies match, and hence the response is DENY, * there would be no determining policies.

*/ inline IsAuthorizedResult& WithDeterminingPolicies(const Aws::Vector& value) { SetDeterminingPolicies(value); return *this;} /** *

The list of determining policies used to make the authorization decision. For * example, if there are two matching policies, where one is a forbid and the other * is a permit, then the forbid policy will be the determining policy. In the case * of multiple matching permit policies then there would be multiple determining * policies. In the case that no policies match, and hence the response is DENY, * there would be no determining policies.

*/ inline IsAuthorizedResult& WithDeterminingPolicies(Aws::Vector&& value) { SetDeterminingPolicies(std::move(value)); return *this;} /** *

The list of determining policies used to make the authorization decision. For * example, if there are two matching policies, where one is a forbid and the other * is a permit, then the forbid policy will be the determining policy. In the case * of multiple matching permit policies then there would be multiple determining * policies. In the case that no policies match, and hence the response is DENY, * there would be no determining policies.

*/ inline IsAuthorizedResult& AddDeterminingPolicies(const DeterminingPolicyItem& value) { m_determiningPolicies.push_back(value); return *this; } /** *

The list of determining policies used to make the authorization decision. For * example, if there are two matching policies, where one is a forbid and the other * is a permit, then the forbid policy will be the determining policy. In the case * of multiple matching permit policies then there would be multiple determining * policies. In the case that no policies match, and hence the response is DENY, * there would be no determining policies.

*/ inline IsAuthorizedResult& AddDeterminingPolicies(DeterminingPolicyItem&& value) { m_determiningPolicies.push_back(std::move(value)); return *this; } /** *

Errors that occurred while making an authorization decision, for example, a * policy references an Entity or entity Attribute that does not exist in the * slice.

*/ inline const Aws::Vector& GetErrors() const{ return m_errors; } /** *

Errors that occurred while making an authorization decision, for example, a * policy references an Entity or entity Attribute that does not exist in the * slice.

*/ inline void SetErrors(const Aws::Vector& value) { m_errors = value; } /** *

Errors that occurred while making an authorization decision, for example, a * policy references an Entity or entity Attribute that does not exist in the * slice.

*/ inline void SetErrors(Aws::Vector&& value) { m_errors = std::move(value); } /** *

Errors that occurred while making an authorization decision, for example, a * policy references an Entity or entity Attribute that does not exist in the * slice.

*/ inline IsAuthorizedResult& WithErrors(const Aws::Vector& value) { SetErrors(value); return *this;} /** *

Errors that occurred while making an authorization decision, for example, a * policy references an Entity or entity Attribute that does not exist in the * slice.

*/ inline IsAuthorizedResult& WithErrors(Aws::Vector&& value) { SetErrors(std::move(value)); return *this;} /** *

Errors that occurred while making an authorization decision, for example, a * policy references an Entity or entity Attribute that does not exist in the * slice.

*/ inline IsAuthorizedResult& AddErrors(const EvaluationErrorItem& value) { m_errors.push_back(value); return *this; } /** *

Errors that occurred while making an authorization decision, for example, a * policy references an Entity or entity Attribute that does not exist in the * slice.

*/ inline IsAuthorizedResult& AddErrors(EvaluationErrorItem&& value) { m_errors.push_back(std::move(value)); return *this; } inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline IsAuthorizedResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline IsAuthorizedResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline IsAuthorizedResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Decision m_decision; Aws::Vector m_determiningPolicies; Aws::Vector m_errors; Aws::String m_requestId; }; } // namespace Model } // namespace VerifiedPermissions } // namespace Aws