# Path: monolithe/lib/sdkutils.py
# class SDKUtils(object):
#     """ SDK Utilities
# 
#     """
# 
#     idiomatic_methods_cache = {}
#     type_methods_cache = {}
# 
#     @classmethod
#     def massage_type_name(cls, type_name):
#         """ Returns a readable type according to a java type
# 
#         """
#         if type_name.lower() in ("enum", "enumeration"):
#             return "enum"
# 
#         if type_name.lower() in ("str", "string"):
#             return "string"
# 
#         if type_name.lower() in ("boolean", "bool"):
#             return "boolean"
# 
#         if type_name.lower() in ("int", "integer"):
#             return "integer"
# 
#         if type_name.lower() in ("date", "datetime", "time"):
#             return "time"
# 
#         if type_name.lower() in ("double", "float", "long"):
#             return "float"
# 
#         if type_name.lower() in ("list", "array"):
#             return "list"
# 
#         if type_name.lower() in ("object", "dict"):
#             return "object"
# 
#         if "array" in type_name.lower():
#             return "list"
# 
#         return "string"
# 
#     @classmethod
#     def get_plural(cls, singular_name):
#         """ Returns the plural name of the singular name
# 
#             Certain words are invariant.
# 
#             Args:
#                 singular_name (string): the singular name to pluralize
# 
#             Returns:
#                 The pluralized version of the singular name
# 
#         """
#         if singular_name[-1] == "y" and singular_name[-2] not in ["a", "e", "i", "o", "u", "y"]:
#             return singular_name[:-1] + "ies"
# 
#         if singular_name[-1] != "s":
#             return singular_name + "s"
# 
#         return singular_name
# 
#     @classmethod
#     def get_string_version(cls, version):
#         """ Get the sdk version according to the given version
# 
#             Args:
#                 version (float): the version
# 
#             Returns:
#                 version as string
# 
#             Example:
#                 get_string_version(3.1)
#                 >>> v3_1
# 
#         """
#         if version == "master":
#             return version
# 
#         return ("v%s" % version).replace(".", "_")
# 
#     @classmethod
#     def get_float_version(cls, string_version):
#         """ Get the sdk version as float according to the given string version
# 
#             Args:
#                 string_version (stirng): the version
# 
#             Returns:
#                 version as float
# 
#             Example:
#                 get_float_version("v3_1")
#                 >>> 3.1
# 
#         """
#         if string_version == "master":
#             return string_version
# 
#         return float(string_version.replace("v", "").replace("_", "."))
# 
#     # Commons language conversion
# 
#     @classmethod
#     def get_idiomatic_name_in_language(cls, name, language):
#         """ Get the name for the given language
# 
#             Args:
#                 name (str): the name to convert
#                 language (str): the language to use
# 
#             Returns:
#                 a name in the given language
# 
#             Example:
#                 get_idiomatic_name_in_language("EnterpriseNetwork", "python")
#                 >>> enterprise_network
#         """
#         if language in cls.idiomatic_methods_cache:
#             m = cls.idiomatic_methods_cache[language]
#             if not m:
#                 return name
#             return m(name)
# 
#         found, method = load_language_plugins(language, 'get_idiomatic_name')
#         if found:
#             cls.idiomatic_methods_cache[language] = method
#             if method:
#                 return method(name)
#             else:
#                 return name
# 
#         module = importlib.import_module('.lang.%s' % language, package="monolithe.generators")
# 
#         if not hasattr(module, 'get_idiomatic_name'):
#             cls.idiomatic_methods_cache[language] = None
#             return name
# 
#         method = getattr(module, 'get_idiomatic_name')
#         cls.idiomatic_methods_cache[language] = method
#         return method(name)
# 
#     @classmethod
#     def get_type_name_in_language(cls, type_name, sub_type, language):
#         """ Get the type for the given language
# 
#             Args:
#                 type_name (str): the type to convert
#                 language (str): the language to use
# 
#             Returns:
#                 a type name in the given language
# 
#             Example:
#                 get_type_name_in_language("Varchar", "python")
#                 >>> str
#         """
#         if language in cls.type_methods_cache:
#             m = cls.type_methods_cache[language]
#             if not m:
#                 return type_name
#             return m(type_name)
# 
#         found, method = load_language_plugins(language, 'get_type_name')
#         if found:
#             cls.type_methods_cache[language] = method
#             if method:
#                 return method(type_name, sub_type)
#             else:
#                 return type_name
# 
#         module = importlib.import_module('.lang.%s' % language, package="monolithe.generators")
# 
#         if not hasattr(module, 'get_type_name'):
#             cls.type_methods_cache[language] = None
#             return type_name
# 
#         method = getattr(module, 'get_type_name')
#         cls.type_methods_cache[language] = method
#         return method(type_name, sub_type)


from builtins import object
from monolithe.lib import SDKUtils
        self.min_length = None
        self.min_value = None
        self.orderable = False
        self.read_only = False
        self.required = False
        self.unique = False
        self.unique_scope = None
        self._type = None
        self.exposed = False
        self.transient = False
        self.subtype = None
        self.userlabel = None

        self.specification = specification
        # Load information from data
        if data:
            self.from_dict(data)

    @property
    def type(self):
        """
        """
        return self._type

    @type.setter
    def type(self, value):
        """
        """
        language = self.specification.monolithe_config.language if self.specification and self.specification.monolithe_config else 'python'


