# Path: kosek/ImplementationDefinition/AttributeDefinitions.py
# class ImplAttrType(object):
#     UINT32  = 0
#     INT32   = 1
#     UINT64  = 2
#     INT64   = 3
#     FLOAT   = 4
#     ENUM    = 5
#     STRING  = 6
#     BOOLEAN = 7
# 
#     _types = {
#         'UINT32'    : UINT32,
#         'INT32'     : INT32,
#         'UINT64'    : UINT64,
#         'INT64'     : INT64,
#         'FLOAT'     : FLOAT,
#         'ENUM'      : ENUM,
#         'STRING'    : STRING,
#         'BOOLEAN'   : BOOLEAN
#     }
# 
#     _types_rev = dict([(v,k) for k,v in _types.items()])
#     _instance = None
# 
#     def __new__(cls):
#         if not cls._instance:
#             cls._instance = super(ImplAttrType, cls).__new__(cls)
#         return cls._instance
# 
#     @classmethod
#     def toString(cls, t):
#         return cls._types_rev[t]
# 
#     @classmethod
#     def fromString(cls, t):
#         return cls._types[t]


import unittest
from kosek.Logger import Logger
from collections import namedtuple
from kosek.ImplementationDefinition.AttributeDefinitions import ImplAttrType
    def _getValue(self):
        if self._type == AttributeValueContainter.AUTO_VALUE:
            return "AUTO"
        else:
            value = {
                AttributeValueContainter.ID_VALUE:      self._idValue,
                AttributeValueContainter.BOOL_VALUE:    self._booleanValue,
                AttributeValueContainter.NUMBER_VALUE:  self._number,
                AttributeValueContainter.FLOAT_VALUE:   self._number,
                AttributeValueContainter.STRING_VALUE:  self._stringValue,
            } [self._type]
            return value

    def _getType(self):
        return self._type

    def _getValues(self):
        return self._values

    typeCode = property(_getType)
    value = property(_getValue)
    values = property(_getValues)


def typeFromImplementationAttribute(type_):
    return {
      ImplAttrType.BOOLEAN: AttributeValueContainter.BOOL_VALUE,
      ImplAttrType.ENUM:    AttributeValueContainter.ID_VALUE,
      ImplAttrType.FLOAT:   AttributeValueContainter.FLOAT_VALUE,
      ImplAttrType.INT32:   AttributeValueContainter.NUMBER_VALUE,

# Path: kosek/ImplementationDefinition/AttributeDefinitions.py
# class ImplAttrType(object):
#     UINT32  = 0
#     INT32   = 1
#     UINT64  = 2
#     INT64   = 3
#     FLOAT   = 4
#     ENUM    = 5
#     STRING  = 6
#     BOOLEAN = 7
# 
#     _types = {
#         'UINT32'    : UINT32,
#         'INT32'     : INT32,
#         'UINT64'    : UINT64,
#         'INT64'     : INT64,
#         'FLOAT'     : FLOAT,
#         'ENUM'      : ENUM,
#         'STRING'    : STRING,
#         'BOOLEAN'   : BOOLEAN
#     }
# 
#     _types_rev = dict([(v,k) for k,v in _types.items()])
#     _instance = None
# 
#     def __new__(cls):
#         if not cls._instance:
#             cls._instance = super(ImplAttrType, cls).__new__(cls)
#         return cls._instance
# 
#     @classmethod
#     def toString(cls, t):
#         return cls._types_rev[t]
# 
#     @classmethod
#     def fromString(cls, t):
#         return cls._types[t]


# Path: kosek/ApplicationDefinition/AttributeValueContainter.py
import unittest
from kosek.Logger import Logger
from collections import namedtuple
from kosek.ImplementationDefinition.AttributeDefinitions import ImplAttrType

    def _getValue(self):
        if self._type == AttributeValueContainter.AUTO_VALUE:
            return "AUTO"
        else:
            value = {
                AttributeValueContainter.ID_VALUE:      self._idValue,
                AttributeValueContainter.BOOL_VALUE:    self._booleanValue,
                AttributeValueContainter.NUMBER_VALUE:  self._number,
                AttributeValueContainter.FLOAT_VALUE:   self._number,
                AttributeValueContainter.STRING_VALUE:  self._stringValue,
            } [self._type]
            return value

    def _getType(self):
        return self._type

    def _getValues(self):
        return self._values

    typeCode = property(_getType)
    value = property(_getValue)
    values = property(_getValues)


def typeFromImplementationAttribute(type_):
    return {
      ImplAttrType.BOOLEAN: AttributeValueContainter.BOOL_VALUE,
      ImplAttrType.ENUM:    AttributeValueContainter.ID_VALUE,
      ImplAttrType.FLOAT:   AttributeValueContainter.FLOAT_VALUE,
      ImplAttrType.INT32:   AttributeValueContainter.NUMBER_VALUE,

      ImplAttrType.INT64:   AttributeValueContainter.NUMBER_VALUE,