/** * 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 { /** *

Specifies an array of up to 5 conditions to be met, and an action to take * (RETRY or EXIT) if all conditions are met. If none of * the EvaluateOnExit conditions in a RetryStrategy * match, then the job is retried.

See Also:

AWS * API Reference

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

Contains a glob pattern to match against the StatusReason * returned for a job. The pattern can contain up to 512 characters. It can contain * letters, numbers, periods (.), colons (:), and white spaces (including spaces or * tabs). It can optionally end with an asterisk (*) so that only the start of the * string needs to be an exact match.

*/ inline const Aws::String& GetOnStatusReason() const{ return m_onStatusReason; } /** *

Contains a glob pattern to match against the StatusReason * returned for a job. The pattern can contain up to 512 characters. It can contain * letters, numbers, periods (.), colons (:), and white spaces (including spaces or * tabs). It can optionally end with an asterisk (*) so that only the start of the * string needs to be an exact match.

*/ inline bool OnStatusReasonHasBeenSet() const { return m_onStatusReasonHasBeenSet; } /** *

Contains a glob pattern to match against the StatusReason * returned for a job. The pattern can contain up to 512 characters. It can contain * letters, numbers, periods (.), colons (:), and white spaces (including spaces or * tabs). It can optionally end with an asterisk (*) so that only the start of the * string needs to be an exact match.

*/ inline void SetOnStatusReason(const Aws::String& value) { m_onStatusReasonHasBeenSet = true; m_onStatusReason = value; } /** *

Contains a glob pattern to match against the StatusReason * returned for a job. The pattern can contain up to 512 characters. It can contain * letters, numbers, periods (.), colons (:), and white spaces (including spaces or * tabs). It can optionally end with an asterisk (*) so that only the start of the * string needs to be an exact match.

*/ inline void SetOnStatusReason(Aws::String&& value) { m_onStatusReasonHasBeenSet = true; m_onStatusReason = std::move(value); } /** *

Contains a glob pattern to match against the StatusReason * returned for a job. The pattern can contain up to 512 characters. It can contain * letters, numbers, periods (.), colons (:), and white spaces (including spaces or * tabs). It can optionally end with an asterisk (*) so that only the start of the * string needs to be an exact match.

*/ inline void SetOnStatusReason(const char* value) { m_onStatusReasonHasBeenSet = true; m_onStatusReason.assign(value); } /** *

Contains a glob pattern to match against the StatusReason * returned for a job. The pattern can contain up to 512 characters. It can contain * letters, numbers, periods (.), colons (:), and white spaces (including spaces or * tabs). It can optionally end with an asterisk (*) so that only the start of the * string needs to be an exact match.

*/ inline EvaluateOnExit& WithOnStatusReason(const Aws::String& value) { SetOnStatusReason(value); return *this;} /** *

Contains a glob pattern to match against the StatusReason * returned for a job. The pattern can contain up to 512 characters. It can contain * letters, numbers, periods (.), colons (:), and white spaces (including spaces or * tabs). It can optionally end with an asterisk (*) so that only the start of the * string needs to be an exact match.

*/ inline EvaluateOnExit& WithOnStatusReason(Aws::String&& value) { SetOnStatusReason(std::move(value)); return *this;} /** *

Contains a glob pattern to match against the StatusReason * returned for a job. The pattern can contain up to 512 characters. It can contain * letters, numbers, periods (.), colons (:), and white spaces (including spaces or * tabs). It can optionally end with an asterisk (*) so that only the start of the * string needs to be an exact match.

*/ inline EvaluateOnExit& WithOnStatusReason(const char* value) { SetOnStatusReason(value); return *this;} /** *

Contains a glob pattern to match against the Reason returned for * a job. The pattern can contain up to 512 characters. It can contain letters, * numbers, periods (.), colons (:), and white space (including spaces and tabs). * It can optionally end with an asterisk (*) so that only the start of the string * needs to be an exact match.

*/ inline const Aws::String& GetOnReason() const{ return m_onReason; } /** *

Contains a glob pattern to match against the Reason returned for * a job. The pattern can contain up to 512 characters. It can contain letters, * numbers, periods (.), colons (:), and white space (including spaces and tabs). * It can optionally end with an asterisk (*) so that only the start of the string * needs to be an exact match.

*/ inline bool OnReasonHasBeenSet() const { return m_onReasonHasBeenSet; } /** *

Contains a glob pattern to match against the Reason returned for * a job. The pattern can contain up to 512 characters. It can contain letters, * numbers, periods (.), colons (:), and white space (including spaces and tabs). * It can optionally end with an asterisk (*) so that only the start of the string * needs to be an exact match.

*/ inline void SetOnReason(const Aws::String& value) { m_onReasonHasBeenSet = true; m_onReason = value; } /** *

Contains a glob pattern to match against the Reason returned for * a job. The pattern can contain up to 512 characters. It can contain letters, * numbers, periods (.), colons (:), and white space (including spaces and tabs). * It can optionally end with an asterisk (*) so that only the start of the string * needs to be an exact match.

*/ inline void SetOnReason(Aws::String&& value) { m_onReasonHasBeenSet = true; m_onReason = std::move(value); } /** *

Contains a glob pattern to match against the Reason returned for * a job. The pattern can contain up to 512 characters. It can contain letters, * numbers, periods (.), colons (:), and white space (including spaces and tabs). * It can optionally end with an asterisk (*) so that only the start of the string * needs to be an exact match.

*/ inline void SetOnReason(const char* value) { m_onReasonHasBeenSet = true; m_onReason.assign(value); } /** *

Contains a glob pattern to match against the Reason returned for * a job. The pattern can contain up to 512 characters. It can contain letters, * numbers, periods (.), colons (:), and white space (including spaces and tabs). * It can optionally end with an asterisk (*) so that only the start of the string * needs to be an exact match.

*/ inline EvaluateOnExit& WithOnReason(const Aws::String& value) { SetOnReason(value); return *this;} /** *

Contains a glob pattern to match against the Reason returned for * a job. The pattern can contain up to 512 characters. It can contain letters, * numbers, periods (.), colons (:), and white space (including spaces and tabs). * It can optionally end with an asterisk (*) so that only the start of the string * needs to be an exact match.

*/ inline EvaluateOnExit& WithOnReason(Aws::String&& value) { SetOnReason(std::move(value)); return *this;} /** *

Contains a glob pattern to match against the Reason returned for * a job. The pattern can contain up to 512 characters. It can contain letters, * numbers, periods (.), colons (:), and white space (including spaces and tabs). * It can optionally end with an asterisk (*) so that only the start of the string * needs to be an exact match.

*/ inline EvaluateOnExit& WithOnReason(const char* value) { SetOnReason(value); return *this;} /** *

Contains a glob pattern to match against the decimal representation of the * ExitCode returned for a job. The pattern can be up to 512 * characters long. It can contain only numbers, and can end with an asterisk (*) * so that only the start of the string needs to be an exact match.

The * string can contain up to 512 characters.

*/ inline const Aws::String& GetOnExitCode() const{ return m_onExitCode; } /** *

Contains a glob pattern to match against the decimal representation of the * ExitCode returned for a job. The pattern can be up to 512 * characters long. It can contain only numbers, and can end with an asterisk (*) * so that only the start of the string needs to be an exact match.

The * string can contain up to 512 characters.

*/ inline bool OnExitCodeHasBeenSet() const { return m_onExitCodeHasBeenSet; } /** *

Contains a glob pattern to match against the decimal representation of the * ExitCode returned for a job. The pattern can be up to 512 * characters long. It can contain only numbers, and can end with an asterisk (*) * so that only the start of the string needs to be an exact match.

The * string can contain up to 512 characters.

*/ inline void SetOnExitCode(const Aws::String& value) { m_onExitCodeHasBeenSet = true; m_onExitCode = value; } /** *

Contains a glob pattern to match against the decimal representation of the * ExitCode returned for a job. The pattern can be up to 512 * characters long. It can contain only numbers, and can end with an asterisk (*) * so that only the start of the string needs to be an exact match.

The * string can contain up to 512 characters.

*/ inline void SetOnExitCode(Aws::String&& value) { m_onExitCodeHasBeenSet = true; m_onExitCode = std::move(value); } /** *

Contains a glob pattern to match against the decimal representation of the * ExitCode returned for a job. The pattern can be up to 512 * characters long. It can contain only numbers, and can end with an asterisk (*) * so that only the start of the string needs to be an exact match.

The * string can contain up to 512 characters.

*/ inline void SetOnExitCode(const char* value) { m_onExitCodeHasBeenSet = true; m_onExitCode.assign(value); } /** *

Contains a glob pattern to match against the decimal representation of the * ExitCode returned for a job. The pattern can be up to 512 * characters long. It can contain only numbers, and can end with an asterisk (*) * so that only the start of the string needs to be an exact match.

The * string can contain up to 512 characters.

*/ inline EvaluateOnExit& WithOnExitCode(const Aws::String& value) { SetOnExitCode(value); return *this;} /** *

Contains a glob pattern to match against the decimal representation of the * ExitCode returned for a job. The pattern can be up to 512 * characters long. It can contain only numbers, and can end with an asterisk (*) * so that only the start of the string needs to be an exact match.

The * string can contain up to 512 characters.

*/ inline EvaluateOnExit& WithOnExitCode(Aws::String&& value) { SetOnExitCode(std::move(value)); return *this;} /** *

Contains a glob pattern to match against the decimal representation of the * ExitCode returned for a job. The pattern can be up to 512 * characters long. It can contain only numbers, and can end with an asterisk (*) * so that only the start of the string needs to be an exact match.

The * string can contain up to 512 characters.

*/ inline EvaluateOnExit& WithOnExitCode(const char* value) { SetOnExitCode(value); return *this;} /** *

Specifies the action to take if all of the specified conditions * (onStatusReason, onReason, and * onExitCode) are met. The values aren't case sensitive.

*/ inline const RetryAction& GetAction() const{ return m_action; } /** *

Specifies the action to take if all of the specified conditions * (onStatusReason, onReason, and * onExitCode) are met. The values aren't case sensitive.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

Specifies the action to take if all of the specified conditions * (onStatusReason, onReason, and * onExitCode) are met. The values aren't case sensitive.

*/ inline void SetAction(const RetryAction& value) { m_actionHasBeenSet = true; m_action = value; } /** *

Specifies the action to take if all of the specified conditions * (onStatusReason, onReason, and * onExitCode) are met. The values aren't case sensitive.

*/ inline void SetAction(RetryAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

Specifies the action to take if all of the specified conditions * (onStatusReason, onReason, and * onExitCode) are met. The values aren't case sensitive.

*/ inline EvaluateOnExit& WithAction(const RetryAction& value) { SetAction(value); return *this;} /** *

Specifies the action to take if all of the specified conditions * (onStatusReason, onReason, and * onExitCode) are met. The values aren't case sensitive.

*/ inline EvaluateOnExit& WithAction(RetryAction&& value) { SetAction(std::move(value)); return *this;} private: Aws::String m_onStatusReason; bool m_onStatusReasonHasBeenSet = false; Aws::String m_onReason; bool m_onReasonHasBeenSet = false; Aws::String m_onExitCode; bool m_onExitCodeHasBeenSet = false; RetryAction m_action; bool m_actionHasBeenSet = false; }; } // namespace Model } // namespace Batch } // namespace Aws