# Path: riak/util.py
# class lazy_property(object):
#     '''
#     A method decorator meant to be used for lazy evaluation and
#     memoization of an object attribute. The property should represent
#     immutable data, as it replaces itself on first access.
#     '''
#     def __init__(self, fget):
#         self.fget = fget
#         self.func_name = fget.__name__
# 
#     def __get__(self, obj, cls):
#         if obj is None:
#             return None
#         value = self.fget(obj)
#         setattr(obj, self.func_name, value)
#         return value
# 
# Path: riak/datatypes/types.py
# TYPES = {}


from six import string_types, PY2
from riak.util import lazy_property
from riak.datatypes import TYPES
        from riak import RiakObject
        from riak import RiakObject
import mimetypes
        """A shortcut for manually instantiating a new
        :class:`~riak.riak_object.RiakObject` or a new
        :class:`~riak.datatypes.Datatype`, based on the presence and value
        of the :attr:`datatype <BucketType.datatype>` bucket property. When
        the bucket contains a :class:`~riak.datatypes.Datatype`, all
        arguments are ignored except ``key``, otherwise they are used to
        initialize the :class:`~riak.riak_object.RiakObject`.

        :param key: Name of the key. Leaving this to be None (default)
                    will make Riak generate the key on store.
        :type key: str
        :param data: The data to store in a
           :class:`~riak.riak_object.RiakObject`, see
           :attr:`RiakObject.data <riak.riak_object.RiakObject.data>`.
        :type data: object
        :param content_type: The media type of the data stored in the
           :class:`~riak.riak_object.RiakObject`, see
           :attr:`RiakObject.content_type
           <riak.riak_object.RiakObject.content_type>`.
        :type content_type: str
        :param encoded_data: The encoded data to store in a
           :class:`~riak.riak_object.RiakObject`, see
           :attr:`RiakObject.encoded_data
           <riak.riak_object.RiakObject.encoded_data>`.
        :type encoded_data: str
        :rtype: :class:`~riak.riak_object.RiakObject` or
                :class:`~riak.datatypes.Datatype`

        """
        if self.bucket_type.datatype:

# Path: riak/util.py
# class lazy_property(object):
#     '''
#     A method decorator meant to be used for lazy evaluation and
#     memoization of an object attribute. The property should represent
#     immutable data, as it replaces itself on first access.
#     '''
#     def __init__(self, fget):
#         self.fget = fget
#         self.func_name = fget.__name__
# 
#     def __get__(self, obj, cls):
#         if obj is None:
#             return None
#         value = self.fget(obj)
#         setattr(obj, self.func_name, value)
#         return value
# 
# Path: riak/datatypes/types.py
# TYPES = {}


# Path: riak/bucket.py
from six import string_types, PY2
from riak.util import lazy_property
from riak.datatypes import TYPES
        from riak import RiakObject
        from riak import RiakObject
import mimetypes

        """A shortcut for manually instantiating a new
        :class:`~riak.riak_object.RiakObject` or a new
        :class:`~riak.datatypes.Datatype`, based on the presence and value
        of the :attr:`datatype <BucketType.datatype>` bucket property. When
        the bucket contains a :class:`~riak.datatypes.Datatype`, all
        arguments are ignored except ``key``, otherwise they are used to
        initialize the :class:`~riak.riak_object.RiakObject`.

        :param key: Name of the key. Leaving this to be None (default)
                    will make Riak generate the key on store.
        :type key: str
        :param data: The data to store in a
           :class:`~riak.riak_object.RiakObject`, see
           :attr:`RiakObject.data <riak.riak_object.RiakObject.data>`.
        :type data: object
        :param content_type: The media type of the data stored in the
           :class:`~riak.riak_object.RiakObject`, see
           :attr:`RiakObject.content_type
           <riak.riak_object.RiakObject.content_type>`.
        :type content_type: str
        :param encoded_data: The encoded data to store in a
           :class:`~riak.riak_object.RiakObject`, see
           :attr:`RiakObject.encoded_data
           <riak.riak_object.RiakObject.encoded_data>`.
        :type encoded_data: str
        :rtype: :class:`~riak.riak_object.RiakObject` or
                :class:`~riak.datatypes.Datatype`

        """
        if self.bucket_type.datatype:

            return TYPES[self.bucket_type.datatype](bucket=self, key=key)