'use strict';

//
// Autogenerated by Thrift Compiler (0.6.0-en-exported)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//


// Define types and services

var Thrift = require('../thrift');
var Types = require('./Types');

module.exports.EDAMErrorCode = {
  '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,
  'BUSINESS_SECURITY_LOGIN_REQUIRED': 20,
  'DEVICE_LIMIT_REACHED': 21
};

module.exports.EDAMInvalidContactReason = {
  'BAD_ADDRESS': 0,
  'DUPLICATE_CONTACT': 1,
  'NO_CONNECTION': 2
};

module.exports.EDAMUserException = Thrift.Exception.define('EDAMUserException', {
  1: { alias: 'errorCode', type: Thrift.Type.I32 },
  2: { alias: 'parameter', type: Thrift.Type.STRING }
});

module.exports.EDAMSystemException = Thrift.Exception.define('EDAMSystemException', {
  1: { alias: 'errorCode', type: Thrift.Type.I32 },
  2: { alias: 'message', type: Thrift.Type.STRING },
  3: { alias: 'rateLimitDuration', type: Thrift.Type.I32 }
});

module.exports.EDAMNotFoundException = Thrift.Exception.define('EDAMNotFoundException', {
  1: { alias: 'identifier', type: Thrift.Type.STRING },
  2: { alias: 'key', type: Thrift.Type.STRING }
});

module.exports.EDAMInvalidContactsException = Thrift.Exception.define('EDAMInvalidContactsException', {
  1: { alias: 'contacts', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.STRUCT, Types.Contact) },
  2: { alias: 'parameter', type: Thrift.Type.STRING },
  3: { alias: 'reasons', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.I32) }
});