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

namespace Google\Ads\GoogleAds\V9\Resources;

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

/**
 * A link between a customer and an asset.
 *
 * Generated from protobuf message <code>google.ads.googleads.v9.resources.CustomerAsset</code>
 */
class CustomerAsset extends \Google\Protobuf\Internal\Message
{
    /**
     * Immutable. The resource name of the customer asset.
     * CustomerAsset resource names have the form:
     * `customers/{customer_id}/customerAssets/{asset_id}~{field_type}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     */
    protected $resource_name = '';
    /**
     * Required. Immutable. The asset which is linked to the customer.
     *
     * Generated from protobuf field <code>string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     */
    protected $asset = '';
    /**
     * Required. Immutable. Role that the asset takes for the customer link.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v9.enums.AssetFieldTypeEnum.AssetFieldType field_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $field_type = 0;
    /**
     * Status of the customer asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v9.enums.AssetLinkStatusEnum.AssetLinkStatus status = 4;</code>
     */
    protected $status = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource_name
     *           Immutable. The resource name of the customer asset.
     *           CustomerAsset resource names have the form:
     *           `customers/{customer_id}/customerAssets/{asset_id}~{field_type}`
     *     @type string $asset
     *           Required. Immutable. The asset which is linked to the customer.
     *     @type int $field_type
     *           Required. Immutable. Role that the asset takes for the customer link.
     *     @type int $status
     *           Status of the customer asset.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V9\Resources\CustomerAsset::initOnce();
        parent::__construct($data);
    }

    /**
     * Immutable. The resource name of the customer asset.
     * CustomerAsset resource names have the form:
     * `customers/{customer_id}/customerAssets/{asset_id}~{field_type}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Immutable. The resource name of the customer asset.
     * CustomerAsset resource names have the form:
     * `customers/{customer_id}/customerAssets/{asset_id}~{field_type}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_name = $var;

        return $this;
    }

    /**
     * Required. Immutable. The asset which is linked to the customer.
     *
     * Generated from protobuf field <code>string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getAsset()
    {
        return $this->asset;
    }

    /**
     * Required. Immutable. The asset which is linked to the customer.
     *
     * Generated from protobuf field <code>string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setAsset($var)
    {
        GPBUtil::checkString($var, True);
        $this->asset = $var;

        return $this;
    }

    /**
     * Required. Immutable. Role that the asset takes for the customer link.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v9.enums.AssetFieldTypeEnum.AssetFieldType field_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int
     */
    public function getFieldType()
    {
        return $this->field_type;
    }

    /**
     * Required. Immutable. Role that the asset takes for the customer link.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v9.enums.AssetFieldTypeEnum.AssetFieldType field_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int $var
     * @return $this
     */
    public function setFieldType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V9\Enums\AssetFieldTypeEnum\AssetFieldType::class);
        $this->field_type = $var;

        return $this;
    }

    /**
     * Status of the customer asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v9.enums.AssetLinkStatusEnum.AssetLinkStatus status = 4;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Status of the customer asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v9.enums.AssetLinkStatusEnum.AssetLinkStatus status = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V9\Enums\AssetLinkStatusEnum\AssetLinkStatus::class);
        $this->status = $var;

        return $this;
    }

}

