AWS SDK for C++

AWS SDK for C++ Version 1.11.773

Loading...
Searching...
No Matches
ServiceJobPreemptionSummary.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/ServiceJobPreemptedAttempt.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace Batch {
21namespace Model {
22
30 public:
31 AWS_BATCH_API ServiceJobPreemptionSummary() = default;
34 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline int GetPreemptedAttemptCount() const { return m_preemptedAttemptCount; }
41 inline bool PreemptedAttemptCountHasBeenSet() const { return m_preemptedAttemptCountHasBeenSet; }
42 inline void SetPreemptedAttemptCount(int value) {
43 m_preemptedAttemptCountHasBeenSet = true;
44 m_preemptedAttemptCount = value;
45 }
48 return *this;
49 }
51
53
56 inline const Aws::Vector<ServiceJobPreemptedAttempt>& GetRecentPreemptedAttempts() const { return m_recentPreemptedAttempts; }
57 inline bool RecentPreemptedAttemptsHasBeenSet() const { return m_recentPreemptedAttemptsHasBeenSet; }
58 template <typename RecentPreemptedAttemptsT = Aws::Vector<ServiceJobPreemptedAttempt>>
59 void SetRecentPreemptedAttempts(RecentPreemptedAttemptsT&& value) {
60 m_recentPreemptedAttemptsHasBeenSet = true;
61 m_recentPreemptedAttempts = std::forward<RecentPreemptedAttemptsT>(value);
62 }
63 template <typename RecentPreemptedAttemptsT = Aws::Vector<ServiceJobPreemptedAttempt>>
64 ServiceJobPreemptionSummary& WithRecentPreemptedAttempts(RecentPreemptedAttemptsT&& value) {
65 SetRecentPreemptedAttempts(std::forward<RecentPreemptedAttemptsT>(value));
66 return *this;
67 }
68 template <typename RecentPreemptedAttemptsT = ServiceJobPreemptedAttempt>
69 ServiceJobPreemptionSummary& AddRecentPreemptedAttempts(RecentPreemptedAttemptsT&& value) {
70 m_recentPreemptedAttemptsHasBeenSet = true;
71 m_recentPreemptedAttempts.emplace_back(std::forward<RecentPreemptedAttemptsT>(value));
72 return *this;
73 }
75 private:
76 int m_preemptedAttemptCount{0};
77
78 Aws::Vector<ServiceJobPreemptedAttempt> m_recentPreemptedAttempts;
79 bool m_preemptedAttemptCountHasBeenSet = false;
80 bool m_recentPreemptedAttemptsHasBeenSet = false;
81};
82
83} // namespace Model
84} // namespace Batch
85} // namespace Aws
AWS_BATCH_API ServiceJobPreemptionSummary(Aws::Utils::Json::JsonView jsonValue)
void SetRecentPreemptedAttempts(RecentPreemptedAttemptsT &&value)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
ServiceJobPreemptionSummary & WithPreemptedAttemptCount(int value)
AWS_BATCH_API ServiceJobPreemptionSummary & operator=(Aws::Utils::Json::JsonView jsonValue)
ServiceJobPreemptionSummary & AddRecentPreemptedAttempts(RecentPreemptedAttemptsT &&value)
const Aws::Vector< ServiceJobPreemptedAttempt > & GetRecentPreemptedAttempts() const
AWS_BATCH_API ServiceJobPreemptionSummary()=default
ServiceJobPreemptionSummary & WithRecentPreemptedAttempts(RecentPreemptedAttemptsT &&value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue