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

namespace Google\Ads\GoogleAds\V23\Actions;

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

/**
 * Request message for the BookCampaigns 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.v23.actions.BookCampaignsOperation</code>
 */
class BookCampaignsOperation extends \Google\Protobuf\Internal\Message
{
    /**
     * Campaigns to book. Maximum 2 campaigns per request.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.actions.BookCampaignsOperation.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\V23\Actions\BookCampaignsOperation\Campaign[] $campaigns
     *           Campaigns to book. 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\V23\Actions\BookCampaigns::initOnce();
        parent::__construct($data);
    }

    /**
     * Campaigns to book. Maximum 2 campaigns per request.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.actions.BookCampaignsOperation.Campaign campaigns = 1;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\Actions\BookCampaignsOperation\Campaign>
     */
    public function getCampaigns()
    {
        return $this->campaigns;
    }

    /**
     * Campaigns to book. Maximum 2 campaigns per request.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.actions.BookCampaignsOperation.Campaign campaigns = 1;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Actions\BookCampaignsOperation\Campaign[] $var
     * @return $this
     */
    public function setCampaigns($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Actions\BookCampaignsOperation\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;
    }

}

