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

namespace Google\Ads\GoogleAds\V11\Common;

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

/**
 * Contains the usage information of the asset.
 *
 * Generated from protobuf message <code>google.ads.googleads.v11.common.AssetUsage</code>
 */
class AssetUsage extends \Google\Protobuf\Internal\Message
{
    /**
     * Resource name of the asset.
     *
     * Generated from protobuf field <code>string asset = 1;</code>
     */
    protected $asset = '';
    /**
     * The served field type of the asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType served_asset_field_type = 2;</code>
     */
    protected $served_asset_field_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $asset
     *           Resource name of the asset.
     *     @type int $served_asset_field_type
     *           The served field type of the asset.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V11\Common\AssetUsage::initOnce();
        parent::__construct($data);
    }

    /**
     * Resource name of the asset.
     *
     * Generated from protobuf field <code>string asset = 1;</code>
     * @return string
     */
    public function getAsset()
    {
        return $this->asset;
    }

    /**
     * Resource name of the asset.
     *
     * Generated from protobuf field <code>string asset = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setAsset($var)
    {
        GPBUtil::checkString($var, True);
        $this->asset = $var;

        return $this;
    }

    /**
     * The served field type of the asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType served_asset_field_type = 2;</code>
     * @return int
     */
    public function getServedAssetFieldType()
    {
        return $this->served_asset_field_type;
    }

    /**
     * The served field type of the asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType served_asset_field_type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setServedAssetFieldType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V11\Enums\ServedAssetFieldTypeEnum\ServedAssetFieldType::class);
        $this->served_asset_field_type = $var;

        return $this;
    }

}

