<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v22/resources/final_url_expansion_asset_view.proto

namespace Google\Ads\GoogleAds\V22\Resources;

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

/**
 * FinalUrlExpansionAssetView Resource.
 *
 * Generated from protobuf message <code>google.ads.googleads.v22.resources.FinalUrlExpansionAssetView</code>
 */
class FinalUrlExpansionAssetView extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The resource name of the FinalUrlExpansionAsset.
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    protected $resource_name = '';
    /**
     * Output only. Campaign in which the asset served.
     *
     * Generated from protobuf field <code>optional string campaign = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    protected $campaign = null;
    /**
     * Output only. The ID of the asset.
     *
     * Generated from protobuf field <code>optional string asset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    protected $asset = null;
    /**
     * Output only. The field type of the asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.AssetFieldTypeEnum.AssetFieldType field_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $field_type = 0;
    /**
     * Output only. Status of the FinalUrlExpansionAsset.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v22.enums.AssetLinkStatusEnum.AssetLinkStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $status = null;
    /**
     * Output only. Final URL of the FinalUrlExpansionAsset.
     *
     * Generated from protobuf field <code>string final_url = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $final_url = '';
    protected $level;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource_name
     *           Output only. The resource name of the FinalUrlExpansionAsset.
     *     @type string $campaign
     *           Output only. Campaign in which the asset served.
     *     @type string $asset
     *           Output only. The ID of the asset.
     *     @type int $field_type
     *           Output only. The field type of the asset.
     *     @type int $status
     *           Output only. Status of the FinalUrlExpansionAsset.
     *     @type string $final_url
     *           Output only. Final URL of the FinalUrlExpansionAsset.
     *     @type string $ad_group
     *           Output only. Ad Group in which FinalUrlExpansionAsset served.
     *     @type string $asset_group
     *           Output only. Asset Group in which FinalUrlExpansionAsset served.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V22\Resources\FinalUrlExpansionAssetView::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The resource name of the FinalUrlExpansionAsset.
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Output only. The resource name of the FinalUrlExpansionAsset.
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_name = $var;

        return $this;
    }

    /**
     * Output only. Campaign in which the asset served.
     *
     * Generated from protobuf field <code>optional string campaign = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getCampaign()
    {
        return isset($this->campaign) ? $this->campaign : '';
    }

    public function hasCampaign()
    {
        return isset($this->campaign);
    }

    public function clearCampaign()
    {
        unset($this->campaign);
    }

    /**
     * Output only. Campaign in which the asset served.
     *
     * Generated from protobuf field <code>optional string campaign = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setCampaign($var)
    {
        GPBUtil::checkString($var, True);
        $this->campaign = $var;

        return $this;
    }

    /**
     * Output only. The ID of the asset.
     *
     * Generated from protobuf field <code>optional string asset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getAsset()
    {
        return isset($this->asset) ? $this->asset : '';
    }

    public function hasAsset()
    {
        return isset($this->asset);
    }

    public function clearAsset()
    {
        unset($this->asset);
    }

    /**
     * Output only. The ID of the asset.
     *
     * Generated from protobuf field <code>optional string asset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setAsset($var)
    {
        GPBUtil::checkString($var, True);
        $this->asset = $var;

        return $this;
    }

    /**
     * Output only. The field type of the asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.AssetFieldTypeEnum.AssetFieldType field_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getFieldType()
    {
        return $this->field_type;
    }

    /**
     * Output only. The field type of the asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.AssetFieldTypeEnum.AssetFieldType field_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setFieldType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V22\Enums\AssetFieldTypeEnum\AssetFieldType::class);
        $this->field_type = $var;

        return $this;
    }

    /**
     * Output only. Status of the FinalUrlExpansionAsset.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v22.enums.AssetLinkStatusEnum.AssetLinkStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getStatus()
    {
        return isset($this->status) ? $this->status : 0;
    }

    public function hasStatus()
    {
        return isset($this->status);
    }

    public function clearStatus()
    {
        unset($this->status);
    }

    /**
     * Output only. Status of the FinalUrlExpansionAsset.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v22.enums.AssetLinkStatusEnum.AssetLinkStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V22\Enums\AssetLinkStatusEnum\AssetLinkStatus::class);
        $this->status = $var;

        return $this;
    }

    /**
     * Output only. Final URL of the FinalUrlExpansionAsset.
     *
     * Generated from protobuf field <code>string final_url = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getFinalUrl()
    {
        return $this->final_url;
    }

    /**
     * Output only. Final URL of the FinalUrlExpansionAsset.
     *
     * Generated from protobuf field <code>string final_url = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setFinalUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->final_url = $var;

        return $this;
    }

    /**
     * Output only. Ad Group in which FinalUrlExpansionAsset served.
     *
     * Generated from protobuf field <code>string ad_group = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getAdGroup()
    {
        return $this->readOneof(7);
    }

    public function hasAdGroup()
    {
        return $this->hasOneof(7);
    }

    /**
     * Output only. Ad Group in which FinalUrlExpansionAsset served.
     *
     * Generated from protobuf field <code>string ad_group = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setAdGroup($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Output only. Asset Group in which FinalUrlExpansionAsset served.
     *
     * Generated from protobuf field <code>string asset_group = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getAssetGroup()
    {
        return $this->readOneof(8);
    }

    public function hasAssetGroup()
    {
        return $this->hasOneof(8);
    }

    /**
     * Output only. Asset Group in which FinalUrlExpansionAsset served.
     *
     * Generated from protobuf field <code>string asset_group = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setAssetGroup($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getLevel()
    {
        return $this->whichOneof("level");
    }

}

