<?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\BookCampaignsOperation;

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

/**
 * A single campaign to book.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.actions.BookCampaignsOperation.Campaign</code>
 */
class Campaign extends \Google\Protobuf\Internal\Message
{
    /**
     * Campaign resource to book.
     * Format: customers/{customer_id}/campaigns/{campaign_id}
     *
     * Generated from protobuf field <code>string campaign = 1;</code>
     */
    protected $campaign = '';
    /**
     * Determines if the current request should book the inventory or hold it.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.ReservationRequestTypeEnum.ReservationRequestType request_type = 2;</code>
     */
    protected $request_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $campaign
     *           Campaign resource to book.
     *           Format: customers/{customer_id}/campaigns/{campaign_id}
     * @type int $request_type
     *           Determines if the current request should book the inventory or hold it.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Actions\BookCampaigns::initOnce();
        parent::__construct($data);
    }

    /**
     * Campaign resource to book.
     * Format: customers/{customer_id}/campaigns/{campaign_id}
     *
     * Generated from protobuf field <code>string campaign = 1;</code>
     *
     * @return string
     */
    public function getCampaign()
    {
        return $this->campaign;
    }

    /**
     * Campaign resource to book.
     * 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;
    }

    /**
     * Determines if the current request should book the inventory or hold it.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.ReservationRequestTypeEnum.ReservationRequestType request_type = 2;</code>
     *
     * @return int
     */
    public function getRequestType()
    {
        return $this->request_type;
    }

    /**
     * Determines if the current request should book the inventory or hold it.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.ReservationRequestTypeEnum.ReservationRequestType request_type = 2;</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setRequestType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\ReservationRequestTypeEnum\ReservationRequestType::class);
        $this->request_type = $var;

        return $this;
    }

}

