Sets the campaign value for this Operand.

@param campaign
498677
public void setCampaign(com.google.api.ads.adwords.axis.v201809.cm.Campaign campaign) {
        this.campaign = campaign;
    }
1216365
public void setPolicies(java.util.Collection<String> policies) {
        if (policies == null) {
            this.policies = null;
            return;
        }

        this.policies = new java.util.ArrayList<String>(policies);
    }
482260
public void setProgram(Program program) {
        if (program == null) {
            throw new IllegalStateException("Program cannot be null");
        }
        program.checkCreated();
        this.program = program;
    }
981185
public void setOperation(com.google.api.ads.admanager.axis.v201808.ChangeHistoryOperation operation) {
        this.operation = operation;
    }
783230
def set_campaign_merge(targets, campaign_id)
    login! unless logged_in?
    json = <<-EOF
      {
        "session": "#{@sugar_session_id}",
        "targets": #{targets.to_json},
        "campaign-id": "#{campaign_id}"
      }
    EOF
    json.gsub!(/^\s{6}/,'')
    send!(:set_campaign_merge, json)
  end
334518
private static void setCampaignTargetingCriteria(
      Campaign campaign, AdWordsServicesInterface adWordsServices, AdWordsSession session)
      throws ApiException, RemoteException {
    // Get the CampaignCriterionService.
    CampaignCriterionServiceInterface campaignCriterionService =
        adWordsServices.get(session, CampaignCriterionServiceInterface.class);

    // Create locations. The IDs can be found in the documentation or
    // retrieved with the LocationCriterionService.
    Location california = new Location();
    california.setId(21137L);

    Location mexico = new Location();
    mexico.setId(2484L);

    // Create languages. The IDs can be found in the documentation or
    // retrieved with the ConstantDataService.
    Language english = new Language();
    english.setId(1000L);

    Language spanish = new Language();
    spanish.setId(1003L);

    List<Criterion> criteria = new ArrayList<>(Arrays.asList(california, mexico, english, spanish));

    // Create operations to add each of the criteria above.
    List<CampaignCriterionOperation> operations = new ArrayList<>();
    for (Criterion criterion : criteria) {
      CampaignCriterionOperation operation = new CampaignCriterionOperation();

      CampaignCriterion campaignCriterion = new CampaignCriterion();
      campaignCriterion.setCampaignId(campaign.getId());
      campaignCriterion.setCriterion(criterion);
      operation.setOperand(campaignCriterion);

      operation.setOperator(Operator.ADD);

      operations.add(operation);
    }

    // Set the campaign targets.
    CampaignCriterionReturnValue returnValue =
        campaignCriterionService.mutate(
            operations.toArray(new CampaignCriterionOperation[operations.size()]));

    if (returnValue != null && returnValue.getValue() != null) {
      // Display added campaign targets.
      for (CampaignCriterion campaignCriterion : returnValue.getValue()) {
        System.out.printf(
            "Campaign criteria of type '%s' and ID %d was added.%n",
            campaignCriterion.getCriterion().getCriterionType(),
            campaignCriterion.getCriterion().getId());
      }
    }
  }
1066887
public void setValue(int value) { 
		if(value < min  || value > max) {
			throw new IllegalArgumentException("The value " + value + " is out of the admitted range [" + min + ", " + max + "].");
		}
		if(value != min && value != max) {
			if(timer == null) {
				logger.trace("creating timer");
				timer = new Timer(50, this);
			}
			if(!timer.isRunning()) {
				logger.trace("starting timer");
				timer.start();
			}
		} else {
			logger.trace("value is '{}' (in range [{}, {}]", value, min, max);
			if(timer != null && timer.isRunning()) {
				logger.trace("stopping timer");
				timer.stop();
				// unless we force a repaint, the component may stop at 99%
				repaint();
			}
		}
		this.value = value;
	}
562021
def SetCampaignTargetingCriteria(client, campaign):
  
  campaign_criterion_service = client.GetService('CampaignCriterionService')

  # Create locations. The IDs can be found in the documentation or retrieved
  # with the LocationCriterionService.
  criteria = [
      {
          'xsi_type': 'Location',
          'id': 21137  # California
      },
      {
          'xsi_type': 'Location',
          'id': 2484  # Mexico
      },
      {
          'xsi_type': 'Language',
          'id': 1000  # English
      },
      {
          'xsi_type': 'Language',
          'id': 1003  # Spanish
      }
  ]

  operations = [{
      'operator': 'ADD',
      'operand': {
          'campaignId': campaign['id'],
          'criterion': criterion
      }
  } for criterion in criteria]

  response = campaign_criterion_service.mutate(operations)

  if response and 'value' in response:
    # Display the added campaign targets.
    for criterion in response['value']:
      print ('Campaign criteria of type "%s" and id "%s" was added.'
             % (criterion['criterion']['type'],
                criterion['criterion']['id']))
