<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_campaign(self, name, device_filter, **kwargs):
 """Add new update campaign. Add an update campaign with a name and device filtering. Example: .. code-block:: python device_api, update_api = DeviceDirectoryAPI(), UpdateAPI() # Get a filter to use for update campaign query_obj = device_api.get_query(query_id="MYID") # Create the campaign new_campaign = update_api.add_campaign( name="foo", device_filter=query_obj.filter ) :param str name: Name of the update campaign (Required) :param str device_filter: The device filter to use (Required) :param str manifest_id: ID of the manifest with description of the update :param str description: Description of the campaign :param int scheduled_at: The timestamp at which update campaign is scheduled to start :param str state: The state of the campaign. Values: "draft", "scheduled", "devicefetch", "devicecopy", "publishing", "deploying", "deployed", "manifestremoved", "expired" :return: newly created campaign object :rtype: Campaign """

        device_filter = filters.legacy_filter_formatter(
            dict(filter=device_filter),
            Device._get_attributes_map()
        )
        campaign = Campaign._create_request_map(kwargs)
        if 'when' in campaign:
            # FIXME: randomly validating an input here is a sure route to nasty surprises elsewhere
            campaign['when'] = force_utc(campaign['when'])
        body = UpdateCampaignPostRequest(
            name=name,
            device_filter=device_filter['filter'],
            **campaign)
        api = self._get_api(update_service.DefaultApi)
        return Campaign(api.update_campaign_create(body))