/** * 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 SnowDeviceManagement { namespace Model { /** */ class CreateTaskRequest : public SnowDeviceManagementRequest { public: AWS_SNOWDEVICEMANAGEMENT_API CreateTaskRequest(); // 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 "CreateTask"; } AWS_SNOWDEVICEMANAGEMENT_API Aws::String SerializePayload() const override; /** *

A token ensuring that the action is called only once with the specified * details.

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

A token ensuring that the action is called only once with the specified * details.

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

A token ensuring that the action is called only once with the specified * details.

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

A token ensuring that the action is called only once with the specified * details.

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

A token ensuring that the action is called only once with the specified * details.

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

A token ensuring that the action is called only once with the specified * details.

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

A token ensuring that the action is called only once with the specified * details.

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

A token ensuring that the action is called only once with the specified * details.

*/ inline CreateTaskRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

The task to be performed. Only one task is executed on a device at a * time.

*/ inline const Command& GetCommand() const{ return m_command; } /** *

The task to be performed. Only one task is executed on a device at a * time.

*/ inline bool CommandHasBeenSet() const { return m_commandHasBeenSet; } /** *

The task to be performed. Only one task is executed on a device at a * time.

*/ inline void SetCommand(const Command& value) { m_commandHasBeenSet = true; m_command = value; } /** *

The task to be performed. Only one task is executed on a device at a * time.

*/ inline void SetCommand(Command&& value) { m_commandHasBeenSet = true; m_command = std::move(value); } /** *

The task to be performed. Only one task is executed on a device at a * time.

*/ inline CreateTaskRequest& WithCommand(const Command& value) { SetCommand(value); return *this;} /** *

The task to be performed. Only one task is executed on a device at a * time.

*/ inline CreateTaskRequest& WithCommand(Command&& value) { SetCommand(std::move(value)); return *this;} /** *

A description of the task and its targets.

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

A description of the task and its targets.

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

A description of the task and its targets.

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

A description of the task and its targets.

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

A description of the task and its targets.

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

A description of the task and its targets.

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

A description of the task and its targets.

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

A description of the task and its targets.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

Optional metadata that you assign to a resource. You can use tags to * categorize a resource in different ways, such as by purpose, owner, or * environment.

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

A list of managed device IDs.

*/ inline const Aws::Vector& GetTargets() const{ return m_targets; } /** *

A list of managed device IDs.

*/ inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; } /** *

A list of managed device IDs.

*/ inline void SetTargets(const Aws::Vector& value) { m_targetsHasBeenSet = true; m_targets = value; } /** *

A list of managed device IDs.

*/ inline void SetTargets(Aws::Vector&& value) { m_targetsHasBeenSet = true; m_targets = std::move(value); } /** *

A list of managed device IDs.

*/ inline CreateTaskRequest& WithTargets(const Aws::Vector& value) { SetTargets(value); return *this;} /** *

A list of managed device IDs.

*/ inline CreateTaskRequest& WithTargets(Aws::Vector&& value) { SetTargets(std::move(value)); return *this;} /** *

A list of managed device IDs.

*/ inline CreateTaskRequest& AddTargets(const Aws::String& value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; } /** *

A list of managed device IDs.

*/ inline CreateTaskRequest& AddTargets(Aws::String&& value) { m_targetsHasBeenSet = true; m_targets.push_back(std::move(value)); return *this; } /** *

A list of managed device IDs.

*/ inline CreateTaskRequest& AddTargets(const char* value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; } private: Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Command m_command; bool m_commandHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; Aws::Vector m_targets; bool m_targetsHasBeenSet = false; }; } // namespace Model } // namespace SnowDeviceManagement } // namespace Aws