/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #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 a job attempt.

See Also:

AWS * API Reference

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

The details for the container in this job attempt.

*/ inline const AttemptContainerDetail& GetContainer() const{ return m_container; } /** *

The details for the container in this job attempt.

*/ inline bool ContainerHasBeenSet() const { return m_containerHasBeenSet; } /** *

The details for the container in this job attempt.

*/ inline void SetContainer(const AttemptContainerDetail& value) { m_containerHasBeenSet = true; m_container = value; } /** *

The details for the container in this job attempt.

*/ inline void SetContainer(AttemptContainerDetail&& value) { m_containerHasBeenSet = true; m_container = std::move(value); } /** *

The details for the container in this job attempt.

*/ inline AttemptDetail& WithContainer(const AttemptContainerDetail& value) { SetContainer(value); return *this;} /** *

The details for the container in this job attempt.

*/ inline AttemptDetail& WithContainer(AttemptContainerDetail&& value) { SetContainer(std::move(value)); return *this;} /** *

The Unix timestamp (in milliseconds) for when the attempt was started (when * the attempt transitioned from the STARTING state to the * RUNNING state).

*/ inline long long GetStartedAt() const{ return m_startedAt; } /** *

The Unix timestamp (in milliseconds) for when the attempt was started (when * the attempt transitioned from the STARTING state to the * RUNNING state).

*/ inline bool StartedAtHasBeenSet() const { return m_startedAtHasBeenSet; } /** *

The Unix timestamp (in milliseconds) for when the attempt was started (when * the attempt transitioned from the STARTING state to the * RUNNING state).

*/ inline void SetStartedAt(long long value) { m_startedAtHasBeenSet = true; m_startedAt = value; } /** *

The Unix timestamp (in milliseconds) for when the attempt was started (when * the attempt transitioned from the STARTING state to the * RUNNING state).

*/ inline AttemptDetail& WithStartedAt(long long value) { SetStartedAt(value); return *this;} /** *

The Unix timestamp (in milliseconds) for when the attempt was stopped (when * the attempt transitioned from the RUNNING state to a terminal * state, such as SUCCEEDED or FAILED).

*/ inline long long GetStoppedAt() const{ return m_stoppedAt; } /** *

The Unix timestamp (in milliseconds) for when the attempt was stopped (when * the attempt transitioned from the RUNNING state to a terminal * state, such as SUCCEEDED or FAILED).

*/ inline bool StoppedAtHasBeenSet() const { return m_stoppedAtHasBeenSet; } /** *

The Unix timestamp (in milliseconds) for when the attempt was stopped (when * the attempt transitioned from the RUNNING state to a terminal * state, such as SUCCEEDED or FAILED).

*/ inline void SetStoppedAt(long long value) { m_stoppedAtHasBeenSet = true; m_stoppedAt = value; } /** *

The Unix timestamp (in milliseconds) for when the attempt was stopped (when * the attempt transitioned from the RUNNING state to a terminal * state, such as SUCCEEDED or FAILED).

*/ inline AttemptDetail& WithStoppedAt(long long value) { SetStoppedAt(value); return *this;} /** *

A short, human-readable string to provide additional details for the current * status of the job attempt.

*/ inline const Aws::String& GetStatusReason() const{ return m_statusReason; } /** *

A short, human-readable string to provide additional details for the current * status of the job attempt.

*/ inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; } /** *

A short, human-readable string to provide additional details for the current * status of the job attempt.

*/ inline void SetStatusReason(const Aws::String& value) { m_statusReasonHasBeenSet = true; m_statusReason = value; } /** *

A short, human-readable string to provide additional details for the current * status of the job attempt.

*/ inline void SetStatusReason(Aws::String&& value) { m_statusReasonHasBeenSet = true; m_statusReason = std::move(value); } /** *

A short, human-readable string to provide additional details for the current * status of the job attempt.

*/ inline void SetStatusReason(const char* value) { m_statusReasonHasBeenSet = true; m_statusReason.assign(value); } /** *

A short, human-readable string to provide additional details for the current * status of the job attempt.

*/ inline AttemptDetail& WithStatusReason(const Aws::String& value) { SetStatusReason(value); return *this;} /** *

A short, human-readable string to provide additional details for the current * status of the job attempt.

*/ inline AttemptDetail& WithStatusReason(Aws::String&& value) { SetStatusReason(std::move(value)); return *this;} /** *

A short, human-readable string to provide additional details for the current * status of the job attempt.

*/ inline AttemptDetail& WithStatusReason(const char* value) { SetStatusReason(value); return *this;} private: AttemptContainerDetail m_container; bool m_containerHasBeenSet = false; long long m_startedAt; bool m_startedAtHasBeenSet = false; long long m_stoppedAt; bool m_stoppedAtHasBeenSet = false; Aws::String m_statusReason; bool m_statusReasonHasBeenSet = false; }; } // namespace Model } // namespace Batch } // namespace Aws