1 /*
2 * This file is part of Waarp Project (named also Waarp or GG).
3 *
4 * Copyright (c) 2019, Waarp SAS, and individual contributors by the @author
5 * tags. See the COPYRIGHT.txt in the distribution for a full listing of
6 * individual contributors.
7 *
8 * All Waarp Project is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version.
12 *
13 * Waarp is distributed in the hope that it will be useful, but WITHOUT ANY
14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * Waarp . If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 /**
22 * Autogenerated by Thrift Compiler (0.9.0)
23 * <p>
24 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
25 */
26 package org.waarp.thrift.r66;
27
28 import org.apache.thrift.TEnum;
29
30 public enum ErrorCode implements TEnum {
31 /**
32 * Code stands for initialization ok (internal connection, authentication)
33 */
34 InitOk(0),
35 /**
36 * Code stands for pre processing ok
37 */
38 PreProcessingOk(1),
39 /**
40 * Code stands for transfer OK
41 */
42 TransferOk(2),
43 /**
44 * Code stands for post processing ok
45 */
46 PostProcessingOk(3),
47 /**
48 * Code stands for All action are completed ok
49 */
50 CompleteOk(4),
51 /**
52 * Code stands for connection is impossible (remote or local reason)
53 */
54 ConnectionImpossible(5),
55 /**
56 * Code stands for connection is impossible now due to limits(remote or
57 * local
58 * reason)
59 */
60 ServerOverloaded(6),
61 /**
62 * Code stands for bad authentication (remote or local)
63 */
64 BadAuthent(7),
65 /**
66 * Code stands for External operation in error (pre, post or error
67 * processing)
68 */
69 ExternalOp(8),
70 /**
71 * Code stands for Transfer is in error
72 */
73 TransferError(9),
74 /**
75 * Code stands for Transfer in error due to MD5
76 */
77 MD5Error(10),
78 /**
79 * Code stands for Network disconnection
80 */
81 Disconnection(11),
82 /**
83 * Code stands for Remote Shutdown
84 */
85 RemoteShutdown(12),
86 /**
87 * Code stands for final action (like moving file) is in error
88 */
89 FinalOp(13),
90 /**
91 * Code stands for unimplemented feature
92 */
93 Unimplemented(14),
94 /**
95 * Code stands for shutdown is in progress
96 */
97 Shutdown(15),
98 /**
99 * Code stands for a remote error is received
100 */
101 RemoteError(16),
102 /**
103 * Code stands for an internal error
104 */
105 Internal(17),
106 /**
107 * Code stands for a request of stopping transfer
108 */
109 StoppedTransfer(18),
110 /**
111 * Code stands for a request of canceling transfer
112 */
113 CanceledTransfer(19),
114 /**
115 * Warning in execution
116 */
117 Warning(20),
118 /**
119 * Code stands for unknown type of error
120 */
121 Unknown(21),
122 /**
123 * Code stands for a request that is already remotely finished
124 */
125 QueryAlreadyFinished(22),
126 /**
127 * Code stands for request that is still running
128 */
129 QueryStillRunning(23),
130 /**
131 * Code stands for not known host
132 */
133 NotKnownHost(24),
134 /**
135 * Code stands for self requested host starting request is invalid
136 */
137 LoopSelfRequestedHost(25),
138 /**
139 * Code stands for request should exist but is not found on remote host
140 */
141 QueryRemotelyUnknown(26),
142 /**
143 * Code stands for File not found error
144 */
145 FileNotFound(27),
146 /**
147 * Code stands for Command not found error
148 */
149 CommandNotFound(28),
150 /**
151 * Code stands for a request in PassThroughMode and required action is
152 * incompatible with this mode
153 */
154 PassThroughMode(29),
155 /**
156 * Code stands for running step
157 */
158 Running(30);
159
160 private final int value;
161
162 ErrorCode(final int value) {
163 this.value = value;
164 }
165
166 /**
167 * Get the integer value of this enum value, as defined in the Thrift IDL.
168 */
169 @Override
170 public final int getValue() {
171 return value;
172 }
173
174 /**
175 * Find a the enum type by its integer value, as defined in the Thrift IDL.
176 *
177 * @return null if the value is not found.
178 */
179 public static ErrorCode findByValue(final int value) {
180 switch (value) {
181 case 0:
182 return InitOk;
183 case 1:
184 return PreProcessingOk;
185 case 2:
186 return TransferOk;
187 case 3:
188 return PostProcessingOk;
189 case 4:
190 return CompleteOk;
191 case 5:
192 return ConnectionImpossible;
193 case 6:
194 return ServerOverloaded;
195 case 7:
196 return BadAuthent;
197 case 8:
198 return ExternalOp;
199 case 9:
200 return TransferError;
201 case 10:
202 return MD5Error;
203 case 11:
204 return Disconnection;
205 case 12:
206 return RemoteShutdown;
207 case 13:
208 return FinalOp;
209 case 14:
210 return Unimplemented;
211 case 15:
212 return Shutdown;
213 case 16:
214 return RemoteError;
215 case 17:
216 return Internal;
217 case 18:
218 return StoppedTransfer;
219 case 19:
220 return CanceledTransfer;
221 case 20:
222 return Warning;
223 case 21:
224 return Unknown;
225 case 22:
226 return QueryAlreadyFinished;
227 case 23:
228 return QueryStillRunning;
229 case 24:
230 return NotKnownHost;
231 case 25:
232 return LoopSelfRequestedHost;
233 case 26:
234 return QueryRemotelyUnknown;
235 case 27:
236 return FileNotFound;
237 case 28:
238 return CommandNotFound;
239 case 29:
240 return PassThroughMode;
241 case 30:
242 return Running;
243 default:
244 return null;
245 }
246 }
247 }