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

A location in a policy that is represented as a path through the JSON * representation and a corresponding span.

See Also:

AWS * API Reference

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

A path in a policy, represented as a sequence of path elements.

*/ inline const Aws::Vector& GetPath() const{ return m_path; } /** *

A path in a policy, represented as a sequence of path elements.

*/ inline bool PathHasBeenSet() const { return m_pathHasBeenSet; } /** *

A path in a policy, represented as a sequence of path elements.

*/ inline void SetPath(const Aws::Vector& value) { m_pathHasBeenSet = true; m_path = value; } /** *

A path in a policy, represented as a sequence of path elements.

*/ inline void SetPath(Aws::Vector&& value) { m_pathHasBeenSet = true; m_path = std::move(value); } /** *

A path in a policy, represented as a sequence of path elements.

*/ inline Location& WithPath(const Aws::Vector& value) { SetPath(value); return *this;} /** *

A path in a policy, represented as a sequence of path elements.

*/ inline Location& WithPath(Aws::Vector&& value) { SetPath(std::move(value)); return *this;} /** *

A path in a policy, represented as a sequence of path elements.

*/ inline Location& AddPath(const PathElement& value) { m_pathHasBeenSet = true; m_path.push_back(value); return *this; } /** *

A path in a policy, represented as a sequence of path elements.

*/ inline Location& AddPath(PathElement&& value) { m_pathHasBeenSet = true; m_path.push_back(std::move(value)); return *this; } /** *

A span in a policy.

*/ inline const Span& GetSpan() const{ return m_span; } /** *

A span in a policy.

*/ inline bool SpanHasBeenSet() const { return m_spanHasBeenSet; } /** *

A span in a policy.

*/ inline void SetSpan(const Span& value) { m_spanHasBeenSet = true; m_span = value; } /** *

A span in a policy.

*/ inline void SetSpan(Span&& value) { m_spanHasBeenSet = true; m_span = std::move(value); } /** *

A span in a policy.

*/ inline Location& WithSpan(const Span& value) { SetSpan(value); return *this;} /** *

A span in a policy.

*/ inline Location& WithSpan(Span&& value) { SetSpan(std::move(value)); return *this;} private: Aws::Vector m_path; bool m_pathHasBeenSet = false; Span m_span; bool m_spanHasBeenSet = false; }; } // namespace Model } // namespace AccessAnalyzer } // namespace Aws