/** * 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 Http { class URI; } //namespace Http namespace IoT { namespace Model { /** *

The input for the CreatePolicyVersion operation.

See Also:

* AWS * API Reference

*/ class CreatePolicyVersionRequest : public IoTRequest { public: AWS_IOT_API CreatePolicyVersionRequest(); // 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 "CreatePolicyVersion"; } AWS_IOT_API Aws::String SerializePayload() const override; AWS_IOT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; /** *

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 CreatePolicyVersionRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The policy name.

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

The policy name.

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

The JSON document that describes the policy. Minimum length of 1. Maximum * length of 2048, excluding whitespace.

*/ inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; } /** *

The JSON document that describes the policy. Minimum length of 1. Maximum * length of 2048, excluding whitespace.

*/ inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; } /** *

The JSON document that describes the policy. Minimum length of 1. Maximum * length of 2048, excluding whitespace.

*/ inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; } /** *

The JSON document that describes the policy. Minimum length of 1. Maximum * length of 2048, excluding whitespace.

*/ inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); } /** *

The JSON document that describes the policy. Minimum length of 1. Maximum * length of 2048, excluding whitespace.

*/ inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); } /** *

The JSON document that describes the policy. Minimum length of 1. Maximum * length of 2048, excluding whitespace.

*/ inline CreatePolicyVersionRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;} /** *

The JSON document that describes the policy. Minimum length of 1. Maximum * length of 2048, excluding whitespace.

*/ inline CreatePolicyVersionRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;} /** *

The JSON document that describes the policy. Minimum length of 1. Maximum * length of 2048, excluding whitespace.

*/ inline CreatePolicyVersionRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;} /** *

Specifies whether the policy version is set as the default. When this * parameter is true, the new policy version becomes the operative version (that * is, the version that is in effect for the certificates to which the policy is * attached).

*/ inline bool GetSetAsDefault() const{ return m_setAsDefault; } /** *

Specifies whether the policy version is set as the default. When this * parameter is true, the new policy version becomes the operative version (that * is, the version that is in effect for the certificates to which the policy is * attached).

*/ inline bool SetAsDefaultHasBeenSet() const { return m_setAsDefaultHasBeenSet; } /** *

Specifies whether the policy version is set as the default. When this * parameter is true, the new policy version becomes the operative version (that * is, the version that is in effect for the certificates to which the policy is * attached).

*/ inline void SetSetAsDefault(bool value) { m_setAsDefaultHasBeenSet = true; m_setAsDefault = value; } /** *

Specifies whether the policy version is set as the default. When this * parameter is true, the new policy version becomes the operative version (that * is, the version that is in effect for the certificates to which the policy is * attached).

*/ inline CreatePolicyVersionRequest& WithSetAsDefault(bool value) { SetSetAsDefault(value); return *this;} private: Aws::String m_policyName; bool m_policyNameHasBeenSet = false; Aws::String m_policyDocument; bool m_policyDocumentHasBeenSet = false; bool m_setAsDefault; bool m_setAsDefaultHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws