<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v21/common/asset_types.proto

namespace Google\Ads\GoogleAds\V21\Common;

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

/**
 * Barcode info to generate promotion barcode.
 *
 * Generated from protobuf message <code>google.ads.googleads.v21.common.PromotionBarcodeInfo</code>
 */
class PromotionBarcodeInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Barcode type used to generate barcode with the correct format.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v21.enums.PromotionBarcodeTypeEnum.PromotionBarcodeType type = 1;</code>
     */
    protected $type = 0;
    /**
     * Promotion message to be encoded in the barcode.
     *
     * Generated from protobuf field <code>string barcode_content = 2;</code>
     */
    protected $barcode_content = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *           Barcode type used to generate barcode with the correct format.
     *     @type string $barcode_content
     *           Promotion message to be encoded in the barcode.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V21\Common\AssetTypes::initOnce();
        parent::__construct($data);
    }

    /**
     * Barcode type used to generate barcode with the correct format.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v21.enums.PromotionBarcodeTypeEnum.PromotionBarcodeType type = 1;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Barcode type used to generate barcode with the correct format.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v21.enums.PromotionBarcodeTypeEnum.PromotionBarcodeType type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V21\Enums\PromotionBarcodeTypeEnum\PromotionBarcodeType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Promotion message to be encoded in the barcode.
     *
     * Generated from protobuf field <code>string barcode_content = 2;</code>
     * @return string
     */
    public function getBarcodeContent()
    {
        return $this->barcode_content;
    }

    /**
     * Promotion message to be encoded in the barcode.
     *
     * Generated from protobuf field <code>string barcode_content = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setBarcodeContent($var)
    {
        GPBUtil::checkString($var, True);
        $this->barcode_content = $var;

        return $this;
    }

}

