$campaign = new Campaign([
'resource_name' => ResourceNames::forCampaign(self::CUSTOMER_ID, $this->campaign_id),
'status' => CampaignStatus::PAUSED,
'frequency_caps'=>[ new \Google\Ads\GoogleAds\V3\Common\FrequencyCapEntry([
'key' => new \Google\Ads\GoogleAds\V3\Common\FrequencyCapKey([
'level'=> \Google\Ads\GoogleAds\V3\Enums\FrequencyCapLevelEnum\FrequencyCapLevel::CAMPAIGN,
'event_type'=> \Google\Ads\GoogleAds\V3\Enums\FrequencyCapEventTypeEnum\FrequencyCapEventType::IMPRESSION,
'time_unit'=> \Google\Ads\GoogleAds\V3\Enums\FrequencyCapTimeUnitEnum\FrequencyCapTimeUnit::DAY,
]),
'cap' => new Int32Value(['value'=>10])
])],
'frequency_caps'=> new \Google\Protobuf\Internal\RepeatedField()
]);
$campaignOperation = new CampaignOperation();
$campaignOperation->setUpdate($campaign);
$campaignOperation->setUpdateMask(FieldMasks::allSetFieldsOf($campaign));
// Issues a mutate request to update the campaign.
$campaignServiceClient = $this->googleAdsClient->getCampaignServiceClient();
$response = $campaignServiceClient->mutateCampaigns(
self::CUSTOMER_ID,
[$campaignOperation]
);