/** * 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 imagebuilder { namespace Model { /** */ class PutImagePolicyRequest : public ImagebuilderRequest { public: AWS_IMAGEBUILDER_API PutImagePolicyRequest(); // 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 "PutImagePolicy"; } AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override; /** *

The Amazon Resource Name (ARN) of the image that this policy should be * applied to.

*/ inline const Aws::String& GetImageArn() const{ return m_imageArn; } /** *

The Amazon Resource Name (ARN) of the image that this policy should be * applied to.

*/ inline bool ImageArnHasBeenSet() const { return m_imageArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the image that this policy should be * applied to.

*/ inline void SetImageArn(const Aws::String& value) { m_imageArnHasBeenSet = true; m_imageArn = value; } /** *

The Amazon Resource Name (ARN) of the image that this policy should be * applied to.

*/ inline void SetImageArn(Aws::String&& value) { m_imageArnHasBeenSet = true; m_imageArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the image that this policy should be * applied to.

*/ inline void SetImageArn(const char* value) { m_imageArnHasBeenSet = true; m_imageArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the image that this policy should be * applied to.

*/ inline PutImagePolicyRequest& WithImageArn(const Aws::String& value) { SetImageArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the image that this policy should be * applied to.

*/ inline PutImagePolicyRequest& WithImageArn(Aws::String&& value) { SetImageArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the image that this policy should be * applied to.

*/ inline PutImagePolicyRequest& WithImageArn(const char* value) { SetImageArn(value); return *this;} /** *

The policy to apply.

*/ inline const Aws::String& GetPolicy() const{ return m_policy; } /** *

The policy to apply.

*/ inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; } /** *

The policy to apply.

*/ inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; } /** *

The policy to apply.

*/ inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); } /** *

The policy to apply.

*/ inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); } /** *

The policy to apply.

*/ inline PutImagePolicyRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;} /** *

The policy to apply.

*/ inline PutImagePolicyRequest& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;} /** *

The policy to apply.

*/ inline PutImagePolicyRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;} private: Aws::String m_imageArn; bool m_imageArnHasBeenSet = false; Aws::String m_policy; bool m_policyHasBeenSet = false; }; } // namespace Model } // namespace imagebuilder } // namespace Aws