

def transform_targeting_data_to_dfp(targeting):
    '\n    Convert dictionary-representation for a SUDS creative object into a\n    Parselmouth representation of a Creative\n\n    @param targeting: dict, dictionary-representation of a DFP SUDS response\n        for a single creative\n    @return: parselmouth.delivery.TargetingData\n    '
    dfp_targeting = {
        
    }
    if targeting.inventory:
        dfp_targeting['inventoryTargeting'] = transform_inventory_targeting_to_dfp(targeting.inventory)
    if targeting.geography:
        dfp_targeting['geoTargeting'] = transform_geography_targeting_to_dfp(targeting.geography)
    if targeting.day_part:
        dfp_targeting['dayPartTargeting'] = transform_day_part_targeting_to_dfp(targeting.day_part)
    if targeting.technology:
        dfp_targeting['technologyTargeting'] = transform_technology_targeting_to_dfp(targeting.technology)
    if targeting.video_content:
        dfp_targeting['contentTargeting'] = transform_video_content_targeting_to_dfp(targeting.video_content)
    if targeting.video_position:
        dfp_targeting['videoPositionTargeting'] = transform_video_position_targeting_to_dfp(targeting.video_position)
    if targeting.custom:
        dfp_targeting['customTargeting'] = transform_custom_targeting_to_dfp(targeting.custom)
    return dfp_targeting

dataset/ETHPy150Open chartbeat-labs/parselmouth/parselmouth/adapters/dfp/targeting_utils.py transform_targeting_data_to_dfp/original