/usr/lib/python3/dist-packages/evernote/edam/error/ttypes.py is in reminders-app-autopilot 0.4+15.04.20141118-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | #
# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py:new_style,utf8strings
#
from thrift.Thrift import TType, TMessageType, TException, TApplicationException
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
from thrift.protocol import fastbinary
except:
fastbinary = None
class EDAMErrorCode(object):
"""
Numeric codes indicating the type of error that occurred on the
service.
<dl>
<dt>UNKNOWN</dt>
<dd>No information available about the error</dd>
<dt>BAD_DATA_FORMAT</dt>
<dd>The format of the request data was incorrect</dd>
<dt>PERMISSION_DENIED</dt>
<dd>Not permitted to perform action</dd>
<dt>INTERNAL_ERROR</dt>
<dd>Unexpected problem with the service</dd>
<dt>DATA_REQUIRED</dt>
<dd>A required parameter/field was absent</dd>
<dt>LIMIT_REACHED</dt>
<dd>Operation denied due to data model limit</dd>
<dt>QUOTA_REACHED</dt>
<dd>Operation denied due to user storage limit</dd>
<dt>INVALID_AUTH</dt>
<dd>Username and/or password incorrect</dd>
<dt>AUTH_EXPIRED</dt>
<dd>Authentication token expired</dd>
<dt>DATA_CONFLICT</dt>
<dd>Change denied due to data model conflict</dd>
<dt>ENML_VALIDATION</dt>
<dd>Content of submitted note was malformed</dd>
<dt>SHARD_UNAVAILABLE</dt>
<dd>Service shard with account data is temporarily down</dd>
<dt>LEN_TOO_SHORT</dt>
<dd>Operation denied due to data model limit, where something such
as a string length was too short</dd>
<dt>LEN_TOO_LONG</dt>
<dd>Operation denied due to data model limit, where something such
as a string length was too long</dd>
<dt>TOO_FEW</dt>
<dd>Operation denied due to data model limit, where there were
too few of something.</dd>
<dt>TOO_MANY</dt>
<dd>Operation denied due to data model limit, where there were
too many of something.</dd>
<dt>UNSUPPORTED_OPERATION</dt>
<dd>Operation denied because it is currently unsupported.</dd>
<dt>TAKEN_DOWN</dt>
<dd>Operation denied because access to the corresponding object is
prohibited in response to a take-down notice.</dd>
<dt>RATE_LIMIT_REACHED</dt>
<dd>Operation denied because the calling application has reached
its hourly API call limit for this user.</dd>
</dl>
"""
UNKNOWN = 1
BAD_DATA_FORMAT = 2
PERMISSION_DENIED = 3
INTERNAL_ERROR = 4
DATA_REQUIRED = 5
LIMIT_REACHED = 6
QUOTA_REACHED = 7
INVALID_AUTH = 8
AUTH_EXPIRED = 9
DATA_CONFLICT = 10
ENML_VALIDATION = 11
SHARD_UNAVAILABLE = 12
LEN_TOO_SHORT = 13
LEN_TOO_LONG = 14
TOO_FEW = 15
TOO_MANY = 16
UNSUPPORTED_OPERATION = 17
TAKEN_DOWN = 18
RATE_LIMIT_REACHED = 19
_VALUES_TO_NAMES = {
1: "UNKNOWN",
2: "BAD_DATA_FORMAT",
3: "PERMISSION_DENIED",
4: "INTERNAL_ERROR",
5: "DATA_REQUIRED",
6: "LIMIT_REACHED",
7: "QUOTA_REACHED",
8: "INVALID_AUTH",
9: "AUTH_EXPIRED",
10: "DATA_CONFLICT",
11: "ENML_VALIDATION",
12: "SHARD_UNAVAILABLE",
13: "LEN_TOO_SHORT",
14: "LEN_TOO_LONG",
15: "TOO_FEW",
16: "TOO_MANY",
17: "UNSUPPORTED_OPERATION",
18: "TAKEN_DOWN",
19: "RATE_LIMIT_REACHED",
}
_NAMES_TO_VALUES = {
"UNKNOWN": 1,
"BAD_DATA_FORMAT": 2,
"PERMISSION_DENIED": 3,
"INTERNAL_ERROR": 4,
"DATA_REQUIRED": 5,
"LIMIT_REACHED": 6,
"QUOTA_REACHED": 7,
"INVALID_AUTH": 8,
"AUTH_EXPIRED": 9,
"DATA_CONFLICT": 10,
"ENML_VALIDATION": 11,
"SHARD_UNAVAILABLE": 12,
"LEN_TOO_SHORT": 13,
"LEN_TOO_LONG": 14,
"TOO_FEW": 15,
"TOO_MANY": 16,
"UNSUPPORTED_OPERATION": 17,
"TAKEN_DOWN": 18,
"RATE_LIMIT_REACHED": 19,
}
class EDAMUserException(TException):
"""
This exception is thrown by EDAM procedures when a call fails as a result of
a problem that a caller may be able to resolve. For example, if the user
attempts to add a note to their account which would exceed their storage
quota, this type of exception may be thrown to indicate the source of the
error so that they can choose an alternate action.
This exception would not be used for internal system errors that do not
reflect user actions, but rather reflect a problem within the service that
the user cannot resolve.
errorCode: The numeric code indicating the type of error that occurred.
must be one of the values of EDAMErrorCode.
parameter: If the error applied to a particular input parameter, this will
indicate which parameter.
Attributes:
- errorCode
- parameter
"""
thrift_spec = (
None, # 0
(1, TType.I32, 'errorCode', None, None, ), # 1
(2, TType.STRING, 'parameter', None, None, ), # 2
)
def __init__(self, errorCode=None, parameter=None,):
self.errorCode = errorCode
self.parameter = parameter
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.I32:
self.errorCode = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.parameter = iprot.readString().decode('utf-8')
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('EDAMUserException')
if self.errorCode is not None:
oprot.writeFieldBegin('errorCode', TType.I32, 1)
oprot.writeI32(self.errorCode)
oprot.writeFieldEnd()
if self.parameter is not None:
oprot.writeFieldBegin('parameter', TType.STRING, 2)
oprot.writeString(self.parameter.encode('utf-8'))
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.errorCode is None:
raise TProtocol.TProtocolException(message='Required field errorCode is unset!')
return
def __str__(self):
return repr(self)
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class EDAMSystemException(TException):
"""
This exception is thrown by EDAM procedures when a call fails as a result of
a problem in the service that could not be changed through caller action.
errorCode: The numeric code indicating the type of error that occurred.
must be one of the values of EDAMErrorCode.
message: This may contain additional information about the error
rateLimitDuration: Indicates the minimum number of seconds that an application should
expect subsequent API calls for this user to fail. The application should not retry
API requests for the user until at least this many seconds have passed. Present only
when errorCode is RATE_LIMIT_REACHED,
Attributes:
- errorCode
- message
- rateLimitDuration
"""
thrift_spec = (
None, # 0
(1, TType.I32, 'errorCode', None, None, ), # 1
(2, TType.STRING, 'message', None, None, ), # 2
(3, TType.I32, 'rateLimitDuration', None, None, ), # 3
)
def __init__(self, errorCode=None, message=None, rateLimitDuration=None,):
self.errorCode = errorCode
self.message = message
self.rateLimitDuration = rateLimitDuration
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.I32:
self.errorCode = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.message = iprot.readString().decode('utf-8')
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.I32:
self.rateLimitDuration = iprot.readI32();
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('EDAMSystemException')
if self.errorCode is not None:
oprot.writeFieldBegin('errorCode', TType.I32, 1)
oprot.writeI32(self.errorCode)
oprot.writeFieldEnd()
if self.message is not None:
oprot.writeFieldBegin('message', TType.STRING, 2)
oprot.writeString(self.message.encode('utf-8'))
oprot.writeFieldEnd()
if self.rateLimitDuration is not None:
oprot.writeFieldBegin('rateLimitDuration', TType.I32, 3)
oprot.writeI32(self.rateLimitDuration)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.errorCode is None:
raise TProtocol.TProtocolException(message='Required field errorCode is unset!')
return
def __str__(self):
return repr(self)
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class EDAMNotFoundException(TException):
"""
This exception is thrown by EDAM procedures when a caller asks to perform
an operation on an object that does not exist. This may be thrown based on an invalid
primary identifier (e.g. a bad GUID), or when the caller refers to an object
by another unique identifier (e.g. a User's email address).
identifier: A description of the object that was not found on the server.
For example, "Note.notebookGuid" when a caller attempts to create a note in a
notebook that does not exist in the user's account.
key: The value passed from the client in the identifier, which was not
found. For example, the GUID that was not found.
Attributes:
- identifier
- key
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'identifier', None, None, ), # 1
(2, TType.STRING, 'key', None, None, ), # 2
)
def __init__(self, identifier=None, key=None,):
self.identifier = identifier
self.key = key
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.STRING:
self.identifier = iprot.readString().decode('utf-8')
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.key = iprot.readString().decode('utf-8')
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('EDAMNotFoundException')
if self.identifier is not None:
oprot.writeFieldBegin('identifier', TType.STRING, 1)
oprot.writeString(self.identifier.encode('utf-8'))
oprot.writeFieldEnd()
if self.key is not None:
oprot.writeFieldBegin('key', TType.STRING, 2)
oprot.writeString(self.key.encode('utf-8'))
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __str__(self):
return repr(self)
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
|