How to use the bingads.service_client._CAMPAIGN_OBJECT_FACTORY_V11 function in bingads

To help you get started, we’ve selected a few bingads examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BingAds / BingAds-Python-SDK / bingads / internal / extensions.py View on Github external
BudgetLimitType = _CAMPAIGN_OBJECT_FACTORY_V10.create('BudgetLimitType')
DynamicSearchAdsSetting = _CAMPAIGN_OBJECT_FACTORY_V10.create('DynamicSearchAdsSetting')
Webpage = _CAMPAIGN_OBJECT_FACTORY_V10.create('ns0:Webpage')
WebpageConditionOperand = _CAMPAIGN_OBJECT_FACTORY_V10.create('WebpageConditionOperand')

RemarketingRule = _CAMPAIGN_OBJECT_FACTORY_V10.create('ns0:RemarketingRule')
PageVisitorsRule = _CAMPAIGN_OBJECT_FACTORY_V10.create('ns0:PageVisitorsRule')
PageVisitorsWhoVisitedAnotherPageRule = _CAMPAIGN_OBJECT_FACTORY_V10.create('ns0:PageVisitorsWhoVisitedAnotherPageRule')
PageVisitorsWhoDidNotVisitAnotherPageRule = _CAMPAIGN_OBJECT_FACTORY_V10.create('ns0:PageVisitorsWhoDidNotVisitAnotherPageRule')
CustomEventsRule = _CAMPAIGN_OBJECT_FACTORY_V10.create('ns0:CustomEventsRule')
StringOperator = _CAMPAIGN_OBJECT_FACTORY_V10.create('StringOperator')
NumberOperator = _CAMPAIGN_OBJECT_FACTORY_V10.create('NumberOperator')

AudienceCriterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('AudienceCriterion')
BidMultiplier = _CAMPAIGN_OBJECT_FACTORY_V11.create('BidMultiplier')

AgeCriterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('AgeCriterion')
DayTimeCriterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('DayTimeCriterion')
DeviceCriterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('DeviceCriterion')
GenderCriterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('GenderCriterion')
LocationCriterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('LocationCriterion')
LocationIntentCriterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('LocationIntentCriterion')
RadiusCriterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('RadiusCriterion')

def bulk_str(value):
    if value is None or (hasattr(value, 'value') and value.value is None):
        return None
    if isinstance(value, str):
        return value
    if PY2:
        if isinstance(value, unicode):
github BingAds / BingAds-Python-SDK / bingads / v11 / bulk / entities / target_criterions / bulk_ad_group_radius_criterion.py View on Github external
def process_mappings_from_row_values(self, row_values):
        self._biddable_ad_group_criterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('BiddableAdGroupCriterion')
        self._biddable_ad_group_criterion.Type = 'BiddableAdGroupCriterion'
        self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('RadiusCriterion')
        self._biddable_ad_group_criterion.Criterion.Type = 'RadiusCriterion'
        self._biddable_ad_group_criterion.CriterionBid = _CAMPAIGN_OBJECT_FACTORY_V11.create('BidMultiplier')
        self._biddable_ad_group_criterion.CriterionBid.Type = 'BidMultiplier'
        row_values.convert_to_entity(self, BulkAdGroupRadiusCriterion._MAPPINGS)
github BingAds / BingAds-Python-SDK / bingads / v11 / bulk / entities / labels / bulk_label_associations.py View on Github external
def process_mappings_from_row_values(self, row_values):
        self._label_association = _CAMPAIGN_OBJECT_FACTORY_V11.create('LabelAssociation')
        row_values.convert_to_entity(self, _BulkLabelAssociation._MAPPINGS)
github BingAds / BingAds-Python-SDK / bingads / v11 / bulk / entities / ad_extensions / bulk_location_ad_extensions.py View on Github external
def set_address_part(bulk_ad_extension, set_func):
        if bulk_ad_extension.location_ad_extension.Address is None:
            bulk_ad_extension.location_ad_extension.Address = _CAMPAIGN_OBJECT_FACTORY_V11.create('Address')
        set_func(bulk_ad_extension.location_ad_extension.Address)
github BingAds / BingAds-Python-SDK / bingads / v11 / bulk / entities / bulk_campaign_product_scope.py View on Github external
def process_mappings_from_row_values(self, row_values):
        self._biddable_campaign_criterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('BiddableCampaignCriterion')
        self._biddable_campaign_criterion.Type = 'BiddableCampaignCriterion'
        self._biddable_campaign_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('ProductScope')
        self._biddable_campaign_criterion.Criterion.Type = 'ProductScope'

        row_values.convert_to_entity(self, BulkCampaignProductScope._MAPPINGS)
github BingAds / BingAds-Python-SDK / bingads / v11 / bulk / entities / ad_extensions / bulk_callout_ad_extensions.py View on Github external
from bingads.v11.internal.bulk.mappings import _SimpleBulkMapping
from bingads.v11.internal.bulk.string_table import _StringTable
from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V11

