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

An object that represents the details of a container that's part of a job * attempt.

See Also:

AWS * API Reference

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

The Amazon Resource Name (ARN) of the Amazon ECS container instance that * hosts the job attempt.

*/ inline const Aws::String& GetContainerInstanceArn() const{ return m_containerInstanceArn; } /** *

The Amazon Resource Name (ARN) of the Amazon ECS container instance that * hosts the job attempt.

*/ inline bool ContainerInstanceArnHasBeenSet() const { return m_containerInstanceArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Amazon ECS container instance that * hosts the job attempt.

*/ inline void SetContainerInstanceArn(const Aws::String& value) { m_containerInstanceArnHasBeenSet = true; m_containerInstanceArn = value; } /** *

The Amazon Resource Name (ARN) of the Amazon ECS container instance that * hosts the job attempt.

*/ inline void SetContainerInstanceArn(Aws::String&& value) { m_containerInstanceArnHasBeenSet = true; m_containerInstanceArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Amazon ECS container instance that * hosts the job attempt.

*/ inline void SetContainerInstanceArn(const char* value) { m_containerInstanceArnHasBeenSet = true; m_containerInstanceArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Amazon ECS container instance that * hosts the job attempt.

*/ inline AttemptContainerDetail& WithContainerInstanceArn(const Aws::String& value) { SetContainerInstanceArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon ECS container instance that * hosts the job attempt.

*/ inline AttemptContainerDetail& WithContainerInstanceArn(Aws::String&& value) { SetContainerInstanceArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon ECS container instance that * hosts the job attempt.

*/ inline AttemptContainerDetail& WithContainerInstanceArn(const char* value) { SetContainerInstanceArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with * the job attempt. Each container attempt receives a task ARN when they reach the * STARTING status.

*/ inline const Aws::String& GetTaskArn() const{ return m_taskArn; } /** *

The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with * the job attempt. Each container attempt receives a task ARN when they reach the * STARTING status.

*/ inline bool TaskArnHasBeenSet() const { return m_taskArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with * the job attempt. Each container attempt receives a task ARN when they reach the * STARTING status.

*/ inline void SetTaskArn(const Aws::String& value) { m_taskArnHasBeenSet = true; m_taskArn = value; } /** *

The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with * the job attempt. Each container attempt receives a task ARN when they reach the * STARTING status.

*/ inline void SetTaskArn(Aws::String&& value) { m_taskArnHasBeenSet = true; m_taskArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with * the job attempt. Each container attempt receives a task ARN when they reach the * STARTING status.

*/ inline void SetTaskArn(const char* value) { m_taskArnHasBeenSet = true; m_taskArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with * the job attempt. Each container attempt receives a task ARN when they reach the * STARTING status.

*/ inline AttemptContainerDetail& WithTaskArn(const Aws::String& value) { SetTaskArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with * the job attempt. Each container attempt receives a task ARN when they reach the * STARTING status.

*/ inline AttemptContainerDetail& WithTaskArn(Aws::String&& value) { SetTaskArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with * the job attempt. Each container attempt receives a task ARN when they reach the * STARTING status.

*/ inline AttemptContainerDetail& WithTaskArn(const char* value) { SetTaskArn(value); return *this;} /** *

The exit code for the job attempt. A non-zero exit code is considered * failed.

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

The exit code for the job attempt. A non-zero exit code is considered * failed.

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

The exit code for the job attempt. A non-zero exit code is considered * failed.

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

The exit code for the job attempt. A non-zero exit code is considered * failed.

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

A short (255 max characters) human-readable string to provide additional * details for a running or stopped container.

*/ inline const Aws::String& GetReason() const{ return m_reason; } /** *

A short (255 max characters) human-readable string to provide additional * details for a running or stopped container.

*/ inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; } /** *

A short (255 max characters) human-readable string to provide additional * details for a running or stopped container.

*/ inline void SetReason(const Aws::String& value) { m_reasonHasBeenSet = true; m_reason = value; } /** *

A short (255 max characters) human-readable string to provide additional * details for a running or stopped container.

*/ inline void SetReason(Aws::String&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); } /** *

A short (255 max characters) human-readable string to provide additional * details for a running or stopped container.

*/ inline void SetReason(const char* value) { m_reasonHasBeenSet = true; m_reason.assign(value); } /** *

A short (255 max characters) human-readable string to provide additional * details for a running or stopped container.

*/ inline AttemptContainerDetail& WithReason(const Aws::String& value) { SetReason(value); return *this;} /** *

A short (255 max characters) human-readable string to provide additional * details for a running or stopped container.

*/ inline AttemptContainerDetail& WithReason(Aws::String&& value) { SetReason(std::move(value)); return *this;} /** *

A short (255 max characters) human-readable string to provide additional * details for a running or stopped container.

*/ inline AttemptContainerDetail& WithReason(const char* value) { SetReason(value); return *this;} /** *

The name of the CloudWatch Logs log stream that's associated with the * container. The log group for Batch jobs is /aws/batch/job. Each * container attempt receives a log stream name when they reach the * RUNNING status.

*/ inline const Aws::String& GetLogStreamName() const{ return m_logStreamName; } /** *

The name of the CloudWatch Logs log stream that's associated with the * container. The log group for Batch jobs is /aws/batch/job. Each * container attempt receives a log stream name when they reach the * RUNNING status.

*/ inline bool LogStreamNameHasBeenSet() const { return m_logStreamNameHasBeenSet; } /** *

The name of the CloudWatch Logs log stream that's associated with the * container. The log group for Batch jobs is /aws/batch/job. Each * container attempt receives a log stream name when they reach the * RUNNING status.

*/ inline void SetLogStreamName(const Aws::String& value) { m_logStreamNameHasBeenSet = true; m_logStreamName = value; } /** *

The name of the CloudWatch Logs log stream that's associated with the * container. The log group for Batch jobs is /aws/batch/job. Each * container attempt receives a log stream name when they reach the * RUNNING status.

*/ inline void SetLogStreamName(Aws::String&& value) { m_logStreamNameHasBeenSet = true; m_logStreamName = std::move(value); } /** *

The name of the CloudWatch Logs log stream that's associated with the * container. The log group for Batch jobs is /aws/batch/job. Each * container attempt receives a log stream name when they reach the * RUNNING status.

*/ inline void SetLogStreamName(const char* value) { m_logStreamNameHasBeenSet = true; m_logStreamName.assign(value); } /** *

The name of the CloudWatch Logs log stream that's associated with the * container. The log group for Batch jobs is /aws/batch/job. Each * container attempt receives a log stream name when they reach the * RUNNING status.

*/ inline AttemptContainerDetail& WithLogStreamName(const Aws::String& value) { SetLogStreamName(value); return *this;} /** *

The name of the CloudWatch Logs log stream that's associated with the * container. The log group for Batch jobs is /aws/batch/job. Each * container attempt receives a log stream name when they reach the * RUNNING status.

*/ inline AttemptContainerDetail& WithLogStreamName(Aws::String&& value) { SetLogStreamName(std::move(value)); return *this;} /** *

The name of the CloudWatch Logs log stream that's associated with the * container. The log group for Batch jobs is /aws/batch/job. Each * container attempt receives a log stream name when they reach the * RUNNING status.

*/ inline AttemptContainerDetail& WithLogStreamName(const char* value) { SetLogStreamName(value); return *this;} /** *

The network interfaces that are associated with the job attempt.

*/ inline const Aws::Vector& GetNetworkInterfaces() const{ return m_networkInterfaces; } /** *

The network interfaces that are associated with the job attempt.

*/ inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; } /** *

The network interfaces that are associated with the job attempt.

*/ inline void SetNetworkInterfaces(const Aws::Vector& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = value; } /** *

The network interfaces that are associated with the job attempt.

*/ inline void SetNetworkInterfaces(Aws::Vector&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = std::move(value); } /** *

The network interfaces that are associated with the job attempt.

*/ inline AttemptContainerDetail& WithNetworkInterfaces(const Aws::Vector& value) { SetNetworkInterfaces(value); return *this;} /** *

The network interfaces that are associated with the job attempt.

*/ inline AttemptContainerDetail& WithNetworkInterfaces(Aws::Vector&& value) { SetNetworkInterfaces(std::move(value)); return *this;} /** *

The network interfaces that are associated with the job attempt.

*/ inline AttemptContainerDetail& AddNetworkInterfaces(const NetworkInterface& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(value); return *this; } /** *

The network interfaces that are associated with the job attempt.

*/ inline AttemptContainerDetail& AddNetworkInterfaces(NetworkInterface&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(std::move(value)); return *this; } private: Aws::String m_containerInstanceArn; bool m_containerInstanceArnHasBeenSet = false; Aws::String m_taskArn; bool m_taskArnHasBeenSet = false; int m_exitCode; bool m_exitCodeHasBeenSet = false; Aws::String m_reason; bool m_reasonHasBeenSet = false; Aws::String m_logStreamName; bool m_logStreamNameHasBeenSet = false; Aws::Vector m_networkInterfaces; bool m_networkInterfacesHasBeenSet = false; }; } // namespace Model } // namespace Batch } // namespace Aws