# Path: monolithe/lib/sdkutils.py
# class SDKUtils(object):
#     """ SDK Utilities
# 
#     """
# 
#     idiomatic_methods_cache = {}
#     type_methods_cache = {}
# 
#     @classmethod
#     def massage_type_name(cls, type_name):
#         """ Returns a readable type according to a java type
# 
#         """
#         if type_name.lower() in ("enum", "enumeration"):
#             return "enum"
# 
#         if type_name.lower() in ("str", "string"):
#             return "string"
# 
#         if type_name.lower() in ("boolean", "bool"):
#             return "boolean"
# 
#         if type_name.lower() in ("int", "integer"):
#             return "integer"
# 
#         if type_name.lower() in ("date", "datetime", "time"):
#             return "time"
# 
#         if type_name.lower() in ("double", "float", "long"):
#             return "float"
# 
#         if type_name.lower() in ("list", "array"):
#             return "list"
# 
#         if type_name.lower() in ("object", "dict"):
#             return "object"
# 
#         if "array" in type_name.lower():
#             return "list"
# 
#         return "string"
# 
#     @classmethod
#     def get_plural(cls, singular_name):
#         """ Returns the plural name of the singular name
# 
#             Certain words are invariant.
# 
#             Args:
#                 singular_name (string): the singular name to pluralize
# 
#             Returns:
#                 The pluralized version of the singular name
# 
#         """
#         if singular_name[-1] == "y" and singular_name[-2] not in ["a", "e", "i", "o", "u", "y"]:
#             return singular_name[:-1] + "ies"
# 
#         if singular_name[-1] != "s":
#             return singular_name + "s"
# 
#         return singular_name
# 
#     @classmethod
#     def get_string_version(cls, version):
#         """ Get the sdk version according to the given version
# 
#             Args:
#                 version (float): the version
# 
#             Returns:
#                 version as string
# 
#             Example:
#                 get_string_version(3.1)
#                 >>> v3_1
# 
#         """
#         if version == "master":
#             return version
# 
#         return ("v%s" % version).replace(".", "_")
# 
#     @classmethod
#     def get_float_version(cls, string_version):
#         """ Get the sdk version as float according to the given string version
# 
#             Args:
#                 string_version (stirng): the version
# 
#             Returns:
#                 version as float
# 
#             Example:
#                 get_float_version("v3_1")
#                 >>> 3.1
# 
#         """
#         if string_version == "master":
#             return string_version
# 
#         return float(string_version.replace("v", "").replace("_", "."))
# 
#     # Commons language conversion
# 
#     @classmethod
#     def get_idiomatic_name_in_language(cls, name, language):
#         """ Get the name for the given language
# 
#             Args:
#                 name (str): the name to convert
#                 language (str): the language to use
# 
#             Returns:
#                 a name in the given language
# 
#             Example:
#                 get_idiomatic_name_in_language("EnterpriseNetwork", "python")
#                 >>> enterprise_network
#         """
#         if language in cls.idiomatic_methods_cache:
#             m = cls.idiomatic_methods_cache[language]
#             if not m:
#                 return name
#             return m(name)
# 
#         found, method = load_language_plugins(language, 'get_idiomatic_name')
#         if found:
#             cls.idiomatic_methods_cache[language] = method
#             if method:
#                 return method(name)
#             else:
#                 return name
# 
#         module = importlib.import_module('.lang.%s' % language, package="monolithe.generators")
# 
#         if not hasattr(module, 'get_idiomatic_name'):
#             cls.idiomatic_methods_cache[language] = None
#             return name
# 
#         method = getattr(module, 'get_idiomatic_name')
#         cls.idiomatic_methods_cache[language] = method
#         return method(name)
# 
#     @classmethod
#     def get_type_name_in_language(cls, type_name, sub_type, language):
#         """ Get the type for the given language
# 
#             Args:
#                 type_name (str): the type to convert
#                 language (str): the language to use
# 
#             Returns:
#                 a type name in the given language
# 
#             Example:
#                 get_type_name_in_language("Varchar", "python")
#                 >>> str
#         """
#         if language in cls.type_methods_cache:
#             m = cls.type_methods_cache[language]
#             if not m:
#                 return type_name
#             return m(type_name)
# 
#         found, method = load_language_plugins(language, 'get_type_name')
#         if found:
#             cls.type_methods_cache[language] = method
#             if method:
#                 return method(type_name, sub_type)
#             else:
#                 return type_name
# 
#         module = importlib.import_module('.lang.%s' % language, package="monolithe.generators")
# 
#         if not hasattr(module, 'get_type_name'):
#             cls.type_methods_cache[language] = None
#             return type_name
# 
#         method = getattr(module, 'get_type_name')
#         cls.type_methods_cache[language] = method
#         return method(type_name, sub_type)


# Path: monolithe/specifications/specification_attribute.py
from builtins import object
from monolithe.lib import SDKUtils

        self.min_length = None
        self.min_value = None
        self.orderable = False
        self.read_only = False
        self.required = False
        self.unique = False
        self.unique_scope = None
        self._type = None
        self.exposed = False
        self.transient = False
        self.subtype = None
        self.userlabel = None

        self.specification = specification
        # Load information from data
        if data:
            self.from_dict(data)

    @property
    def type(self):
        """
        """
        return self._type

    @type.setter
    def type(self, value):
        """
        """
        language = self.specification.monolithe_config.language if self.specification and self.specification.monolithe_config else 'python'


        self._type = SDKUtils.massage_type_name(type_name=value)