# Path: fds/auth/common.py
# class Common(object):
#   XIAOMI_HEADER_PREFIX = "x-xiaomi-"
#   XIAOMI_HEADER_DATE = "x-xiaomi-date"
# 
#   GALAXY_ACCESS_KEY_ID = "GalaxyAccessKeyId"
#   SIGNATURE = "Signature"
#   EXPIRES = "Expires"
# 
#   AUTHORIZATION = "authorization"
#   CONTENT_MD5 = "content-md5"
#   CONTENT_TYPE = "content-type"
#   DATE = "date"
#   RANGE = 'range'
# 
#   REQUEST_TIME_LIMIT = 900000  # 15min
# 
#   CACHE_CONTROL = "cache-control"
#   CONTENT_ENCODING = "content-encoding"
#   CONTENT_LENGTH = "content-length"
#   LAST_MODIFIED = "last-modified"
#   LAST_CHECKED = "last-checked"
#   UPLOAD_TIME = "upload-time"
#   CONTENT_RANGE = "content-range"
#   EXPIRATION_TIME = "expiration-time"
#   OBJECT_OWNER_ID = "object-owner-id"
#   FILE_MODE = "file-mode"
#   MULITPART_UPLOAD_MODE = XIAOMI_HEADER_PREFIX + "multipart-upload-mode"
#   PREVIOUS_VERSION_ID = "pre-version-id"
#   SERVER_SIDE_ENCRYPTION = XIAOMI_HEADER_PREFIX + "server-side-encryption"
#   STORAGE_CLASS = XIAOMI_HEADER_PREFIX + "storage-class"
#   ONGOING_RESTORE = XIAOMI_HEADER_PREFIX + "ongoing-restore"
#   RESTORE_EXPIRY_DATE = XIAOMI_HEADER_PREFIX + "restore-expiry";
# 
#   DEFAULT_FDS_SERVICE_BASE_URI = "http://files.fds.api.xiaomi.com/"
#   DEFAULT_CDN_SERVICE_URI = "http://cdn.fds.api.xiaomi.com/"
# 
# Path: fds/galaxy_fds_client_exception.py
# class GalaxyFDSClientException(Error):
#   def __init__(self, message):
#     self.message = message
# 
#   def __str__(self):
#     if self.message:
#       return super.__str__(self) + ": " + str(self.message)
#     return super.__str__(self)


from fds.auth.common import Common
from fds.galaxy_fds_client_exception import GalaxyFDSClientException


class FDSObjectMetadata(object):
  """
  The FDS object metadata class.
  """
  USER_DEFINED_METADATA_PREFIX = "x-xiaomi-meta-"

  PRE_DEFINED_METADATA = [
    Common.CACHE_CONTROL,
    Common.CONTENT_ENCODING,
    Common.CONTENT_LENGTH,
    Common.CONTENT_RANGE,
    Common.LAST_MODIFIED,
    Common.CONTENT_MD5,
    Common.CONTENT_TYPE,
    Common.LAST_CHECKED,
    Common.UPLOAD_TIME,
    Common.EXPIRATION_TIME,
    Common.OBJECT_OWNER_ID,
    Common.FILE_MODE,
    Common.MULITPART_UPLOAD_MODE,
    Common.PREVIOUS_VERSION_ID,
    Common.SERVER_SIDE_ENCRYPTION,
    Common.STORAGE_CLASS,

# Path: fds/auth/common.py
# class Common(object):
#   XIAOMI_HEADER_PREFIX = "x-xiaomi-"
#   XIAOMI_HEADER_DATE = "x-xiaomi-date"
# 
#   GALAXY_ACCESS_KEY_ID = "GalaxyAccessKeyId"
#   SIGNATURE = "Signature"
#   EXPIRES = "Expires"
# 
#   AUTHORIZATION = "authorization"
#   CONTENT_MD5 = "content-md5"
#   CONTENT_TYPE = "content-type"
#   DATE = "date"
#   RANGE = 'range'
# 
#   REQUEST_TIME_LIMIT = 900000  # 15min
# 
#   CACHE_CONTROL = "cache-control"
#   CONTENT_ENCODING = "content-encoding"
#   CONTENT_LENGTH = "content-length"
#   LAST_MODIFIED = "last-modified"
#   LAST_CHECKED = "last-checked"
#   UPLOAD_TIME = "upload-time"
#   CONTENT_RANGE = "content-range"
#   EXPIRATION_TIME = "expiration-time"
#   OBJECT_OWNER_ID = "object-owner-id"
#   FILE_MODE = "file-mode"
#   MULITPART_UPLOAD_MODE = XIAOMI_HEADER_PREFIX + "multipart-upload-mode"
#   PREVIOUS_VERSION_ID = "pre-version-id"
#   SERVER_SIDE_ENCRYPTION = XIAOMI_HEADER_PREFIX + "server-side-encryption"
#   STORAGE_CLASS = XIAOMI_HEADER_PREFIX + "storage-class"
#   ONGOING_RESTORE = XIAOMI_HEADER_PREFIX + "ongoing-restore"
#   RESTORE_EXPIRY_DATE = XIAOMI_HEADER_PREFIX + "restore-expiry";
# 
#   DEFAULT_FDS_SERVICE_BASE_URI = "http://files.fds.api.xiaomi.com/"
#   DEFAULT_CDN_SERVICE_URI = "http://cdn.fds.api.xiaomi.com/"
# 
# Path: fds/galaxy_fds_client_exception.py
# class GalaxyFDSClientException(Error):
#   def __init__(self, message):
#     self.message = message
# 
#   def __str__(self):
#     if self.message:
#       return super.__str__(self) + ": " + str(self.message)
#     return super.__str__(self)


# Path: fds/model/fds_object_metadata.py
from fds.auth.common import Common
from fds.galaxy_fds_client_exception import GalaxyFDSClientException



class FDSObjectMetadata(object):
  """
  The FDS object metadata class.
  """
  USER_DEFINED_METADATA_PREFIX = "x-xiaomi-meta-"

  PRE_DEFINED_METADATA = [
    Common.CACHE_CONTROL,
    Common.CONTENT_ENCODING,
    Common.CONTENT_LENGTH,
    Common.CONTENT_RANGE,
    Common.LAST_MODIFIED,
    Common.CONTENT_MD5,
    Common.CONTENT_TYPE,
    Common.LAST_CHECKED,
    Common.UPLOAD_TIME,
    Common.EXPIRATION_TIME,
    Common.OBJECT_OWNER_ID,
    Common.FILE_MODE,
    Common.MULITPART_UPLOAD_MODE,
    Common.PREVIOUS_VERSION_ID,
    Common.SERVER_SIDE_ENCRYPTION,
    Common.STORAGE_CLASS,

    Common.RESTORE_EXPIRY_DATE,