<?php
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v24/common/campaign_reservation_quote.proto

namespace Google\Ads\GoogleAds\V24\Common;

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

/**
 * The campaign reservation quote.
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.common.CampaignReservationQuote</code>
 */
class CampaignReservationQuote extends \Google\Protobuf\Internal\Message
{
    /**
     * The campaign resource name, as it was specified in the request. It could
     * contain a temp ID.
     * Format: customers/{customer_id}/campaigns/{campaign_id}
     *
     * Generated from protobuf field <code>string campaign = 1;</code>
     */
    protected $campaign = '';
    /**
     * Maximum budget to get all available impressions at the current CPM. Capped
     * at 10M USD. Specified in micros of the advertiser currency.
     *
     * Generated from protobuf field <code>int64 max_budget_micros = 3;</code>
     */
    protected $max_budget_micros = 0;
    /**
     * The possible duration of the hold, in seconds.
     *
     * Generated from protobuf field <code>int64 possible_hold_duration_seconds = 4;</code>
     */
    protected $possible_hold_duration_seconds = 0;
    protected $suggested_quote;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $campaign
     *           The campaign resource name, as it was specified in the request. It could
     *           contain a temp ID.
     *           Format: customers/{customer_id}/campaigns/{campaign_id}
     * @type int|string $max_budget_micros
     *           Maximum budget to get all available impressions at the current CPM. Capped
     *           at 10M USD. Specified in micros of the advertiser currency.
     * @type int|string $possible_hold_duration_seconds
     *           The possible duration of the hold, in seconds.
     * @type int|string $suggested_cpm_micros
     *           The CPM that would be accepted for the campaign calculated at the
     *           proposed budget. Specified in micros of the advertiser currency.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Common\CampaignReservationQuote::initOnce();
        parent::__construct($data);
    }

    /**
     * The campaign resource name, as it was specified in the request. It could
     * contain a temp ID.
     * Format: customers/{customer_id}/campaigns/{campaign_id}
     *
     * Generated from protobuf field <code>string campaign = 1;</code>
     *
     * @return string
     */
    public function getCampaign()
    {
        return $this->campaign;
    }

    /**
     * The campaign resource name, as it was specified in the request. It could
     * contain a temp ID.
     * Format: customers/{customer_id}/campaigns/{campaign_id}
     *
     * Generated from protobuf field <code>string campaign = 1;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setCampaign($var)
    {
        GPBUtil::checkString($var, true);
        $this->campaign = $var;

        return $this;
    }

    /**
     * Maximum budget to get all available impressions at the current CPM. Capped
     * at 10M USD. Specified in micros of the advertiser currency.
     *
     * Generated from protobuf field <code>int64 max_budget_micros = 3;</code>
     *
     * @return int|string
     */
    public function getMaxBudgetMicros()
    {
        return $this->max_budget_micros;
    }

    /**
     * Maximum budget to get all available impressions at the current CPM. Capped
     * at 10M USD. Specified in micros of the advertiser currency.
     *
     * Generated from protobuf field <code>int64 max_budget_micros = 3;</code>
     *
     * @param  int|string $var
     * @return $this
     */
    public function setMaxBudgetMicros($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_budget_micros = $var;

        return $this;
    }

    /**
     * The possible duration of the hold, in seconds.
     *
     * Generated from protobuf field <code>int64 possible_hold_duration_seconds = 4;</code>
     *
     * @return int|string
     */
    public function getPossibleHoldDurationSeconds()
    {
        return $this->possible_hold_duration_seconds;
    }

    /**
     * The possible duration of the hold, in seconds.
     *
     * Generated from protobuf field <code>int64 possible_hold_duration_seconds = 4;</code>
     *
     * @param  int|string $var
     * @return $this
     */
    public function setPossibleHoldDurationSeconds($var)
    {
        GPBUtil::checkInt64($var);
        $this->possible_hold_duration_seconds = $var;

        return $this;
    }

    /**
     * The CPM that would be accepted for the campaign calculated at the
     * proposed budget. Specified in micros of the advertiser currency.
     *
     * Generated from protobuf field <code>int64 suggested_cpm_micros = 2;</code>
     *
     * @return int|string
     */
    public function getSuggestedCpmMicros()
    {
        return $this->readOneof(2);
    }

    public function hasSuggestedCpmMicros()
    {
        return $this->hasOneof(2);
    }

    /**
     * The CPM that would be accepted for the campaign calculated at the
     * proposed budget. Specified in micros of the advertiser currency.
     *
     * Generated from protobuf field <code>int64 suggested_cpm_micros = 2;</code>
     *
     * @param  int|string $var
     * @return $this
     */
    public function setSuggestedCpmMicros($var)
    {
        GPBUtil::checkInt64($var);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getSuggestedQuote()
    {
        return $this->whichOneof("suggested_quote");
    }

}

