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

namespace Google\Ads\GoogleAds\V25\Actions;

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

/**
 * Request message for the QuoteCampaigns action.
 * Request including this operation can have a latency of up to 30 seconds.
 * This feature is not publicly available.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.actions.QuoteCampaignsOperation</code>
 */
class QuoteCampaignsOperation extends \Google\Protobuf\Internal\Message
{
    /**
     * Campaigns for which the quotes are requested. Maximum 2 campaigns per
     * request.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.actions.QuoteCampaignsOperation.Campaign campaigns = 1;</code>
     */
    private $campaigns;
    /**
     * If provided, the signature of the previous quote. Clients should always
     * provide the quote signature from previous quotes if they haven't changed
     * the campaigns to prevent price fluctuations within a user session.
     *
     * Generated from protobuf field <code>string quote_signature = 2;</code>
     */
    protected $quote_signature = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V25\Actions\QuoteCampaignsOperation\Campaign[] $campaigns
     *           Campaigns for which the quotes are requested. Maximum 2 campaigns per
     *           request.
     *     @type string $quote_signature
     *           If provided, the signature of the previous quote. Clients should always
     *           provide the quote signature from previous quotes if they haven't changed
     *           the campaigns to prevent price fluctuations within a user session.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Actions\QuoteCampaigns::initOnce();
        parent::__construct($data);
    }

    /**
     * Campaigns for which the quotes are requested. Maximum 2 campaigns per
     * request.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.actions.QuoteCampaignsOperation.Campaign campaigns = 1;</code>
     * @return RepeatedField<\Google\Ads\GoogleAds\V25\Actions\QuoteCampaignsOperation\Campaign>
     */
    public function getCampaigns()
    {
        return $this->campaigns;
    }

    /**
     * Campaigns for which the quotes are requested. Maximum 2 campaigns per
     * request.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.actions.QuoteCampaignsOperation.Campaign campaigns = 1;</code>
     * @param \Google\Ads\GoogleAds\V25\Actions\QuoteCampaignsOperation\Campaign[] $var
     * @return $this
     */
    public function setCampaigns($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V25\Actions\QuoteCampaignsOperation\Campaign::class);
        $this->campaigns = $arr;

        return $this;
    }

    /**
     * If provided, the signature of the previous quote. Clients should always
     * provide the quote signature from previous quotes if they haven't changed
     * the campaigns to prevent price fluctuations within a user session.
     *
     * Generated from protobuf field <code>string quote_signature = 2;</code>
     * @return string
     */
    public function getQuoteSignature()
    {
        return $this->quote_signature;
    }

    /**
     * If provided, the signature of the previous quote. Clients should always
     * provide the quote signature from previous quotes if they haven't changed
     * the campaigns to prevent price fluctuations within a user session.
     *
     * Generated from protobuf field <code>string quote_signature = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setQuoteSignature($var)
    {
        GPBUtil::checkString($var, True);
        $this->quote_signature = $var;

        return $this;
    }

}

