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

namespace Google\Ads\GoogleAds\V25\Resources\Recommendation;

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

/**
 * The Target CPA opt-in recommendation.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.resources.Recommendation.TargetCpaOptInRecommendation</code>
 */
class TargetCpaOptInRecommendation extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The available goals and corresponding options for Target CPA
     * strategy.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption options = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $options;
    /**
     * Output only. The recommended average CPA target. See required budget
     * amount and impact of using this recommendation in options list.
     *
     * Generated from protobuf field <code>optional int64 recommended_target_cpa_micros = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $recommended_target_cpa_micros = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V25\Resources\Recommendation\TargetCpaOptInRecommendation\TargetCpaOptInRecommendationOption[] $options
     *           Output only. The available goals and corresponding options for Target CPA
     *           strategy.
     *     @type int|string $recommended_target_cpa_micros
     *           Output only. The recommended average CPA target. See required budget
     *           amount and impact of using this recommendation in options list.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Resources\Recommendation::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The available goals and corresponding options for Target CPA
     * strategy.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption options = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<\Google\Ads\GoogleAds\V25\Resources\Recommendation\TargetCpaOptInRecommendation\TargetCpaOptInRecommendationOption>
     */
    public function getOptions()
    {
        return $this->options;
    }

    /**
     * Output only. The available goals and corresponding options for Target CPA
     * strategy.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption options = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Ads\GoogleAds\V25\Resources\Recommendation\TargetCpaOptInRecommendation\TargetCpaOptInRecommendationOption[] $var
     * @return $this
     */
    public function setOptions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V25\Resources\Recommendation\TargetCpaOptInRecommendation\TargetCpaOptInRecommendationOption::class);
        $this->options = $arr;

        return $this;
    }

    /**
     * Output only. The recommended average CPA target. See required budget
     * amount and impact of using this recommendation in options list.
     *
     * Generated from protobuf field <code>optional int64 recommended_target_cpa_micros = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getRecommendedTargetCpaMicros()
    {
        return isset($this->recommended_target_cpa_micros) ? $this->recommended_target_cpa_micros : 0;
    }

    public function hasRecommendedTargetCpaMicros()
    {
        return isset($this->recommended_target_cpa_micros);
    }

    public function clearRecommendedTargetCpaMicros()
    {
        unset($this->recommended_target_cpa_micros);
    }

    /**
     * Output only. The recommended average CPA target. See required budget
     * amount and impact of using this recommendation in options list.
     *
     * Generated from protobuf field <code>optional int64 recommended_target_cpa_micros = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setRecommendedTargetCpaMicros($var)
    {
        GPBUtil::checkInt64($var);
        $this->recommended_target_cpa_micros = $var;

        return $this;
    }

}

