1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/batch/Batch_EXPORTS.h> 8 9 namespace Aws 10 { 11 namespace Utils 12 { 13 namespace Json 14 { 15 class JsonValue; 16 class JsonView; 17 } // namespace Json 18 } // namespace Utils 19 namespace Batch 20 { 21 namespace Model 22 { 23 24 /** 25 * <p>An object representing a job timeout configuration.</p><p><h3>See Also:</h3> 26 * <a href="http://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobTimeout">AWS 27 * API Reference</a></p> 28 */ 29 class AWS_BATCH_API JobTimeout 30 { 31 public: 32 JobTimeout(); 33 JobTimeout(Aws::Utils::Json::JsonView jsonValue); 34 JobTimeout& operator=(Aws::Utils::Json::JsonView jsonValue); 35 Aws::Utils::Json::JsonValue Jsonize() const; 36 37 38 /** 39 * <p>The time duration in seconds (measured from the job attempt's 40 * <code>startedAt</code> timestamp) after which Batch terminates your jobs if they 41 * have not finished. The minimum value for the timeout is 60 seconds.</p> 42 */ GetAttemptDurationSeconds()43 inline int GetAttemptDurationSeconds() const{ return m_attemptDurationSeconds; } 44 45 /** 46 * <p>The time duration in seconds (measured from the job attempt's 47 * <code>startedAt</code> timestamp) after which Batch terminates your jobs if they 48 * have not finished. The minimum value for the timeout is 60 seconds.</p> 49 */ AttemptDurationSecondsHasBeenSet()50 inline bool AttemptDurationSecondsHasBeenSet() const { return m_attemptDurationSecondsHasBeenSet; } 51 52 /** 53 * <p>The time duration in seconds (measured from the job attempt's 54 * <code>startedAt</code> timestamp) after which Batch terminates your jobs if they 55 * have not finished. The minimum value for the timeout is 60 seconds.</p> 56 */ SetAttemptDurationSeconds(int value)57 inline void SetAttemptDurationSeconds(int value) { m_attemptDurationSecondsHasBeenSet = true; m_attemptDurationSeconds = value; } 58 59 /** 60 * <p>The time duration in seconds (measured from the job attempt's 61 * <code>startedAt</code> timestamp) after which Batch terminates your jobs if they 62 * have not finished. The minimum value for the timeout is 60 seconds.</p> 63 */ WithAttemptDurationSeconds(int value)64 inline JobTimeout& WithAttemptDurationSeconds(int value) { SetAttemptDurationSeconds(value); return *this;} 65 66 private: 67 68 int m_attemptDurationSeconds; 69 bool m_attemptDurationSecondsHasBeenSet; 70 }; 71 72 } // namespace Model 73 } // namespace Batch 74 } // namespace Aws 75