def ValidateDstObjectMetadata(dst_obj_metadata):
  if not dst_obj_metadata:
    raise ArgumentException(
        'No object metadata supplied for destination object.')
  if not dst_obj_metadata.name:
    raise ArgumentException(
        'Object metadata supplied for destination object had no object name.')
  if not dst_obj_metadata.bucket:
    raise ArgumentException(
        'Object metadata supplied for destination object had no bucket name.')
Ensures dst_obj_metadata supplies the needed fields for copy and insert.
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/cloud_api_helper.py/ValidateDstObjectMetadata