<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v23/resources/accessible_bidding_strategy.proto

namespace Google\Ads\GoogleAds\V23\Resources\AccessibleBiddingStrategy;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * An automated bid strategy that sets bids to help get as many conversions as
 * possible at the target cost-per-acquisition (CPA) you set.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.resources.AccessibleBiddingStrategy.TargetCpa</code>
 */
class TargetCpa extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Average CPA target.
     * This target should be greater than or equal to minimum billable unit
     * based on the currency for the account.
     *
     * Generated from protobuf field <code>optional int64 target_cpa_micros = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $target_cpa_micros = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $target_cpa_micros
     *           Output only. Average CPA target.
     *           This target should be greater than or equal to minimum billable unit
     *           based on the currency for the account.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Resources\AccessibleBiddingStrategy::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Average CPA target.
     * This target should be greater than or equal to minimum billable unit
     * based on the currency for the account.
     *
     * Generated from protobuf field <code>optional int64 target_cpa_micros = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getTargetCpaMicros()
    {
        return isset($this->target_cpa_micros) ? $this->target_cpa_micros : 0;
    }

    public function hasTargetCpaMicros()
    {
        return isset($this->target_cpa_micros);
    }

    public function clearTargetCpaMicros()
    {
        unset($this->target_cpa_micros);
    }

    /**
     * Output only. Average CPA target.
     * This target should be greater than or equal to minimum billable unit
     * based on the currency for the account.
     *
     * Generated from protobuf field <code>optional int64 target_cpa_micros = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setTargetCpaMicros($var)
    {
        GPBUtil::checkInt64($var);
        $this->target_cpa_micros = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TargetCpa::class, \Google\Ads\GoogleAds\V23\Resources\AccessibleBiddingStrategy_TargetCpa::class);

