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

namespace Google\Ads\GoogleAds\V23\Resources;

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

/**
 * An action item to improve the ad strength of an asset group.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.resources.AdStrengthActionItem</code>
 */
class AdStrengthActionItem extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The action item type.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.AdStrengthActionItemTypeEnum.AdStrengthActionItemType action_item_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $action_item_type = 0;
    protected $action_details;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type int $action_item_type
     *           Output only. The action item type.
     * @type \Google\Ads\GoogleAds\V23\Resources\AdStrengthActionItem\AddAssetDetails $add_asset_details
     *           Output only. The action item details for action item type ADD_ASSET.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Resources\AssetGroup::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The action item type.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.AdStrengthActionItemTypeEnum.AdStrengthActionItemType action_item_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return int
     */
    public function getActionItemType()
    {
        return $this->action_item_type;
    }

    /**
     * Output only. The action item type.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.AdStrengthActionItemTypeEnum.AdStrengthActionItemType action_item_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setActionItemType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\AdStrengthActionItemTypeEnum\AdStrengthActionItemType::class);
        $this->action_item_type = $var;

        return $this;
    }

    /**
     * Output only. The action item details for action item type ADD_ASSET.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.resources.AdStrengthActionItem.AddAssetDetails add_asset_details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Resources\AdStrengthActionItem\AddAssetDetails|null
     */
    public function getAddAssetDetails()
    {
        return $this->readOneof(2);
    }

    public function hasAddAssetDetails()
    {
        return $this->hasOneof(2);
    }

    /**
     * Output only. The action item details for action item type ADD_ASSET.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.resources.AdStrengthActionItem.AddAssetDetails add_asset_details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Resources\AdStrengthActionItem\AddAssetDetails $var
     * @return $this
     */
    public function setAddAssetDetails($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Resources\AdStrengthActionItem\AddAssetDetails::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

