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

namespace Google\Ads\GoogleAds\V24\Resources;

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

/**
 * A link between an ad group and an asset.
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.resources.AdGroupAsset</code>
 */
class AdGroupAsset extends \Google\Protobuf\Internal\Message
{
    /**
     * Immutable. The resource name of the ad group asset.
     * AdGroupAsset resource names have the form:
     * `customers/{customer_id}/adGroupAssets/{ad_group_id}~{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 ad group to which the asset is linked.
     *
     * Generated from protobuf field <code>string ad_group = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     */
    protected $ad_group = '';
    /**
     * Required. Immutable. The asset which is linked to the ad group.
     *
     * Generated from protobuf field <code>string asset = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     */
    protected $asset = '';
    /**
     * Required. Immutable. Role that the asset takes under the linked ad group.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AssetFieldTypeEnum.AssetFieldType field_type = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $field_type = 0;
    /**
     * Output only. Source of the adgroup asset link.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AssetSourceEnum.AssetSource source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $source = 0;
    /**
     * Status of the ad group asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AssetLinkStatusEnum.AssetLinkStatus status = 5;</code>
     */
    protected $status = 0;
    /**
     * Output only. Provides the PrimaryStatus of this asset link.
     * Primary status is meant essentially to differentiate between the plain
     * "status" field, which has advertiser set values of enabled, paused, or
     * removed.  The primary status takes into account other signals (for assets
     * its mainly policy and quality approvals) to come up with a more
     * comprehensive status to indicate its serving state.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AssetLinkPrimaryStatusEnum.AssetLinkPrimaryStatus primary_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $primary_status = 0;
    /**
     * Output only. Provides the details of the primary status and its associated
     * reasons.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AssetLinkPrimaryStatusDetails primary_status_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $primary_status_details;
    /**
     * Output only. Provides a list of reasons for why an asset is not serving or
     * not serving at full capacity.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.enums.AssetLinkPrimaryStatusReasonEnum.AssetLinkPrimaryStatusReason primary_status_reasons = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $primary_status_reasons;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $resource_name
     *           Immutable. The resource name of the ad group asset.
     *           AdGroupAsset resource names have the form:
     *           `customers/{customer_id}/adGroupAssets/{ad_group_id}~{asset_id}~{field_type}`
     * @type string $ad_group
     *           Required. Immutable. The ad group to which the asset is linked.
     * @type string $asset
     *           Required. Immutable. The asset which is linked to the ad group.
     * @type int $field_type
     *           Required. Immutable. Role that the asset takes under the linked ad group.
     * @type int $source
     *           Output only. Source of the adgroup asset link.
     * @type int $status
     *           Status of the ad group asset.
     * @type int $primary_status
     *           Output only. Provides the PrimaryStatus of this asset link.
     *           Primary status is meant essentially to differentiate between the plain
     *           "status" field, which has advertiser set values of enabled, paused, or
     *           removed.  The primary status takes into account other signals (for assets
     *           its mainly policy and quality approvals) to come up with a more
     *           comprehensive status to indicate its serving state.
     * @type \Google\Ads\GoogleAds\V24\Common\AssetLinkPrimaryStatusDetails[] $primary_status_details
     *           Output only. Provides the details of the primary status and its associated
     *           reasons.
     * @type int[] $primary_status_reasons
     *           Output only. Provides a list of reasons for why an asset is not serving or
     *           not serving at full capacity.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Resources\AdGroupAsset::initOnce();
        parent::__construct($data);
    }

    /**
     * Immutable. The resource name of the ad group asset.
     * AdGroupAsset resource names have the form:
     * `customers/{customer_id}/adGroupAssets/{ad_group_id}~{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 ad group asset.
     * AdGroupAsset resource names have the form:
     * `customers/{customer_id}/adGroupAssets/{ad_group_id}~{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 ad group to which the asset is linked.
     *
     * Generated from protobuf field <code>string ad_group = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     *
     * @return string
     */
    public function getAdGroup()
    {
        return $this->ad_group;
    }

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

        return $this;
    }

    /**
     * Required. Immutable. The asset which is linked to the ad group.
     *
     * Generated from protobuf field <code>string asset = 3 [(.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 ad group.
     *
     * Generated from protobuf field <code>string asset = 3 [(.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 under the linked ad group.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AssetFieldTypeEnum.AssetFieldType field_type = 4 [(.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 under the linked ad group.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AssetFieldTypeEnum.AssetFieldType field_type = 4 [(.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\V24\Enums\AssetFieldTypeEnum\AssetFieldType::class);
        $this->field_type = $var;

        return $this;
    }

    /**
     * Output only. Source of the adgroup asset link.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AssetSourceEnum.AssetSource source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return int
     */
    public function getSource()
    {
        return $this->source;
    }

    /**
     * Output only. Source of the adgroup asset link.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AssetSourceEnum.AssetSource source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setSource($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V24\Enums\AssetSourceEnum\AssetSource::class);
        $this->source = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Output only. Provides the PrimaryStatus of this asset link.
     * Primary status is meant essentially to differentiate between the plain
     * "status" field, which has advertiser set values of enabled, paused, or
     * removed.  The primary status takes into account other signals (for assets
     * its mainly policy and quality approvals) to come up with a more
     * comprehensive status to indicate its serving state.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AssetLinkPrimaryStatusEnum.AssetLinkPrimaryStatus primary_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return int
     */
    public function getPrimaryStatus()
    {
        return $this->primary_status;
    }

    /**
     * Output only. Provides the PrimaryStatus of this asset link.
     * Primary status is meant essentially to differentiate between the plain
     * "status" field, which has advertiser set values of enabled, paused, or
     * removed.  The primary status takes into account other signals (for assets
     * its mainly policy and quality approvals) to come up with a more
     * comprehensive status to indicate its serving state.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AssetLinkPrimaryStatusEnum.AssetLinkPrimaryStatus primary_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setPrimaryStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V24\Enums\AssetLinkPrimaryStatusEnum\AssetLinkPrimaryStatus::class);
        $this->primary_status = $var;

        return $this;
    }

    /**
     * Output only. Provides the details of the primary status and its associated
     * reasons.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AssetLinkPrimaryStatusDetails primary_status_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Common\AssetLinkPrimaryStatusDetails>
     */
    public function getPrimaryStatusDetails()
    {
        return $this->primary_status_details;
    }

    /**
     * Output only. Provides the details of the primary status and its associated
     * reasons.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.common.AssetLinkPrimaryStatusDetails primary_status_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\AssetLinkPrimaryStatusDetails[] $var
     * @return $this
     */
    public function setPrimaryStatusDetails($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V24\Common\AssetLinkPrimaryStatusDetails::class);
        $this->primary_status_details = $arr;

        return $this;
    }

    /**
     * Output only. Provides a list of reasons for why an asset is not serving or
     * not serving at full capacity.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.enums.AssetLinkPrimaryStatusReasonEnum.AssetLinkPrimaryStatusReason primary_status_reasons = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return RepeatedField<int>
     */
    public function getPrimaryStatusReasons()
    {
        return $this->primary_status_reasons;
    }

    /**
     * Output only. Provides a list of reasons for why an asset is not serving or
     * not serving at full capacity.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.enums.AssetLinkPrimaryStatusReasonEnum.AssetLinkPrimaryStatusReason primary_status_reasons = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param  int[] $var
     * @return $this
     */
    public function setPrimaryStatusReasons($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\GoogleAds\V24\Enums\AssetLinkPrimaryStatusReasonEnum\AssetLinkPrimaryStatusReason::class);
        $this->primary_status_reasons = $arr;

        return $this;
    }

}

