def api_payload_to_create_params(payload):
 required_parameters = ['collection_type', 'element_identifiers']
 missing_parameters = [p for p in required_parameters if (p not in payload)]
 if missing_parameters:
  message = ('Missing required parameters %s' % missing_parameters)
  raise exceptions.ObjectAttributeMissingException(message)
 params = dict(collection_type=payload.get('collection_type'), element_identifiers=payload.get('element_identifiers'), name=payload.get('name', None))
 return params

def api_payload_to_create_params ( payload ) : required_parameters = [ 'collection_type' , 'element_identifiers' ] missing_parameters = [ p for p in required_parameters if ( p not in payload ) ] if missing_parameters : message = ( 'Missing required parameters %s' % missing_parameters ) raise exceptions . ObjectAttributeMissingException ( message ) params = dict ( collection_type = payload . get ( 'collection_type' ) , element_identifiers = payload . get ( 'element_identifiers' ) , name = payload . get ( 'name' , None ) ) return params
cleanup api payload to pass into dataset_collections .