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

/**
 * Response for applying an incentive.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.ApplyIncentiveResponse</code>
 */
class ApplyIncentiveResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The coupon code of the applied incentive.
     * A globally unique identifier of the applied incentive.
     * This code is separate and distinct from the selected_incentive_id in the
     * request.
     *
     * Generated from protobuf field <code>optional string coupon_code = 1;</code>
     */
    protected $coupon_code = null;
    /**
     * The timestamp when this incentive was applied. The timestamp is in
     * UTC timezone and in "yyyy-MM-dd HH:mm:ss" format.
     *
     * Generated from protobuf field <code>optional string creation_time = 2;</code>
     */
    protected $creation_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $coupon_code
     *           The coupon code of the applied incentive.
     *           A globally unique identifier of the applied incentive.
     *           This code is separate and distinct from the selected_incentive_id in the
     *           request.
     *     @type string $creation_time
     *           The timestamp when this incentive was applied. The timestamp is in
     *           UTC timezone and in "yyyy-MM-dd HH:mm:ss" format.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\IncentiveService::initOnce();
        parent::__construct($data);
    }

    /**
     * The coupon code of the applied incentive.
     * A globally unique identifier of the applied incentive.
     * This code is separate and distinct from the selected_incentive_id in the
     * request.
     *
     * Generated from protobuf field <code>optional string coupon_code = 1;</code>
     * @return string
     */
    public function getCouponCode()
    {
        return isset($this->coupon_code) ? $this->coupon_code : '';
    }

    public function hasCouponCode()
    {
        return isset($this->coupon_code);
    }

    public function clearCouponCode()
    {
        unset($this->coupon_code);
    }

    /**
     * The coupon code of the applied incentive.
     * A globally unique identifier of the applied incentive.
     * This code is separate and distinct from the selected_incentive_id in the
     * request.
     *
     * Generated from protobuf field <code>optional string coupon_code = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setCouponCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->coupon_code = $var;

        return $this;
    }

    /**
     * The timestamp when this incentive was applied. The timestamp is in
     * UTC timezone and in "yyyy-MM-dd HH:mm:ss" format.
     *
     * Generated from protobuf field <code>optional string creation_time = 2;</code>
     * @return string
     */
    public function getCreationTime()
    {
        return isset($this->creation_time) ? $this->creation_time : '';
    }

    public function hasCreationTime()
    {
        return isset($this->creation_time);
    }

    public function clearCreationTime()
    {
        unset($this->creation_time);
    }

    /**
     * The timestamp when this incentive was applied. The timestamp is in
     * UTC timezone and in "yyyy-MM-dd HH:mm:ss" format.
     *
     * Generated from protobuf field <code>optional string creation_time = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCreationTime($var)
    {
        GPBUtil::checkString($var, True);
        $this->creation_time = $var;

        return $this;
    }

}

