code: def validate(cls, mapper_spec):
      
      reader_spec = cls.get_params(mapper_spec, allow_old=False)
  
      # Bucket Name is required
      if cls.BUCKET_NAME_PARAM not in reader_spec:
        raise errors.BadReaderParamsError(
            "%s is required for Google Cloud Storage" %
            cls.BUCKET_NAME_PARAM)
      try:
        cloudstorage.validate_bucket_name(
            reader_spec[cls.BUCKET_NAME_PARAM])
      except ValueError, error:
        raise errors.BadReaderParamsError("Bad bucket name, %s" % (error))
  
      # Object Name(s) are required
      if cls.OBJECT_NAMES_PARAM not in reader_spec:
        raise errors.BadReaderParamsError(
            "%s is required for Google Cloud Storage" %
            cls.OBJECT_NAMES_PARAM)
      filenames = reader_spec[cls.OBJECT_NAMES_PARAM]
      if not isinstance(filenames, list):
        raise errors.BadReaderParamsError(
            "Object name list is not a list but a %s" %
            filenames.__class__.__name__)
      for filename in filenames:
        if not isinstance(filename, basestring):
          raise errors.BadReaderParamsError(
              "Object name is not a string but a %s" %
              filename.__class__.__name__)
      if cls.DELIMITER_PARAM in reader_spec:
        delimiter = reader_spec[cls.DELIMITER_PARAM]
        if not isinstance(delimiter, basestring):
          raise errors.BadReaderParamsError(
              "%s is not a string but a %s" %
              (cls.DELIMITER_PARAM, type(delimiter)))
docs: Validate mapper specification.
  
      Args:
        mapper_spec: an instance of model.MapperSpec
  
      Raises:
        BadReaderParamsError: if the specification is invalid for any reason such
          as missing the bucket name or providing an invalid bucket name.