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

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

/**
 * An incentive that a user can claim for their account.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.services.Incentive</code>
 */
class Incentive extends \Google\Protobuf\Internal\Message
{
    /**
     * The incentive ID of this incentive. This is used to identify which
     * incentive is selected by the user in the CYO flow.
     *
     * Generated from protobuf field <code>optional int64 incentive_id = 1;</code>
     */
    protected $incentive_id = null;
    /**
     * The requirement for this incentive.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.services.Incentive.Requirement requirement = 2;</code>
     */
    protected $requirement = null;
    /**
     * The URL of the terms and conditions for THIS incentive offer ONLY.
     * This is different from the terms_and_conditions_url field in
     * AcquisitionIncentiveOffer which is a combination of all the Incentive
     * offers in a CYO offer.
     *
     * Generated from protobuf field <code>optional string incentive_terms_and_conditions_url = 3;</code>
     */
    protected $incentive_terms_and_conditions_url = null;
    /**
     * The type of the incentive.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.IncentiveTypeEnum.IncentiveType incentive_type = 5;</code>
     */
    protected $incentive_type = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $incentive_id
     *           The incentive ID of this incentive. This is used to identify which
     *           incentive is selected by the user in the CYO flow.
     *     @type \Google\Ads\GoogleAds\V25\Services\Incentive\Requirement $requirement
     *           The requirement for this incentive.
     *     @type string $incentive_terms_and_conditions_url
     *           The URL of the terms and conditions for THIS incentive offer ONLY.
     *           This is different from the terms_and_conditions_url field in
     *           AcquisitionIncentiveOffer which is a combination of all the Incentive
     *           offers in a CYO offer.
     *     @type int $incentive_type
     *           The type of the incentive.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Services\IncentiveService::initOnce();
        parent::__construct($data);
    }

    /**
     * The incentive ID of this incentive. This is used to identify which
     * incentive is selected by the user in the CYO flow.
     *
     * Generated from protobuf field <code>optional int64 incentive_id = 1;</code>
     * @return int|string
     */
    public function getIncentiveId()
    {
        return isset($this->incentive_id) ? $this->incentive_id : 0;
    }

    public function hasIncentiveId()
    {
        return isset($this->incentive_id);
    }

    public function clearIncentiveId()
    {
        unset($this->incentive_id);
    }

    /**
     * The incentive ID of this incentive. This is used to identify which
     * incentive is selected by the user in the CYO flow.
     *
     * Generated from protobuf field <code>optional int64 incentive_id = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setIncentiveId($var)
    {
        GPBUtil::checkInt64($var);
        $this->incentive_id = $var;

        return $this;
    }

    /**
     * The requirement for this incentive.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.services.Incentive.Requirement requirement = 2;</code>
     * @return \Google\Ads\GoogleAds\V25\Services\Incentive\Requirement|null
     */
    public function getRequirement()
    {
        return $this->requirement;
    }

    public function hasRequirement()
    {
        return isset($this->requirement);
    }

    public function clearRequirement()
    {
        unset($this->requirement);
    }

    /**
     * The requirement for this incentive.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.services.Incentive.Requirement requirement = 2;</code>
     * @param \Google\Ads\GoogleAds\V25\Services\Incentive\Requirement $var
     * @return $this
     */
    public function setRequirement($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Services\Incentive\Requirement::class);
        $this->requirement = $var;

        return $this;
    }

    /**
     * The URL of the terms and conditions for THIS incentive offer ONLY.
     * This is different from the terms_and_conditions_url field in
     * AcquisitionIncentiveOffer which is a combination of all the Incentive
     * offers in a CYO offer.
     *
     * Generated from protobuf field <code>optional string incentive_terms_and_conditions_url = 3;</code>
     * @return string
     */
    public function getIncentiveTermsAndConditionsUrl()
    {
        return isset($this->incentive_terms_and_conditions_url) ? $this->incentive_terms_and_conditions_url : '';
    }

    public function hasIncentiveTermsAndConditionsUrl()
    {
        return isset($this->incentive_terms_and_conditions_url);
    }

    public function clearIncentiveTermsAndConditionsUrl()
    {
        unset($this->incentive_terms_and_conditions_url);
    }

    /**
     * The URL of the terms and conditions for THIS incentive offer ONLY.
     * This is different from the terms_and_conditions_url field in
     * AcquisitionIncentiveOffer which is a combination of all the Incentive
     * offers in a CYO offer.
     *
     * Generated from protobuf field <code>optional string incentive_terms_and_conditions_url = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setIncentiveTermsAndConditionsUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->incentive_terms_and_conditions_url = $var;

        return $this;
    }

    /**
     * The type of the incentive.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.IncentiveTypeEnum.IncentiveType incentive_type = 5;</code>
     * @return int
     */
    public function getIncentiveType()
    {
        return isset($this->incentive_type) ? $this->incentive_type : 0;
    }

    public function hasIncentiveType()
    {
        return isset($this->incentive_type);
    }

    public function clearIncentiveType()
    {
        unset($this->incentive_type);
    }

    /**
     * The type of the incentive.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.IncentiveTypeEnum.IncentiveType incentive_type = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setIncentiveType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V25\Enums\IncentiveTypeEnum\IncentiveType::class);
        $this->incentive_type = $var;

        return $this;
    }

}

