<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/admanager/v1/creative_template_messages.proto

namespace Google\Ads\AdManager\V1\CreativeTemplateVariable;

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

/**
 * Represents a long variable defined in a creative template.
 * Use [LongCreativeTemplateVariableValue][] to specify the value
 * for this variable when creating [TemplateCreative][] from a
 * [CreativeTemplate][google.ads.admanager.v1.CreativeTemplate].
 *
 * Generated from protobuf message <code>google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable</code>
 */
class LongCreativeTemplateVariable extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Default value to be filled in when creating creatives from the
     * creative template.
     *
     * Generated from protobuf field <code>optional int64 default_value = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $default_value = null;
    /**
     * Optional. Sample value that is used when previewing the template in the
     * UI.
     *
     * Generated from protobuf field <code>optional int64 sample_value = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $sample_value = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $default_value
     *           Optional. Default value to be filled in when creating creatives from the
     *           creative template.
     *     @type int|string $sample_value
     *           Optional. Sample value that is used when previewing the template in the
     *           UI.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateMessages::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Default value to be filled in when creating creatives from the
     * creative template.
     *
     * Generated from protobuf field <code>optional int64 default_value = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int|string
     */
    public function getDefaultValue()
    {
        return isset($this->default_value) ? $this->default_value : 0;
    }

    public function hasDefaultValue()
    {
        return isset($this->default_value);
    }

    public function clearDefaultValue()
    {
        unset($this->default_value);
    }

    /**
     * Optional. Default value to be filled in when creating creatives from the
     * creative template.
     *
     * Generated from protobuf field <code>optional int64 default_value = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int|string $var
     * @return $this
     */
    public function setDefaultValue($var)
    {
        GPBUtil::checkInt64($var);
        $this->default_value = $var;

        return $this;
    }

    /**
     * Optional. Sample value that is used when previewing the template in the
     * UI.
     *
     * Generated from protobuf field <code>optional int64 sample_value = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int|string
     */
    public function getSampleValue()
    {
        return isset($this->sample_value) ? $this->sample_value : 0;
    }

    public function hasSampleValue()
    {
        return isset($this->sample_value);
    }

    public function clearSampleValue()
    {
        unset($this->sample_value);
    }

    /**
     * Optional. Sample value that is used when previewing the template in the
     * UI.
     *
     * Generated from protobuf field <code>optional int64 sample_value = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int|string $var
     * @return $this
     */
    public function setSampleValue($var)
    {
        GPBUtil::checkInt64($var);
        $this->sample_value = $var;

        return $this;
    }

}


