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

namespace Google\Ads\GoogleAds\V25\Services\Incentive;

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

/**
 * Requirement for an incentive.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.services.Incentive.Requirement</code>
 */
class Requirement extends \Google\Protobuf\Internal\Message
{
    protected $requirement;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V25\Services\Incentive\Requirement\Spend $spend
     *           Optional. Spend requirement for an incentive.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Services\IncentiveService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Spend requirement for an incentive.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.Incentive.Requirement.Spend spend = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Ads\GoogleAds\V25\Services\Incentive\Requirement\Spend|null
     */
    public function getSpend()
    {
        return $this->readOneof(1);
    }

    public function hasSpend()
    {
        return $this->hasOneof(1);
    }

    /**
     * Optional. Spend requirement for an incentive.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.Incentive.Requirement.Spend spend = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Ads\GoogleAds\V25\Services\Incentive\Requirement\Spend $var
     * @return $this
     */
    public function setSpend($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Services\Incentive\Requirement\Spend::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

