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/amp/PrometheusService_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17   class JsonValue;
18   class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace PrometheusService
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Request was denied due to request throttling.</p><p><h3>See Also:</h3>   <a
28    * href="http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ThrottlingException">AWS
29    * API Reference</a></p>
30    */
31   class AWS_PROMETHEUSSERVICE_API ThrottlingException
32   {
33   public:
34     ThrottlingException();
35     ThrottlingException(Aws::Utils::Json::JsonView jsonValue);
36     ThrottlingException& operator=(Aws::Utils::Json::JsonView jsonValue);
37     Aws::Utils::Json::JsonValue Jsonize() const;
38 
39 
40     /**
41      * <p>Description of the error.</p>
42      */
GetMessage()43     inline const Aws::String& GetMessage() const{ return m_message; }
44 
45     /**
46      * <p>Description of the error.</p>
47      */
MessageHasBeenSet()48     inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
49 
50     /**
51      * <p>Description of the error.</p>
52      */
SetMessage(const Aws::String & value)53     inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
54 
55     /**
56      * <p>Description of the error.</p>
57      */
SetMessage(Aws::String && value)58     inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); }
59 
60     /**
61      * <p>Description of the error.</p>
62      */
SetMessage(const char * value)63     inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
64 
65     /**
66      * <p>Description of the error.</p>
67      */
WithMessage(const Aws::String & value)68     inline ThrottlingException& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
69 
70     /**
71      * <p>Description of the error.</p>
72      */
WithMessage(Aws::String && value)73     inline ThrottlingException& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;}
74 
75     /**
76      * <p>Description of the error.</p>
77      */
WithMessage(const char * value)78     inline ThrottlingException& WithMessage(const char* value) { SetMessage(value); return *this;}
79 
80 
81     /**
82      * <p>Service Quotas requirement to identify originating quota.</p>
83      */
GetQuotaCode()84     inline const Aws::String& GetQuotaCode() const{ return m_quotaCode; }
85 
86     /**
87      * <p>Service Quotas requirement to identify originating quota.</p>
88      */
QuotaCodeHasBeenSet()89     inline bool QuotaCodeHasBeenSet() const { return m_quotaCodeHasBeenSet; }
90 
91     /**
92      * <p>Service Quotas requirement to identify originating quota.</p>
93      */
SetQuotaCode(const Aws::String & value)94     inline void SetQuotaCode(const Aws::String& value) { m_quotaCodeHasBeenSet = true; m_quotaCode = value; }
95 
96     /**
97      * <p>Service Quotas requirement to identify originating quota.</p>
98      */
SetQuotaCode(Aws::String && value)99     inline void SetQuotaCode(Aws::String&& value) { m_quotaCodeHasBeenSet = true; m_quotaCode = std::move(value); }
100 
101     /**
102      * <p>Service Quotas requirement to identify originating quota.</p>
103      */
SetQuotaCode(const char * value)104     inline void SetQuotaCode(const char* value) { m_quotaCodeHasBeenSet = true; m_quotaCode.assign(value); }
105 
106     /**
107      * <p>Service Quotas requirement to identify originating quota.</p>
108      */
WithQuotaCode(const Aws::String & value)109     inline ThrottlingException& WithQuotaCode(const Aws::String& value) { SetQuotaCode(value); return *this;}
110 
111     /**
112      * <p>Service Quotas requirement to identify originating quota.</p>
113      */
WithQuotaCode(Aws::String && value)114     inline ThrottlingException& WithQuotaCode(Aws::String&& value) { SetQuotaCode(std::move(value)); return *this;}
115 
116     /**
117      * <p>Service Quotas requirement to identify originating quota.</p>
118      */
WithQuotaCode(const char * value)119     inline ThrottlingException& WithQuotaCode(const char* value) { SetQuotaCode(value); return *this;}
120 
121 
122     /**
123      * <p>Advice to clients on when the call can be safely retried.</p>
124      */
GetRetryAfterSeconds()125     inline int GetRetryAfterSeconds() const{ return m_retryAfterSeconds; }
126 
127     /**
128      * <p>Advice to clients on when the call can be safely retried.</p>
129      */
RetryAfterSecondsHasBeenSet()130     inline bool RetryAfterSecondsHasBeenSet() const { return m_retryAfterSecondsHasBeenSet; }
131 
132     /**
133      * <p>Advice to clients on when the call can be safely retried.</p>
134      */
SetRetryAfterSeconds(int value)135     inline void SetRetryAfterSeconds(int value) { m_retryAfterSecondsHasBeenSet = true; m_retryAfterSeconds = value; }
136 
137     /**
138      * <p>Advice to clients on when the call can be safely retried.</p>
139      */
WithRetryAfterSeconds(int value)140     inline ThrottlingException& WithRetryAfterSeconds(int value) { SetRetryAfterSeconds(value); return *this;}
141 
142 
143     /**
144      * <p>Service Quotas requirement to identify originating service.</p>
145      */
GetServiceCode()146     inline const Aws::String& GetServiceCode() const{ return m_serviceCode; }
147 
148     /**
149      * <p>Service Quotas requirement to identify originating service.</p>
150      */
ServiceCodeHasBeenSet()151     inline bool ServiceCodeHasBeenSet() const { return m_serviceCodeHasBeenSet; }
152 
153     /**
154      * <p>Service Quotas requirement to identify originating service.</p>
155      */
SetServiceCode(const Aws::String & value)156     inline void SetServiceCode(const Aws::String& value) { m_serviceCodeHasBeenSet = true; m_serviceCode = value; }
157 
158     /**
159      * <p>Service Quotas requirement to identify originating service.</p>
160      */
SetServiceCode(Aws::String && value)161     inline void SetServiceCode(Aws::String&& value) { m_serviceCodeHasBeenSet = true; m_serviceCode = std::move(value); }
162 
163     /**
164      * <p>Service Quotas requirement to identify originating service.</p>
165      */
SetServiceCode(const char * value)166     inline void SetServiceCode(const char* value) { m_serviceCodeHasBeenSet = true; m_serviceCode.assign(value); }
167 
168     /**
169      * <p>Service Quotas requirement to identify originating service.</p>
170      */
WithServiceCode(const Aws::String & value)171     inline ThrottlingException& WithServiceCode(const Aws::String& value) { SetServiceCode(value); return *this;}
172 
173     /**
174      * <p>Service Quotas requirement to identify originating service.</p>
175      */
WithServiceCode(Aws::String && value)176     inline ThrottlingException& WithServiceCode(Aws::String&& value) { SetServiceCode(std::move(value)); return *this;}
177 
178     /**
179      * <p>Service Quotas requirement to identify originating service.</p>
180      */
WithServiceCode(const char * value)181     inline ThrottlingException& WithServiceCode(const char* value) { SetServiceCode(value); return *this;}
182 
183   private:
184 
185     Aws::String m_message;
186     bool m_messageHasBeenSet;
187 
188     Aws::String m_quotaCode;
189     bool m_quotaCodeHasBeenSet;
190 
191     int m_retryAfterSeconds;
192     bool m_retryAfterSecondsHasBeenSet;
193 
194     Aws::String m_serviceCode;
195     bool m_serviceCodeHasBeenSet;
196   };
197 
198 } // namespace Model
199 } // namespace PrometheusService
200 } // namespace Aws
201