The file_name property.
        
        Args:
            value (string). the property value.
162197
def file_name(self, value):
        
        if value == self._defaults['fileName'] and 'fileName' in self._values:
            del self._values['fileName']
        else:
            self._values['fileName'] = value
46313
def set(self, value):
        

        if not isinstance(value, byte_cls):
            raise TypeError(unwrap(
                '''
                %s value must be a byte string, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        self._bytes = value
        self.contents = value
        self._header = None
        if self._indefinite:
            self._indefinite = False
            self.method = 0
        if self._trailer != b'':
            self._trailer = b''
603970
def source(self, value):
        

        if value is not None:
            assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                "source", value)
            assert os.path.exists(value), "'{0}' attribute: '{1}' file doesn't exists!".format("source", value)
        self.__source = value
209914
def file_or_filename(input):
    
    if isinstance(input, string_types):
        # input was a filename: open as file
        yield smart_open(input)
    else:
        # input already a file-like object; just reset to the beginning
        input.seek(0)
        yield input
424079
def meaningful_value(self, val, undefined):
        
        if isinstance(val, fields.files.FieldFile):
            return val.name and not (
                isinstance(undefined, fields.files.FieldFile) and val == undefined)
        return val is not None and val != undefined
189638
def clean_value(self, val):
        
        if isinstance(val, dict):
            if self.random_name:
                val['random_name'] = self.random_name
            if 'file_name' in val.keys():
                val['name'] = val.pop('file_name')
                val['content'] = val.pop('file_content')
            return self.file_manager().store_file(**val)

        # If val is not instance of dict, it should be return itself because the val is the key of
        # the file
        try:
            return str(val)
        except ValueError:
            raise ValidationError("%r could not be cast to string" % val)
668789
def name(self, value):
        
        if not isinstance(value, six.string_types):
            raise ValueError("Pass a string")
        self._properties["id"] = value
918391
def filename(self, value):
        """"""
        warnings.warn(
            "The 'filename' attribute will be removed in future versions.  "
            "Use 'source' instead.",
            DeprecationWarning, stacklevel=2
        )
        self.source = value
1260083
def _set_properties(self, value):
        
        self._label_removals.clear()
        return super(Bucket, self)._set_properties(value)
353769
def name_server_set(self, value):
        
        if not isinstance(value, six.string_types) and value is not None:
            raise ValueError("Pass a string, or None")
        self._properties["nameServerSet"] = value
436596
def _get_file_by_value(cls, value):
        
        # Ignore any FileResource with no DataObject. This is a typical state
        # for a deleted file that has not yet been cleaned up.
        queryset = FileResource.objects.exclude(data_object__isnull=True)
        matches = FileResource.filter_by_name_or_id_or_tag_or_hash(
            value, queryset=queryset)
        if matches.count() == 0:
            raise ValidationError(
                'No file found that matches value "%s"' % value)
        elif matches.count() > 1:
            match_id_list = ['%s@%s' % (match.filename, match.get_uuid())
                             for match in matches]
            match_id_string = ('", "'.join(match_id_list))
            raise ValidationError(
                'Multiple files were found matching value "%s": "%s". '\
                'Use a more precise identifier to select just one file.' % (
                    value, match_id_string))
        return matches.first().data_object
537247
def _add_property(self, name, default_value):
        

        name = str(name)
        self._properties[name] = default_value
652323
def file_content(self, value):
        
        if isinstance(value, FileContent):
            self._file_content = value
        else:
            self._file_content = FileContent(value)
101348
def logger_file(self, value):
        
        self.__logger_file = value
        if self.__logger_file:
            # If set logging file,
            # then add file handler and remove stream handler.
            self.logger_file_handler = logging.FileHandler(self.__logger_file)
            self.logger_file_handler.setFormatter(self.logger_formatter)
            for _, logger in six.iteritems(self.logger):
                logger.addHandler(self.logger_file_handler)
                if self.logger_stream_handler:
                    logger.removeHandler(self.logger_stream_handler)
        else:
            # If not set logging file,
            # then add stream handler and remove file handler.
            self.logger_stream_handler = logging.StreamHandler()
            self.logger_stream_handler.setFormatter(self.logger_formatter)
            for _, logger in six.iteritems(self.logger):
                logger.addHandler(self.logger_stream_handler)
                if self.logger_file_handler:
                    logger.removeHandler(self.logger_file_handler)
825652
def filters_out_format(self, value):
        

        if value is not None:
            assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                "filters_out_format", value)
            assert os.path.exists(value), "'{0}' attribute: '{1}' file doesn't exists!".format(
                "filters_out_format", value)
        self.__filters_out_format = value
289401
def setProperty(self, name, value):
        
        if type(value) in (unicode, str):
            try:
                value = self._parsers[name](value)
            except StandardError:
                pass
        
        self._properties[name] = value
1239129
def get_name(value) -> str:
    
    if value.__module__ == '__builtin__':
        return value.__name__
    else:
        return '.'.join((value.__module__, value.__name__))