/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace IoT { namespace Model { /** */ class DetachPolicyRequest : public IoTRequest { public: AWS_IOT_API DetachPolicyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "DetachPolicy"; } AWS_IOT_API Aws::String SerializePayload() const override; /** *

The policy to detach.

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

The policy to detach.

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

The policy to detach.

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

The policy to detach.

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

The policy to detach.

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

The policy to detach.

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

The policy to detach.

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

The policy to detach.

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

The target from which the policy will be detached.

*/ inline const Aws::String& GetTarget() const{ return m_target; } /** *

The target from which the policy will be detached.

*/ inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; } /** *

The target from which the policy will be detached.

*/ inline void SetTarget(const Aws::String& value) { m_targetHasBeenSet = true; m_target = value; } /** *

The target from which the policy will be detached.

*/ inline void SetTarget(Aws::String&& value) { m_targetHasBeenSet = true; m_target = std::move(value); } /** *

The target from which the policy will be detached.

*/ inline void SetTarget(const char* value) { m_targetHasBeenSet = true; m_target.assign(value); } /** *

The target from which the policy will be detached.

*/ inline DetachPolicyRequest& WithTarget(const Aws::String& value) { SetTarget(value); return *this;} /** *

The target from which the policy will be detached.

*/ inline DetachPolicyRequest& WithTarget(Aws::String&& value) { SetTarget(std::move(value)); return *this;} /** *

The target from which the policy will be detached.

*/ inline DetachPolicyRequest& WithTarget(const char* value) { SetTarget(value); return *this;} private: Aws::String m_policyName; bool m_policyNameHasBeenSet = false; Aws::String m_target; bool m_targetHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws