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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * An incentive that a user can claim for their account.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.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.v23.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.v23.services.FetchIncentiveRequest.IncentiveType type = 4;</code>
     */
    protected $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\V23\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 $type
     *           The type of the incentive.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\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.v23.services.Incentive.Requirement requirement = 2;</code>
     * @return \Google\Ads\GoogleAds\V23\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.v23.services.Incentive.Requirement requirement = 2;</code>
     * @param \Google\Ads\GoogleAds\V23\Services\Incentive\Requirement $var
     * @return $this
     */
    public function setRequirement($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\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.v23.services.FetchIncentiveRequest.IncentiveType type = 4;</code>
     * @return int
     */
    public function getType()
    {
        return isset($this->type) ? $this->type : 0;
    }

    public function hasType()
    {
        return isset($this->type);
    }

    public function clearType()
    {
        unset($this->type);
    }

    /**
     * The type of the incentive.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.services.FetchIncentiveRequest.IncentiveType type = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Services\FetchIncentiveRequest\IncentiveType::class);
        $this->type = $var;

        return $this;
    }

}

