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

Contains a reference to a Statement element in a policy document * that determines the result of the simulation.

This data type is used by * the MatchedStatements member of the EvaluationResult * type.

See Also:

AWS API * Reference

*/ class Statement { public: AWS_IAM_API Statement(); AWS_IAM_API Statement(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_IAM_API Statement& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The identifier of the policy that was provided as an input.

*/ inline const Aws::String& GetSourcePolicyId() const{ return m_sourcePolicyId; } /** *

The identifier of the policy that was provided as an input.

*/ inline bool SourcePolicyIdHasBeenSet() const { return m_sourcePolicyIdHasBeenSet; } /** *

The identifier of the policy that was provided as an input.

*/ inline void SetSourcePolicyId(const Aws::String& value) { m_sourcePolicyIdHasBeenSet = true; m_sourcePolicyId = value; } /** *

The identifier of the policy that was provided as an input.

*/ inline void SetSourcePolicyId(Aws::String&& value) { m_sourcePolicyIdHasBeenSet = true; m_sourcePolicyId = std::move(value); } /** *

The identifier of the policy that was provided as an input.

*/ inline void SetSourcePolicyId(const char* value) { m_sourcePolicyIdHasBeenSet = true; m_sourcePolicyId.assign(value); } /** *

The identifier of the policy that was provided as an input.

*/ inline Statement& WithSourcePolicyId(const Aws::String& value) { SetSourcePolicyId(value); return *this;} /** *

The identifier of the policy that was provided as an input.

*/ inline Statement& WithSourcePolicyId(Aws::String&& value) { SetSourcePolicyId(std::move(value)); return *this;} /** *

The identifier of the policy that was provided as an input.

*/ inline Statement& WithSourcePolicyId(const char* value) { SetSourcePolicyId(value); return *this;} /** *

The type of the policy.

*/ inline const PolicySourceType& GetSourcePolicyType() const{ return m_sourcePolicyType; } /** *

The type of the policy.

*/ inline bool SourcePolicyTypeHasBeenSet() const { return m_sourcePolicyTypeHasBeenSet; } /** *

The type of the policy.

*/ inline void SetSourcePolicyType(const PolicySourceType& value) { m_sourcePolicyTypeHasBeenSet = true; m_sourcePolicyType = value; } /** *

The type of the policy.

*/ inline void SetSourcePolicyType(PolicySourceType&& value) { m_sourcePolicyTypeHasBeenSet = true; m_sourcePolicyType = std::move(value); } /** *

The type of the policy.

*/ inline Statement& WithSourcePolicyType(const PolicySourceType& value) { SetSourcePolicyType(value); return *this;} /** *

The type of the policy.

*/ inline Statement& WithSourcePolicyType(PolicySourceType&& value) { SetSourcePolicyType(std::move(value)); return *this;} /** *

The row and column of the beginning of the Statement in an IAM * policy.

*/ inline const Position& GetStartPosition() const{ return m_startPosition; } /** *

The row and column of the beginning of the Statement in an IAM * policy.

*/ inline bool StartPositionHasBeenSet() const { return m_startPositionHasBeenSet; } /** *

The row and column of the beginning of the Statement in an IAM * policy.

*/ inline void SetStartPosition(const Position& value) { m_startPositionHasBeenSet = true; m_startPosition = value; } /** *

The row and column of the beginning of the Statement in an IAM * policy.

*/ inline void SetStartPosition(Position&& value) { m_startPositionHasBeenSet = true; m_startPosition = std::move(value); } /** *

The row and column of the beginning of the Statement in an IAM * policy.

*/ inline Statement& WithStartPosition(const Position& value) { SetStartPosition(value); return *this;} /** *

The row and column of the beginning of the Statement in an IAM * policy.

*/ inline Statement& WithStartPosition(Position&& value) { SetStartPosition(std::move(value)); return *this;} /** *

The row and column of the end of a Statement in an IAM * policy.

*/ inline const Position& GetEndPosition() const{ return m_endPosition; } /** *

The row and column of the end of a Statement in an IAM * policy.

*/ inline bool EndPositionHasBeenSet() const { return m_endPositionHasBeenSet; } /** *

The row and column of the end of a Statement in an IAM * policy.

*/ inline void SetEndPosition(const Position& value) { m_endPositionHasBeenSet = true; m_endPosition = value; } /** *

The row and column of the end of a Statement in an IAM * policy.

*/ inline void SetEndPosition(Position&& value) { m_endPositionHasBeenSet = true; m_endPosition = std::move(value); } /** *

The row and column of the end of a Statement in an IAM * policy.

*/ inline Statement& WithEndPosition(const Position& value) { SetEndPosition(value); return *this;} /** *

The row and column of the end of a Statement in an IAM * policy.

*/ inline Statement& WithEndPosition(Position&& value) { SetEndPosition(std::move(value)); return *this;} private: Aws::String m_sourcePolicyId; bool m_sourcePolicyIdHasBeenSet = false; PolicySourceType m_sourcePolicyType; bool m_sourcePolicyTypeHasBeenSet = false; Position m_startPosition; bool m_startPositionHasBeenSet = false; Position m_endPosition; bool m_endPositionHasBeenSet = false; }; } // namespace Model } // namespace IAM } // namespace Aws