AWS SDK for C++

AWS SDK for C++ Version 1.11.752

Loading...
Searching...
No Matches
ThrottlingException.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/deadline/Deadline_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace deadline {
21namespace Model {
22
29 public:
30 AWS_DEADLINE_API ThrottlingException() = default;
33 AWS_DEADLINE_API Aws::Utils::Json::JsonValue Jsonize() const;
34
36
37 inline const Aws::String& GetMessage() const { return m_message; }
38 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
39 template <typename MessageT = Aws::String>
40 void SetMessage(MessageT&& value) {
41 m_messageHasBeenSet = true;
42 m_message = std::forward<MessageT>(value);
43 }
44 template <typename MessageT = Aws::String>
45 ThrottlingException& WithMessage(MessageT&& value) {
46 SetMessage(std::forward<MessageT>(value));
47 return *this;
48 }
50
52
55 inline const Aws::String& GetServiceCode() const { return m_serviceCode; }
56 inline bool ServiceCodeHasBeenSet() const { return m_serviceCodeHasBeenSet; }
57 template <typename ServiceCodeT = Aws::String>
58 void SetServiceCode(ServiceCodeT&& value) {
59 m_serviceCodeHasBeenSet = true;
60 m_serviceCode = std::forward<ServiceCodeT>(value);
61 }
62 template <typename ServiceCodeT = Aws::String>
63 ThrottlingException& WithServiceCode(ServiceCodeT&& value) {
64 SetServiceCode(std::forward<ServiceCodeT>(value));
65 return *this;
66 }
68
70
73 inline const Aws::String& GetQuotaCode() const { return m_quotaCode; }
74 inline bool QuotaCodeHasBeenSet() const { return m_quotaCodeHasBeenSet; }
75 template <typename QuotaCodeT = Aws::String>
76 void SetQuotaCode(QuotaCodeT&& value) {
77 m_quotaCodeHasBeenSet = true;
78 m_quotaCode = std::forward<QuotaCodeT>(value);
79 }
80 template <typename QuotaCodeT = Aws::String>
81 ThrottlingException& WithQuotaCode(QuotaCodeT&& value) {
82 SetQuotaCode(std::forward<QuotaCodeT>(value));
83 return *this;
84 }
86
88
91 inline int GetRetryAfterSeconds() const { return m_retryAfterSeconds; }
92 inline bool RetryAfterSecondsHasBeenSet() const { return m_retryAfterSecondsHasBeenSet; }
93 inline void SetRetryAfterSeconds(int value) {
94 m_retryAfterSecondsHasBeenSet = true;
95 m_retryAfterSeconds = value;
96 }
99 return *this;
100 }
102
104
107 inline const Aws::Map<Aws::String, Aws::String>& GetContext() const { return m_context; }
108 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
109 template <typename ContextT = Aws::Map<Aws::String, Aws::String>>
110 void SetContext(ContextT&& value) {
111 m_contextHasBeenSet = true;
112 m_context = std::forward<ContextT>(value);
113 }
114 template <typename ContextT = Aws::Map<Aws::String, Aws::String>>
115 ThrottlingException& WithContext(ContextT&& value) {
116 SetContext(std::forward<ContextT>(value));
117 return *this;
118 }
119 template <typename ContextKeyT = Aws::String, typename ContextValueT = Aws::String>
120 ThrottlingException& AddContext(ContextKeyT&& key, ContextValueT&& value) {
121 m_contextHasBeenSet = true;
122 m_context.emplace(std::forward<ContextKeyT>(key), std::forward<ContextValueT>(value));
123 return *this;
124 }
126 private:
127 Aws::String m_message;
128
129 Aws::String m_serviceCode;
130
131 Aws::String m_quotaCode;
132
133 int m_retryAfterSeconds{0};
134
136 bool m_messageHasBeenSet = false;
137 bool m_serviceCodeHasBeenSet = false;
138 bool m_quotaCodeHasBeenSet = false;
139 bool m_retryAfterSecondsHasBeenSet = false;
140 bool m_contextHasBeenSet = false;
141};
142
143} // namespace Model
144} // namespace deadline
145} // namespace Aws
ThrottlingException & WithServiceCode(ServiceCodeT &&value)
ThrottlingException & WithQuotaCode(QuotaCodeT &&value)
ThrottlingException & AddContext(ContextKeyT &&key, ContextValueT &&value)
const Aws::Map< Aws::String, Aws::String > & GetContext() const
AWS_DEADLINE_API ThrottlingException(Aws::Utils::Json::JsonView jsonValue)
AWS_DEADLINE_API ThrottlingException()=default
AWS_DEADLINE_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_DEADLINE_API ThrottlingException & operator=(Aws::Utils::Json::JsonView jsonValue)
ThrottlingException & WithMessage(MessageT &&value)
ThrottlingException & WithRetryAfterSeconds(int value)
ThrottlingException & WithContext(ContextT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue