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

Describes an IoT policy.

See Also:

AWS API * Reference

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

The policy name.

*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The policy name.

*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The policy name.

*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The policy name.

*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The policy name.

*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The policy name.

*/ inline Policy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The policy name.

*/ inline Policy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The policy name.

*/ inline Policy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *

The policy ARN.

*/ inline const Aws::String& GetPolicyArn() const{ return m_policyArn; } /** *

The policy ARN.

*/ inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; } /** *

The policy ARN.

*/ inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; } /** *

The policy ARN.

*/ inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::move(value); } /** *

The policy ARN.

*/ inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); } /** *

The policy ARN.

*/ inline Policy& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;} /** *

The policy ARN.

*/ inline Policy& WithPolicyArn(Aws::String&& value) { SetPolicyArn(std::move(value)); return *this;} /** *

The policy ARN.

*/ inline Policy& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} private: Aws::String m_policyName; bool m_policyNameHasBeenSet = false; Aws::String m_policyArn; bool m_policyArnHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws