// Update the bid.
    $adGroup->bids = new ManualCPCAdGroupBids();
    // Money amounts are specified in micros, which are millionths of the
    // fundamental currency. Ex) 1 dollar = 1M micros.
    $adGroup->bids->keywordMaxCpc = new Bid(new Money(0.75 * AdWordsConstants::MICROS_PER_DOLLAR));
    // Create operation.
    $operation = new AdGroupOperation();
    $operation->operand = $adGroup;
    $operation->operator = 'SET';
    $operations = array($operation);
    // Make the mutate request.
    $result = $adGroupService->mutate($operations);
    // Display result.
    $adGroup = $result->value[0];
    printf("Ad group with id '%s' has updated default bid '\$%s'.\n", $adGroup->id, $adGroup->bids->keywordMaxCpc->amount->microAmount / AdWordsConstants::MICROS_PER_DOLLAR);
}
// Don't run the example if the file is being included.
if (__FILE__ != realpath($_SERVER['PHP_SELF'])) {
    return;
}
try {
    // Get AdWordsUser from credentials in "../auth.ini"
    // relative to the AdWordsUser.php file's directory.
    $user = new AdWordsUser();
    // Log every SOAP XML request and response.
    $user->LogAll();
    // Run the example.
    UpdateAdGroupExample($user, $adGroupId);
} catch (Exception $e) {
    printf("An error has occurred: %s\n", $e->getMessage());
}
 public function testUpdateAdGroupExample()
 {
     $adGroupId = $this->testUtils->CreateAdGroup($this->campaignId);
     UpdateAdGroupExample($this->user, $adGroupId);
 }