forked from aws/aws-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTooManyRequestsException.java
More file actions
167 lines (138 loc) · 4.2 KB
/
TooManyRequestsException.java
File metadata and controls
167 lines (138 loc) · 4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/*
* Copyright 2013-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.lambda.model;
import javax.annotation.Generated;
/**
* <p>
* </p>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class TooManyRequestsException extends com.amazonaws.services.lambda.model.AWSLambdaException {
private static final long serialVersionUID = 1L;
/**
* <p>
* The number of seconds the caller should wait before retrying.
* </p>
*/
private String retryAfterSeconds;
private String type;
private String reason;
/**
* Constructs a new TooManyRequestsException with the specified error message.
*
* @param message
* Describes the error encountered.
*/
public TooManyRequestsException(String message) {
super(message);
}
/**
* <p>
* The number of seconds the caller should wait before retrying.
* </p>
*
* @param retryAfterSeconds
* The number of seconds the caller should wait before retrying.
*/
@com.fasterxml.jackson.annotation.JsonProperty("Retry-After")
public void setRetryAfterSeconds(String retryAfterSeconds) {
this.retryAfterSeconds = retryAfterSeconds;
}
/**
* <p>
* The number of seconds the caller should wait before retrying.
* </p>
*
* @return The number of seconds the caller should wait before retrying.
*/
@com.fasterxml.jackson.annotation.JsonProperty("Retry-After")
public String getRetryAfterSeconds() {
return this.retryAfterSeconds;
}
/**
* <p>
* The number of seconds the caller should wait before retrying.
* </p>
*
* @param retryAfterSeconds
* The number of seconds the caller should wait before retrying.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TooManyRequestsException withRetryAfterSeconds(String retryAfterSeconds) {
setRetryAfterSeconds(retryAfterSeconds);
return this;
}
/**
* @param type
*/
@com.fasterxml.jackson.annotation.JsonProperty("Type")
public void setType(String type) {
this.type = type;
}
/**
* @return
*/
@com.fasterxml.jackson.annotation.JsonProperty("Type")
public String getType() {
return this.type;
}
/**
* @param type
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TooManyRequestsException withType(String type) {
setType(type);
return this;
}
/**
* @param reason
* @see ThrottleReason
*/
@com.fasterxml.jackson.annotation.JsonProperty("Reason")
public void setReason(String reason) {
this.reason = reason;
}
/**
* @return
* @see ThrottleReason
*/
@com.fasterxml.jackson.annotation.JsonProperty("Reason")
public String getReason() {
return this.reason;
}
/**
* @param reason
* @return Returns a reference to this object so that method calls can be chained together.
* @see ThrottleReason
*/
public TooManyRequestsException withReason(String reason) {
setReason(reason);
return this;
}
/**
* @param reason
* @see ThrottleReason
*/
public void setReason(ThrottleReason reason) {
withReason(reason);
}
/**
* @param reason
* @return Returns a reference to this object so that method calls can be chained together.
* @see ThrottleReason
*/
public TooManyRequestsException withReason(ThrottleReason reason) {
this.reason = reason.toString();
return this;
}
}