from .common import _BulkAdExtensionBase
from .common import _BulkAdGroupAdExtensionAssociation
from .common import _BulkCampaignAdExtensionAssociation
from .common import _BulkAccountAdExtensionAssociation

_CalloutAdExtension = type(_CAMPAIGN_OBJECT_FACTORY_V11.create('CalloutAdExtension'))


class BulkCalloutAdExtension(_BulkAdExtensionBase):
    """ Represents a callout ad extension.

    This class exposes the :attr:`callout_ad_extension` property that can be read and written
    as fields of the Callout Ad Extension record in a bulk file.

    For more information, see Callout Ad Extension at https://go.microsoft.com/fwlink/?linkid=846127.

    *See also:*

    * :class:`.BulkServiceManager`
    * :class:`.BulkOperation`
    * :class:`.BulkFileReader`
    * :class:`.BulkFileWriter`
github BingAds / BingAds-Python-SDK / bingads / v11 / bulk / entities / target_criterions / bulk_ad_group_profile_criterion.py View on Github external
def process_mappings_from_row_values(self, row_values):
        self._biddable_ad_group_criterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('BiddableAdGroupCriterion')
        self._biddable_ad_group_criterion.Type = 'BiddableAdGroupCriterion'
        self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('ProfileCriterion')
        self._biddable_ad_group_criterion.Criterion.ProfileType = self.profile_type()
        self._biddable_ad_group_criterion.Criterion.Type = 'ProfileCriterion'
        self._biddable_ad_group_criterion.CriterionBid = _CAMPAIGN_OBJECT_FACTORY_V11.create('BidMultiplier')
        self._biddable_ad_group_criterion.CriterionBid.Type = 'BidMultiplier'
        row_values.convert_to_entity(self, BulkAdGroupProfileCriterion._MAPPINGS)
github BingAds / BingAds-Python-SDK / bingads / v11 / bulk / entities / target_criterions / bulk_ad_group_device_criterion.py View on Github external
def process_mappings_from_row_values(self, row_values):
        self._biddable_ad_group_criterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('BiddableAdGroupCriterion')
        self._biddable_ad_group_criterion.Type = 'BiddableAdGroupCriterion'
        self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('DeviceCriterion')
        self._biddable_ad_group_criterion.Criterion.Type = 'DeviceCriterion'
        self._biddable_ad_group_criterion.CriterionBid = _CAMPAIGN_OBJECT_FACTORY_V11.create('BidMultiplier')
        self._biddable_ad_group_criterion.CriterionBid.Type = 'BidMultiplier'
        row_values.convert_to_entity(self, BulkAdGroupDeviceCriterion._MAPPINGS)
github BingAds / BingAds-Python-SDK / bingads / v11 / bulk / entities / bulk_ads.py View on Github external
from bingads.v11.bulk.entities import PerformanceData
from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V11
from bingads.v11.internal.bulk.string_table import _StringTable
from bingads.v11.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity
from bingads.v11.internal.bulk.mappings import _SimpleBulkMapping
from bingads.v11.internal.extensions import *

# Define type used
ProductAd = type(_CAMPAIGN_OBJECT_FACTORY_V11.create('ProductAd'))
TextAd = type(_CAMPAIGN_OBJECT_FACTORY_V11.create('TextAd'))
AppInstallAd = type(_CAMPAIGN_OBJECT_FACTORY_V11.create('AppInstallAd'))
ExpandedTextAd = type(_CAMPAIGN_OBJECT_FACTORY_V11.create('ExpandedTextAd'))
DynamicSearchAd = type(_CAMPAIGN_OBJECT_FACTORY_V11.create('DynamicSearchAd'))


class _BulkAd(_SingleRecordBulkEntity):
    """ This abstract base class provides properties that are shared by all bulk ad classes.

    *See also:*

    * :class:`.BulkProductAd`
    * :class:`.BulkTextAd`
    * :class:`.BulkAppInstallAd`
    * :class:`.BulkExpandedTextAd`
    * :class:`.BulkDynamicSearchAd`
github BingAds / BingAds-Python-SDK / bingads / v11 / bulk / entities / target_criterions / bulk_ad_group_day_time_criterion.py View on Github external
def process_mappings_from_row_values(self, row_values):
        self._biddable_ad_group_criterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('BiddableAdGroupCriterion')
        self._biddable_ad_group_criterion.Type = 'BiddableAdGroupCriterion'
        self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V11.create('DayTimeCriterion')
        self._biddable_ad_group_criterion.Criterion.Type = 'DayTimeCriterion'
        self._biddable_ad_group_criterion.CriterionBid = _CAMPAIGN_OBJECT_FACTORY_V11.create('BidMultiplier')
        self._biddable_ad_group_criterion.CriterionBid.Type = 'BidMultiplier'
        row_values.convert_to_entity(self, BulkAdGroupDayTimeCriterion._MAPPINGS)