code: def update_campaign(self, campaign_object=None, campaign_id=None, **kwargs):
          
          api = self._get_api(update_service.DefaultApi)
          if campaign_object:
              campaign_id = campaign_object.id
              campaign_object = campaign_object._create_patch_request()
          else:
              campaign_object = Campaign._create_request_map(kwargs)
          if 'device_filter' in campaign_object:
              campaign_object["device_filter"] = filters.legacy_filter_formatter(
                  dict(filter=campaign_object["device_filter"]),
                  Device._get_attributes_map()
              )['filter']
          if 'when' in campaign_object:
              # FIXME: randomly validating an input here is a sure route to nasty surprises elsewhere
              campaign_object['when'] = force_utc(campaign_object['when'])
          return Campaign(api.update_campaign_update(campaign_id=campaign_id,
                                                     campaign=campaign_object))
docs: Update an update campaign.
  
          :param :class:`Campaign` campaign_object: Campaign object to update (Required)
          :return: updated campaign object
          :rtype: Campaign