1057008
public void setPlatform(com.google.api.ads.admanager.axis.v201805.MobileApplicationPlatform platform) {
        this.platform = platform;
    }
993027
public boolean execute(Campaign campaign) {
        boolean campaignResult = true;
        currentCampaign = campaign;
        campaignStartTimeStamp = new Date();
        try {
            createReport();

            for (CampaignRun run : currentCampaign.getRuns()) {
                if (TestEngine.isAbortedByUser()) {
                    break;
                }
                currentTestBed = run.getTestbed();
                String testSuiteName = currentCampaign.getName() + " - " + currentTestBed.substring(0,
                      currentTestBed.lastIndexOf('.'));
                TestBedConfiguration.setConfigFile(StaticConfiguration.TESTBED_CONFIG_DIRECTORY + "/" + currentTestBed);
                currentTestSuite = MetaTestSuite.createMetaTestSuite(testSuiteName, run.getTestsuites());
                if (currentTestSuite == null) {
                    continue;
                }
                currentTestSuite.addTestReportListener(this);
                campaignResult &= TestEngine.execute(
                      currentTestSuite); // NOSONAR - Potentially dangerous use of non-short-circuit logic
                currentTestSuite.removeTestReportListener(this);
                currentTestSuite = null;
            }
            CampaignReportManager.getInstance().stopReport();
        } finally {
            TestEngine.tearDown();
            campaignStartTimeStamp = null;
            currentCampaign = null;
        }
        return campaignResult;
    }
142265
private function setCampaignSettings($campaignSettings = null)
    {
        if (!$campaignSettings) {
            throw new \Exception('Campaigns have not been mapped to this source.');
        }

        $jsonHelper             = new JSONHelper();
        $this->campaignSettings = $jsonHelper->decodeObject($campaignSettings, 'CampaignSettings');

        return $this;
    }
804164
def perform(campaign)
      campaign.apply_premailer
      campaign.list.subscriptions.availables.each do |s|
        campaign.push_notification(s)
      end
    end
513917
public static void set(PropertyKey key, Object value) {
    set(key, String.valueOf(value), Source.RUNTIME);
  }
1175496
public void setCampaignCriterion(com.google.api.ads.adwords.axis.v201809.cm.CampaignCriterion campaignCriterion) {
        this.campaignCriterion = campaignCriterion;
    }
1072252
public void setPremiumRateValues(com.google.api.ads.admanager.axis.v201811.PremiumRateValue[] premiumRateValues) {
        this.premiumRateValues = premiumRateValues;
    }
1193962
private static function setCampaignTargetingCriteria(
        $campaignId,
        AdWordsServices $adWordsServices,
        AdWordsSession $session
    ) {
        $campaignCriterionService = $adWordsServices->get($session, CampaignCriterionService::class);

        $campaignCriteria = [];
        // Create locations. The IDs can be found in the documentation or retrieved
        // with the LocationCriterionService.
        $california = new Location();
        $california->setId(21137);
        $campaignCriteria[] = new CampaignCriterion($campaignId, null, $california);

        $mexico = new Location();
        $mexico->setId(2484);
        $campaignCriteria[] = new CampaignCriterion($campaignId, null, $mexico);

        // Create languages. The IDs can be found in the documentation or retrieved
        // with the ConstantDataService.
        $english = new Language();
        $english->setId(1000);
        $campaignCriteria[] = new CampaignCriterion($campaignId, null, $english);

        $spanish = new Language();
        $spanish->setId(1003);
        $campaignCriteria[] = new CampaignCriterion($campaignId, null, $spanish);

        // Create operations to add each of the criteria above.
        $operations = [];
        foreach ($campaignCriteria as $campaignCriterion) {
            $operation = new CampaignCriterionOperation();
            $operation->setOperand($campaignCriterion);
            $operation->setOperator(Operator::ADD);
            $operations[] = $operation;
        }

        // Set the campaign targets.
        $result = $campaignCriterionService->mutate($operations);

        // Display added campaign targets.
        foreach ($result->getValue() as $campaignCriterion) {
            printf(
                "Campaign criterion of type '%s' and ID %d was added.\n",
                $campaignCriterion->getCriterion()->getType(),
                $campaignCriterion->getCriterion()->getId()
            );
        }
    }
585118
public void setRemarketingSettings(com.google.api.ads.adwords.axis.v201809.mcm.RemarketingSettings remarketingSettings) {
        this.remarketingSettings = remarketingSettings;
    }