public static function asBiddableAdGroupCriterion(
        $adGroupId,
        ProductPartition $productPartition,
        $bidAmount = null
    ) {
        $criterion = new BiddableAdGroupCriterion();

        if ($bidAmount !== null && $bidAmount > 0) {
            $biddingStrategyConfiguration = new BiddingStrategyConfiguration();
            $cpcBid = new CpcBid();
            $money = new Money();
            $money->setMicroAmount($bidAmount);
            $cpcBid->setBid($money);
            $biddingStrategyConfiguration->setBids([$cpcBid]);

            $criterion->setBiddingStrategyConfiguration(
                $biddingStrategyConfiguration
            );
        }
        $criterion->setAdGroupId($adGroupId);
        $criterion->setCriterion($productPartition);

        return $criterion;
    }