/** * 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 namespace Aws { namespace GreengrassV2 { namespace Model { /** */ class CreateComponentVersionRequest : public GreengrassV2Request { public: AWS_GREENGRASSV2_API CreateComponentVersionRequest(); // 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 "CreateComponentVersion"; } AWS_GREENGRASSV2_API Aws::String SerializePayload() const override; /** *

The recipe to use to create the component. The recipe defines the component's * metadata, parameters, dependencies, lifecycle, artifacts, and platform * compatibility.

You must specify either inlineRecipe or * lambdaFunction.

*/ inline const Aws::Utils::ByteBuffer& GetInlineRecipe() const{ return m_inlineRecipe; } /** *

The recipe to use to create the component. The recipe defines the component's * metadata, parameters, dependencies, lifecycle, artifacts, and platform * compatibility.

You must specify either inlineRecipe or * lambdaFunction.

*/ inline bool InlineRecipeHasBeenSet() const { return m_inlineRecipeHasBeenSet; } /** *

The recipe to use to create the component. The recipe defines the component's * metadata, parameters, dependencies, lifecycle, artifacts, and platform * compatibility.

You must specify either inlineRecipe or * lambdaFunction.

*/ inline void SetInlineRecipe(const Aws::Utils::ByteBuffer& value) { m_inlineRecipeHasBeenSet = true; m_inlineRecipe = value; } /** *

The recipe to use to create the component. The recipe defines the component's * metadata, parameters, dependencies, lifecycle, artifacts, and platform * compatibility.

You must specify either inlineRecipe or * lambdaFunction.

*/ inline void SetInlineRecipe(Aws::Utils::ByteBuffer&& value) { m_inlineRecipeHasBeenSet = true; m_inlineRecipe = std::move(value); } /** *

The recipe to use to create the component. The recipe defines the component's * metadata, parameters, dependencies, lifecycle, artifacts, and platform * compatibility.

You must specify either inlineRecipe or * lambdaFunction.

*/ inline CreateComponentVersionRequest& WithInlineRecipe(const Aws::Utils::ByteBuffer& value) { SetInlineRecipe(value); return *this;} /** *

The recipe to use to create the component. The recipe defines the component's * metadata, parameters, dependencies, lifecycle, artifacts, and platform * compatibility.

You must specify either inlineRecipe or * lambdaFunction.

*/ inline CreateComponentVersionRequest& WithInlineRecipe(Aws::Utils::ByteBuffer&& value) { SetInlineRecipe(std::move(value)); return *this;} /** *

The parameters to create a component from a Lambda function.

You must * specify either inlineRecipe or lambdaFunction.

*/ inline const LambdaFunctionRecipeSource& GetLambdaFunction() const{ return m_lambdaFunction; } /** *

The parameters to create a component from a Lambda function.

You must * specify either inlineRecipe or lambdaFunction.

*/ inline bool LambdaFunctionHasBeenSet() const { return m_lambdaFunctionHasBeenSet; } /** *

The parameters to create a component from a Lambda function.

You must * specify either inlineRecipe or lambdaFunction.

*/ inline void SetLambdaFunction(const LambdaFunctionRecipeSource& value) { m_lambdaFunctionHasBeenSet = true; m_lambdaFunction = value; } /** *

The parameters to create a component from a Lambda function.

You must * specify either inlineRecipe or lambdaFunction.

*/ inline void SetLambdaFunction(LambdaFunctionRecipeSource&& value) { m_lambdaFunctionHasBeenSet = true; m_lambdaFunction = std::move(value); } /** *

The parameters to create a component from a Lambda function.

You must * specify either inlineRecipe or lambdaFunction.

*/ inline CreateComponentVersionRequest& WithLambdaFunction(const LambdaFunctionRecipeSource& value) { SetLambdaFunction(value); return *this;} /** *

The parameters to create a component from a Lambda function.

You must * specify either inlineRecipe or lambdaFunction.

*/ inline CreateComponentVersionRequest& WithLambdaFunction(LambdaFunctionRecipeSource&& value) { SetLambdaFunction(std::move(value)); return *this;} /** *

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A list of key-value pairs that contain metadata for the resource. For more * information, see Tag * your resources in the IoT Greengrass V2 Developer Guide.

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

A unique, case-sensitive identifier that you can provide to ensure that the * request is idempotent. Idempotency means that the request is successfully * processed only once, even if you send the request multiple times. When a request * succeeds, and you specify the same client token for subsequent successful * requests, the IoT Greengrass V2 service returns the successful response that it * caches from the previous request. IoT Greengrass V2 caches successful responses * for idempotent requests for up to 8 hours.

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

A unique, case-sensitive identifier that you can provide to ensure that the * request is idempotent. Idempotency means that the request is successfully * processed only once, even if you send the request multiple times. When a request * succeeds, and you specify the same client token for subsequent successful * requests, the IoT Greengrass V2 service returns the successful response that it * caches from the previous request. IoT Greengrass V2 caches successful responses * for idempotent requests for up to 8 hours.

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

A unique, case-sensitive identifier that you can provide to ensure that the * request is idempotent. Idempotency means that the request is successfully * processed only once, even if you send the request multiple times. When a request * succeeds, and you specify the same client token for subsequent successful * requests, the IoT Greengrass V2 service returns the successful response that it * caches from the previous request. IoT Greengrass V2 caches successful responses * for idempotent requests for up to 8 hours.

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

A unique, case-sensitive identifier that you can provide to ensure that the * request is idempotent. Idempotency means that the request is successfully * processed only once, even if you send the request multiple times. When a request * succeeds, and you specify the same client token for subsequent successful * requests, the IoT Greengrass V2 service returns the successful response that it * caches from the previous request. IoT Greengrass V2 caches successful responses * for idempotent requests for up to 8 hours.

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

A unique, case-sensitive identifier that you can provide to ensure that the * request is idempotent. Idempotency means that the request is successfully * processed only once, even if you send the request multiple times. When a request * succeeds, and you specify the same client token for subsequent successful * requests, the IoT Greengrass V2 service returns the successful response that it * caches from the previous request. IoT Greengrass V2 caches successful responses * for idempotent requests for up to 8 hours.

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

A unique, case-sensitive identifier that you can provide to ensure that the * request is idempotent. Idempotency means that the request is successfully * processed only once, even if you send the request multiple times. When a request * succeeds, and you specify the same client token for subsequent successful * requests, the IoT Greengrass V2 service returns the successful response that it * caches from the previous request. IoT Greengrass V2 caches successful responses * for idempotent requests for up to 8 hours.

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

A unique, case-sensitive identifier that you can provide to ensure that the * request is idempotent. Idempotency means that the request is successfully * processed only once, even if you send the request multiple times. When a request * succeeds, and you specify the same client token for subsequent successful * requests, the IoT Greengrass V2 service returns the successful response that it * caches from the previous request. IoT Greengrass V2 caches successful responses * for idempotent requests for up to 8 hours.

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

A unique, case-sensitive identifier that you can provide to ensure that the * request is idempotent. Idempotency means that the request is successfully * processed only once, even if you send the request multiple times. When a request * succeeds, and you specify the same client token for subsequent successful * requests, the IoT Greengrass V2 service returns the successful response that it * caches from the previous request. IoT Greengrass V2 caches successful responses * for idempotent requests for up to 8 hours.

*/ inline CreateComponentVersionRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} private: Aws::Utils::ByteBuffer m_inlineRecipe; bool m_inlineRecipeHasBeenSet = false; LambdaFunctionRecipeSource m_lambdaFunction; bool m_lambdaFunctionHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; }; } // namespace Model } // namespace GreengrassV2 } // namespace Aws