/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace OpsWorks { namespace Model { /** *

Describes a command.

See Also:

AWS * API Reference

*/ class Command { public: AWS_OPSWORKS_API Command(); AWS_OPSWORKS_API Command(Aws::Utils::Json::JsonView jsonValue); AWS_OPSWORKS_API Command& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_OPSWORKS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The command ID.

*/ inline const Aws::String& GetCommandId() const{ return m_commandId; } /** *

The command ID.

*/ inline bool CommandIdHasBeenSet() const { return m_commandIdHasBeenSet; } /** *

The command ID.

*/ inline void SetCommandId(const Aws::String& value) { m_commandIdHasBeenSet = true; m_commandId = value; } /** *

The command ID.

*/ inline void SetCommandId(Aws::String&& value) { m_commandIdHasBeenSet = true; m_commandId = std::move(value); } /** *

The command ID.

*/ inline void SetCommandId(const char* value) { m_commandIdHasBeenSet = true; m_commandId.assign(value); } /** *

The command ID.

*/ inline Command& WithCommandId(const Aws::String& value) { SetCommandId(value); return *this;} /** *

The command ID.

*/ inline Command& WithCommandId(Aws::String&& value) { SetCommandId(std::move(value)); return *this;} /** *

The command ID.

*/ inline Command& WithCommandId(const char* value) { SetCommandId(value); return *this;} /** *

The ID of the instance where the command was executed.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The ID of the instance where the command was executed.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The ID of the instance where the command was executed.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The ID of the instance where the command was executed.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The ID of the instance where the command was executed.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The ID of the instance where the command was executed.

*/ inline Command& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The ID of the instance where the command was executed.

*/ inline Command& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The ID of the instance where the command was executed.

*/ inline Command& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

The command deployment ID.

*/ inline const Aws::String& GetDeploymentId() const{ return m_deploymentId; } /** *

The command deployment ID.

*/ inline bool DeploymentIdHasBeenSet() const { return m_deploymentIdHasBeenSet; } /** *

The command deployment ID.

*/ inline void SetDeploymentId(const Aws::String& value) { m_deploymentIdHasBeenSet = true; m_deploymentId = value; } /** *

The command deployment ID.

*/ inline void SetDeploymentId(Aws::String&& value) { m_deploymentIdHasBeenSet = true; m_deploymentId = std::move(value); } /** *

The command deployment ID.

*/ inline void SetDeploymentId(const char* value) { m_deploymentIdHasBeenSet = true; m_deploymentId.assign(value); } /** *

The command deployment ID.

*/ inline Command& WithDeploymentId(const Aws::String& value) { SetDeploymentId(value); return *this;} /** *

The command deployment ID.

*/ inline Command& WithDeploymentId(Aws::String&& value) { SetDeploymentId(std::move(value)); return *this;} /** *

The command deployment ID.

*/ inline Command& WithDeploymentId(const char* value) { SetDeploymentId(value); return *this;} /** *

Date and time when the command was run.

*/ inline const Aws::String& GetCreatedAt() const{ return m_createdAt; } /** *

Date and time when the command was run.

*/ inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; } /** *

Date and time when the command was run.

*/ inline void SetCreatedAt(const Aws::String& value) { m_createdAtHasBeenSet = true; m_createdAt = value; } /** *

Date and time when the command was run.

*/ inline void SetCreatedAt(Aws::String&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); } /** *

Date and time when the command was run.

*/ inline void SetCreatedAt(const char* value) { m_createdAtHasBeenSet = true; m_createdAt.assign(value); } /** *

Date and time when the command was run.

*/ inline Command& WithCreatedAt(const Aws::String& value) { SetCreatedAt(value); return *this;} /** *

Date and time when the command was run.

*/ inline Command& WithCreatedAt(Aws::String&& value) { SetCreatedAt(std::move(value)); return *this;} /** *

Date and time when the command was run.

*/ inline Command& WithCreatedAt(const char* value) { SetCreatedAt(value); return *this;} /** *

Date and time when the command was acknowledged.

*/ inline const Aws::String& GetAcknowledgedAt() const{ return m_acknowledgedAt; } /** *

Date and time when the command was acknowledged.

*/ inline bool AcknowledgedAtHasBeenSet() const { return m_acknowledgedAtHasBeenSet; } /** *

Date and time when the command was acknowledged.

*/ inline void SetAcknowledgedAt(const Aws::String& value) { m_acknowledgedAtHasBeenSet = true; m_acknowledgedAt = value; } /** *

Date and time when the command was acknowledged.

*/ inline void SetAcknowledgedAt(Aws::String&& value) { m_acknowledgedAtHasBeenSet = true; m_acknowledgedAt = std::move(value); } /** *

Date and time when the command was acknowledged.

*/ inline void SetAcknowledgedAt(const char* value) { m_acknowledgedAtHasBeenSet = true; m_acknowledgedAt.assign(value); } /** *

Date and time when the command was acknowledged.

*/ inline Command& WithAcknowledgedAt(const Aws::String& value) { SetAcknowledgedAt(value); return *this;} /** *

Date and time when the command was acknowledged.

*/ inline Command& WithAcknowledgedAt(Aws::String&& value) { SetAcknowledgedAt(std::move(value)); return *this;} /** *

Date and time when the command was acknowledged.

*/ inline Command& WithAcknowledgedAt(const char* value) { SetAcknowledgedAt(value); return *this;} /** *

Date when the command completed.

*/ inline const Aws::String& GetCompletedAt() const{ return m_completedAt; } /** *

Date when the command completed.

*/ inline bool CompletedAtHasBeenSet() const { return m_completedAtHasBeenSet; } /** *

Date when the command completed.

*/ inline void SetCompletedAt(const Aws::String& value) { m_completedAtHasBeenSet = true; m_completedAt = value; } /** *

Date when the command completed.

*/ inline void SetCompletedAt(Aws::String&& value) { m_completedAtHasBeenSet = true; m_completedAt = std::move(value); } /** *

Date when the command completed.

*/ inline void SetCompletedAt(const char* value) { m_completedAtHasBeenSet = true; m_completedAt.assign(value); } /** *

Date when the command completed.

*/ inline Command& WithCompletedAt(const Aws::String& value) { SetCompletedAt(value); return *this;} /** *

Date when the command completed.

*/ inline Command& WithCompletedAt(Aws::String&& value) { SetCompletedAt(std::move(value)); return *this;} /** *

Date when the command completed.

*/ inline Command& WithCompletedAt(const char* value) { SetCompletedAt(value); return *this;} /** *

The command status:

  • failed

  • successful

    *
  • skipped

  • pending

*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The command status:

  • failed

  • successful

    *
  • skipped

  • pending

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The command status:

  • failed

  • successful

    *
  • skipped

  • pending

*/ inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The command status:

  • failed

  • successful

    *
  • skipped

  • pending

*/ inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The command status:

  • failed

  • successful

    *
  • skipped

  • pending

*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The command status:

  • failed

  • successful

    *
  • skipped

  • pending

*/ inline Command& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The command status:

  • failed

  • successful

    *
  • skipped

  • pending

*/ inline Command& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The command status:

  • failed

  • successful

    *
  • skipped

  • pending

*/ inline Command& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

The command exit code.

*/ inline int GetExitCode() const{ return m_exitCode; } /** *

The command exit code.

*/ inline bool ExitCodeHasBeenSet() const { return m_exitCodeHasBeenSet; } /** *

The command exit code.

*/ inline void SetExitCode(int value) { m_exitCodeHasBeenSet = true; m_exitCode = value; } /** *

The command exit code.

*/ inline Command& WithExitCode(int value) { SetExitCode(value); return *this;} /** *

The URL of the command log.

*/ inline const Aws::String& GetLogUrl() const{ return m_logUrl; } /** *

The URL of the command log.

*/ inline bool LogUrlHasBeenSet() const { return m_logUrlHasBeenSet; } /** *

The URL of the command log.

*/ inline void SetLogUrl(const Aws::String& value) { m_logUrlHasBeenSet = true; m_logUrl = value; } /** *

The URL of the command log.

*/ inline void SetLogUrl(Aws::String&& value) { m_logUrlHasBeenSet = true; m_logUrl = std::move(value); } /** *

The URL of the command log.

*/ inline void SetLogUrl(const char* value) { m_logUrlHasBeenSet = true; m_logUrl.assign(value); } /** *

The URL of the command log.

*/ inline Command& WithLogUrl(const Aws::String& value) { SetLogUrl(value); return *this;} /** *

The URL of the command log.

*/ inline Command& WithLogUrl(Aws::String&& value) { SetLogUrl(std::move(value)); return *this;} /** *

The URL of the command log.

*/ inline Command& WithLogUrl(const char* value) { SetLogUrl(value); return *this;} /** *

The command type:

  • configure

  • *

    deploy

  • execute_recipes

    *
  • install_dependencies

  • * restart

  • rollback

  • *

    setup

  • start

  • *

    stop

  • undeploy

  • *

    update_custom_cookbooks

  • * update_dependencies

*/ inline const Aws::String& GetType() const{ return m_type; } /** *

The command type:

  • configure

  • *

    deploy

  • execute_recipes

    *
  • install_dependencies

  • * restart

  • rollback

  • *

    setup

  • start

  • *

    stop

  • undeploy

  • *

    update_custom_cookbooks

  • * update_dependencies

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The command type:

  • configure

  • *

    deploy

  • execute_recipes

    *
  • install_dependencies

  • * restart

  • rollback

  • *

    setup

  • start

  • *

    stop

  • undeploy

  • *

    update_custom_cookbooks

  • * update_dependencies

*/ inline void SetType(const Aws::String& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The command type:

  • configure

  • *

    deploy

  • execute_recipes

    *
  • install_dependencies

  • * restart

  • rollback

  • *

    setup

  • start

  • *

    stop

  • undeploy

  • *

    update_custom_cookbooks

  • * update_dependencies

*/ inline void SetType(Aws::String&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The command type:

  • configure

  • *

    deploy

  • execute_recipes

    *
  • install_dependencies

  • * restart

  • rollback

  • *

    setup

  • start

  • *

    stop

  • undeploy

  • *

    update_custom_cookbooks

  • * update_dependencies

*/ inline void SetType(const char* value) { m_typeHasBeenSet = true; m_type.assign(value); } /** *

The command type:

  • configure

  • *

    deploy

  • execute_recipes

    *
  • install_dependencies

  • * restart

  • rollback

  • *

    setup

  • start

  • *

    stop

  • undeploy

  • *

    update_custom_cookbooks

  • * update_dependencies

*/ inline Command& WithType(const Aws::String& value) { SetType(value); return *this;} /** *

The command type:

  • configure

  • *

    deploy

  • execute_recipes

    *
  • install_dependencies

  • * restart

  • rollback

  • *

    setup

  • start

  • *

    stop

  • undeploy

  • *

    update_custom_cookbooks

  • * update_dependencies

*/ inline Command& WithType(Aws::String&& value) { SetType(std::move(value)); return *this;} /** *

The command type:

  • configure

  • *

    deploy

  • execute_recipes

    *
  • install_dependencies

  • * restart

  • rollback

  • *

    setup

  • start

  • *

    stop

  • undeploy

  • *

    update_custom_cookbooks

  • * update_dependencies

*/ inline Command& WithType(const char* value) { SetType(value); return *this;} private: Aws::String m_commandId; bool m_commandIdHasBeenSet = false; Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_deploymentId; bool m_deploymentIdHasBeenSet = false; Aws::String m_createdAt; bool m_createdAtHasBeenSet = false; Aws::String m_acknowledgedAt; bool m_acknowledgedAtHasBeenSet = false; Aws::String m_completedAt; bool m_completedAtHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; int m_exitCode; bool m_exitCodeHasBeenSet = false; Aws::String m_logUrl; bool m_logUrlHasBeenSet = false; Aws::String m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace OpsWorks } // namespace Aws