<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v16/services/reach_plan_service.proto

namespace Google\Ads\GoogleAds\V16\Services;

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

/**
 * The forecasted allocation and traffic metrics for a specific product
 * at a point on the reach curve.
 *
 * Generated from protobuf message <code>google.ads.googleads.v16.services.PlannedProductReachForecast</code>
 */
class PlannedProductReachForecast extends \Google\Protobuf\Internal\Message
{
    /**
     * Selected product for planning. The product codes returned are within the
     * set of the ones returned by ListPlannableProducts when using the same
     * location ID.
     *
     * Generated from protobuf field <code>string plannable_product_code = 1;</code>
     */
    protected $plannable_product_code = '';
    /**
     * The cost in micros. This may differ from the product's input allocation
     * if one or more planned products cannot fulfill the budget because of
     * limited inventory.
     *
     * Generated from protobuf field <code>int64 cost_micros = 2;</code>
     */
    protected $cost_micros = 0;
    /**
     * Forecasted traffic metrics for this product.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v16.services.PlannedProductForecast planned_product_forecast = 3;</code>
     */
    protected $planned_product_forecast = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $plannable_product_code
     *           Selected product for planning. The product codes returned are within the
     *           set of the ones returned by ListPlannableProducts when using the same
     *           location ID.
     *     @type int|string $cost_micros
     *           The cost in micros. This may differ from the product's input allocation
     *           if one or more planned products cannot fulfill the budget because of
     *           limited inventory.
     *     @type \Google\Ads\GoogleAds\V16\Services\PlannedProductForecast $planned_product_forecast
     *           Forecasted traffic metrics for this product.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V16\Services\ReachPlanService::initOnce();
        parent::__construct($data);
    }

    /**
     * Selected product for planning. The product codes returned are within the
     * set of the ones returned by ListPlannableProducts when using the same
     * location ID.
     *
     * Generated from protobuf field <code>string plannable_product_code = 1;</code>
     * @return string
     */
    public function getPlannableProductCode()
    {
        return $this->plannable_product_code;
    }

    /**
     * Selected product for planning. The product codes returned are within the
     * set of the ones returned by ListPlannableProducts when using the same
     * location ID.
     *
     * Generated from protobuf field <code>string plannable_product_code = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setPlannableProductCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->plannable_product_code = $var;

        return $this;
    }

    /**
     * The cost in micros. This may differ from the product's input allocation
     * if one or more planned products cannot fulfill the budget because of
     * limited inventory.
     *
     * Generated from protobuf field <code>int64 cost_micros = 2;</code>
     * @return int|string
     */
    public function getCostMicros()
    {
        return $this->cost_micros;
    }

    /**
     * The cost in micros. This may differ from the product's input allocation
     * if one or more planned products cannot fulfill the budget because of
     * limited inventory.
     *
     * Generated from protobuf field <code>int64 cost_micros = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCostMicros($var)
    {
        GPBUtil::checkInt64($var);
        $this->cost_micros = $var;

        return $this;
    }

    /**
     * Forecasted traffic metrics for this product.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v16.services.PlannedProductForecast planned_product_forecast = 3;</code>
     * @return \Google\Ads\GoogleAds\V16\Services\PlannedProductForecast|null
     */
    public function getPlannedProductForecast()
    {
        return $this->planned_product_forecast;
    }

    public function hasPlannedProductForecast()
    {
        return isset($this->planned_product_forecast);
    }

    public function clearPlannedProductForecast()
    {
        unset($this->planned_product_forecast);
    }

    /**
     * Forecasted traffic metrics for this product.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v16.services.PlannedProductForecast planned_product_forecast = 3;</code>
     * @param \Google\Ads\GoogleAds\V16\Services\PlannedProductForecast $var
     * @return $this
     */
    public function setPlannedProductForecast($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V16\Services\PlannedProductForecast::class);
        $this->planned_product_forecast = $var;

        return $this;
    }

}

