/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { namespace imagebuilder { namespace Model { /** */ class AWS_IMAGEBUILDER_API CreateImageRecipeRequest : public ImagebuilderRequest { public: CreateImageRecipeRequest(); // 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 "CreateImageRecipe"; } Aws::String SerializePayload() const override; /** *

The name of the image recipe.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the image recipe.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the image recipe.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the image recipe.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the image recipe.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the image recipe.

*/ inline CreateImageRecipeRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the image recipe.

*/ inline CreateImageRecipeRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the image recipe.

*/ inline CreateImageRecipeRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The description of the image recipe.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the image recipe.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the image recipe.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the image recipe.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the image recipe.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the image recipe.

*/ inline CreateImageRecipeRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the image recipe.

*/ inline CreateImageRecipeRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the image recipe.

*/ inline CreateImageRecipeRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The semantic version of the image recipe.

*/ inline const Aws::String& GetSemanticVersion() const{ return m_semanticVersion; } /** *

The semantic version of the image recipe.

*/ inline bool SemanticVersionHasBeenSet() const { return m_semanticVersionHasBeenSet; } /** *

The semantic version of the image recipe.

*/ inline void SetSemanticVersion(const Aws::String& value) { m_semanticVersionHasBeenSet = true; m_semanticVersion = value; } /** *

The semantic version of the image recipe.

*/ inline void SetSemanticVersion(Aws::String&& value) { m_semanticVersionHasBeenSet = true; m_semanticVersion = std::move(value); } /** *

The semantic version of the image recipe.

*/ inline void SetSemanticVersion(const char* value) { m_semanticVersionHasBeenSet = true; m_semanticVersion.assign(value); } /** *

The semantic version of the image recipe.

*/ inline CreateImageRecipeRequest& WithSemanticVersion(const Aws::String& value) { SetSemanticVersion(value); return *this;} /** *

The semantic version of the image recipe.

*/ inline CreateImageRecipeRequest& WithSemanticVersion(Aws::String&& value) { SetSemanticVersion(std::move(value)); return *this;} /** *

The semantic version of the image recipe.

*/ inline CreateImageRecipeRequest& WithSemanticVersion(const char* value) { SetSemanticVersion(value); return *this;} /** *

The components of the image recipe.

*/ inline const Aws::Vector& GetComponents() const{ return m_components; } /** *

The components of the image recipe.

*/ inline bool ComponentsHasBeenSet() const { return m_componentsHasBeenSet; } /** *

The components of the image recipe.

*/ inline void SetComponents(const Aws::Vector& value) { m_componentsHasBeenSet = true; m_components = value; } /** *

The components of the image recipe.

*/ inline void SetComponents(Aws::Vector&& value) { m_componentsHasBeenSet = true; m_components = std::move(value); } /** *

The components of the image recipe.

*/ inline CreateImageRecipeRequest& WithComponents(const Aws::Vector& value) { SetComponents(value); return *this;} /** *

The components of the image recipe.

*/ inline CreateImageRecipeRequest& WithComponents(Aws::Vector&& value) { SetComponents(std::move(value)); return *this;} /** *

The components of the image recipe.

*/ inline CreateImageRecipeRequest& AddComponents(const ComponentConfiguration& value) { m_componentsHasBeenSet = true; m_components.push_back(value); return *this; } /** *

The components of the image recipe.

*/ inline CreateImageRecipeRequest& AddComponents(ComponentConfiguration&& value) { m_componentsHasBeenSet = true; m_components.push_back(std::move(value)); return *this; } /** *

The parent image of the image recipe. The value of the string can be the ARN * of the parent image or an AMI ID. The format for the ARN follows this example: * arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/2019.x.x. * The ARN ends with /20xx.x.x, which communicates to EC2 Image * Builder that you want to use the latest AMI created in 20xx (year). You can * provide the specific version that you want to use, or you can use a wildcard in * all of the fields. If you enter an AMI ID for the string value, you must have * access to the AMI, and the AMI must be in the same Region in which you are using * Image Builder.

*/ inline const Aws::String& GetParentImage() const{ return m_parentImage; } /** *

The parent image of the image recipe. The value of the string can be the ARN * of the parent image or an AMI ID. The format for the ARN follows this example: * arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/2019.x.x. * The ARN ends with /20xx.x.x, which communicates to EC2 Image * Builder that you want to use the latest AMI created in 20xx (year). You can * provide the specific version that you want to use, or you can use a wildcard in * all of the fields. If you enter an AMI ID for the string value, you must have * access to the AMI, and the AMI must be in the same Region in which you are using * Image Builder.

*/ inline bool ParentImageHasBeenSet() const { return m_parentImageHasBeenSet; } /** *

The parent image of the image recipe. The value of the string can be the ARN * of the parent image or an AMI ID. The format for the ARN follows this example: * arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/2019.x.x. * The ARN ends with /20xx.x.x, which communicates to EC2 Image * Builder that you want to use the latest AMI created in 20xx (year). You can * provide the specific version that you want to use, or you can use a wildcard in * all of the fields. If you enter an AMI ID for the string value, you must have * access to the AMI, and the AMI must be in the same Region in which you are using * Image Builder.

*/ inline void SetParentImage(const Aws::String& value) { m_parentImageHasBeenSet = true; m_parentImage = value; } /** *

The parent image of the image recipe. The value of the string can be the ARN * of the parent image or an AMI ID. The format for the ARN follows this example: * arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/2019.x.x. * The ARN ends with /20xx.x.x, which communicates to EC2 Image * Builder that you want to use the latest AMI created in 20xx (year). You can * provide the specific version that you want to use, or you can use a wildcard in * all of the fields. If you enter an AMI ID for the string value, you must have * access to the AMI, and the AMI must be in the same Region in which you are using * Image Builder.

*/ inline void SetParentImage(Aws::String&& value) { m_parentImageHasBeenSet = true; m_parentImage = std::move(value); } /** *

The parent image of the image recipe. The value of the string can be the ARN * of the parent image or an AMI ID. The format for the ARN follows this example: * arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/2019.x.x. * The ARN ends with /20xx.x.x, which communicates to EC2 Image * Builder that you want to use the latest AMI created in 20xx (year). You can * provide the specific version that you want to use, or you can use a wildcard in * all of the fields. If you enter an AMI ID for the string value, you must have * access to the AMI, and the AMI must be in the same Region in which you are using * Image Builder.

*/ inline void SetParentImage(const char* value) { m_parentImageHasBeenSet = true; m_parentImage.assign(value); } /** *

The parent image of the image recipe. The value of the string can be the ARN * of the parent image or an AMI ID. The format for the ARN follows this example: * arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/2019.x.x. * The ARN ends with /20xx.x.x, which communicates to EC2 Image * Builder that you want to use the latest AMI created in 20xx (year). You can * provide the specific version that you want to use, or you can use a wildcard in * all of the fields. If you enter an AMI ID for the string value, you must have * access to the AMI, and the AMI must be in the same Region in which you are using * Image Builder.

*/ inline CreateImageRecipeRequest& WithParentImage(const Aws::String& value) { SetParentImage(value); return *this;} /** *

The parent image of the image recipe. The value of the string can be the ARN * of the parent image or an AMI ID. The format for the ARN follows this example: * arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/2019.x.x. * The ARN ends with /20xx.x.x, which communicates to EC2 Image * Builder that you want to use the latest AMI created in 20xx (year). You can * provide the specific version that you want to use, or you can use a wildcard in * all of the fields. If you enter an AMI ID for the string value, you must have * access to the AMI, and the AMI must be in the same Region in which you are using * Image Builder.

*/ inline CreateImageRecipeRequest& WithParentImage(Aws::String&& value) { SetParentImage(std::move(value)); return *this;} /** *

The parent image of the image recipe. The value of the string can be the ARN * of the parent image or an AMI ID. The format for the ARN follows this example: * arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/2019.x.x. * The ARN ends with /20xx.x.x, which communicates to EC2 Image * Builder that you want to use the latest AMI created in 20xx (year). You can * provide the specific version that you want to use, or you can use a wildcard in * all of the fields. If you enter an AMI ID for the string value, you must have * access to the AMI, and the AMI must be in the same Region in which you are using * Image Builder.

*/ inline CreateImageRecipeRequest& WithParentImage(const char* value) { SetParentImage(value); return *this;} /** *

The block device mappings of the image recipe.

*/ inline const Aws::Vector& GetBlockDeviceMappings() const{ return m_blockDeviceMappings; } /** *

The block device mappings of the image recipe.

*/ inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; } /** *

The block device mappings of the image recipe.

*/ inline void SetBlockDeviceMappings(const Aws::Vector& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = value; } /** *

The block device mappings of the image recipe.

*/ inline void SetBlockDeviceMappings(Aws::Vector&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = std::move(value); } /** *

The block device mappings of the image recipe.

*/ inline CreateImageRecipeRequest& WithBlockDeviceMappings(const Aws::Vector& value) { SetBlockDeviceMappings(value); return *this;} /** *

The block device mappings of the image recipe.

*/ inline CreateImageRecipeRequest& WithBlockDeviceMappings(Aws::Vector&& value) { SetBlockDeviceMappings(std::move(value)); return *this;} /** *

The block device mappings of the image recipe.

*/ inline CreateImageRecipeRequest& AddBlockDeviceMappings(const InstanceBlockDeviceMapping& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(value); return *this; } /** *

The block device mappings of the image recipe.

*/ inline CreateImageRecipeRequest& AddBlockDeviceMappings(InstanceBlockDeviceMapping&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(std::move(value)); return *this; } /** *

The tags of the image recipe.

*/ inline const Aws::Map& GetTags() const{ return m_tags; } /** *

The tags of the image recipe.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tags of the image recipe.

*/ inline void SetTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tags of the image recipe.

*/ inline void SetTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tags of the image recipe.

*/ inline CreateImageRecipeRequest& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

The tags of the image recipe.

*/ inline CreateImageRecipeRequest& WithTags(Aws::Map&& value) { SetTags(std::move(value)); return *this;} /** *

The tags of the image recipe.

*/ inline CreateImageRecipeRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

The tags of the image recipe.

*/ inline CreateImageRecipeRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The tags of the image recipe.

*/ inline CreateImageRecipeRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The tags of the image recipe.

*/ inline CreateImageRecipeRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

The tags of the image recipe.

*/ inline CreateImageRecipeRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The tags of the image recipe.

*/ inline CreateImageRecipeRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The tags of the image recipe.

*/ inline CreateImageRecipeRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

The working directory to be used during build and test workflows.

*/ inline const Aws::String& GetWorkingDirectory() const{ return m_workingDirectory; } /** *

The working directory to be used during build and test workflows.

*/ inline bool WorkingDirectoryHasBeenSet() const { return m_workingDirectoryHasBeenSet; } /** *

The working directory to be used during build and test workflows.

*/ inline void SetWorkingDirectory(const Aws::String& value) { m_workingDirectoryHasBeenSet = true; m_workingDirectory = value; } /** *

The working directory to be used during build and test workflows.

*/ inline void SetWorkingDirectory(Aws::String&& value) { m_workingDirectoryHasBeenSet = true; m_workingDirectory = std::move(value); } /** *

The working directory to be used during build and test workflows.

*/ inline void SetWorkingDirectory(const char* value) { m_workingDirectoryHasBeenSet = true; m_workingDirectory.assign(value); } /** *

The working directory to be used during build and test workflows.

*/ inline CreateImageRecipeRequest& WithWorkingDirectory(const Aws::String& value) { SetWorkingDirectory(value); return *this;} /** *

The working directory to be used during build and test workflows.

*/ inline CreateImageRecipeRequest& WithWorkingDirectory(Aws::String&& value) { SetWorkingDirectory(std::move(value)); return *this;} /** *

The working directory to be used during build and test workflows.

*/ inline CreateImageRecipeRequest& WithWorkingDirectory(const char* value) { SetWorkingDirectory(value); return *this;} /** *

The idempotency token used to make this request idempotent.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

The idempotency token used to make this request idempotent.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

The idempotency token used to make this request idempotent.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

The idempotency token used to make this request idempotent.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

The idempotency token used to make this request idempotent.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

The idempotency token used to make this request idempotent.

*/ inline CreateImageRecipeRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

The idempotency token used to make this request idempotent.

*/ inline CreateImageRecipeRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

The idempotency token used to make this request idempotent.

*/ inline CreateImageRecipeRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet; Aws::String m_description; bool m_descriptionHasBeenSet; Aws::String m_semanticVersion; bool m_semanticVersionHasBeenSet; Aws::Vector m_components; bool m_componentsHasBeenSet; Aws::String m_parentImage; bool m_parentImageHasBeenSet; Aws::Vector m_blockDeviceMappings; bool m_blockDeviceMappingsHasBeenSet; Aws::Map m_tags; bool m_tagsHasBeenSet; Aws::String m_workingDirectory; bool m_workingDirectoryHasBeenSet; Aws::String m_clientToken; bool m_clientTokenHasBeenSet; }; } // namespace Model } // namespace imagebuilder } // namespace Aws