<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v21/services/reach_plan_service.proto

namespace Google\Ads\GoogleAds\V21\Services;

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

/**
 * A plannable user interest that can be targeted in a reach forecast using
 * [ReachPlanService.GenerateReachForecast][google.ads.googleads.v21.services.ReachPlanService.GenerateReachForecast].
 *
 * Generated from protobuf message <code>google.ads.googleads.v21.services.PlannableUserInterest</code>
 */
class PlannableUserInterest extends \Google\Protobuf\Internal\Message
{
    /**
     * The user interest id.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v21.common.UserInterestInfo user_interest = 1;</code>
     */
    protected $user_interest = null;
    /**
     * The user interest type.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v21.enums.UserInterestTaxonomyTypeEnum.UserInterestTaxonomyType user_interest_type = 2;</code>
     */
    protected $user_interest_type = 0;
    /**
     * The user interest display name.
     * For example, "Autos & Vehicles"
     *
     * Generated from protobuf field <code>string user_interest_display_name = 3;</code>
     */
    protected $user_interest_display_name = '';
    /**
     * The user interest path.
     * For example, "/Autos & Vehicles/Motor Vehicles/Motor Vehicles by
     * Type/Off-Road Vehicles"
     *
     * Generated from protobuf field <code>string user_interest_path = 4;</code>
     */
    protected $user_interest_path = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V21\Common\UserInterestInfo $user_interest
     *           The user interest id.
     *     @type int $user_interest_type
     *           The user interest type.
     *     @type string $user_interest_display_name
     *           The user interest display name.
     *           For example, "Autos & Vehicles"
     *     @type string $user_interest_path
     *           The user interest path.
     *           For example, "/Autos & Vehicles/Motor Vehicles/Motor Vehicles by
     *           Type/Off-Road Vehicles"
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V21\Services\ReachPlanService::initOnce();
        parent::__construct($data);
    }

    /**
     * The user interest id.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v21.common.UserInterestInfo user_interest = 1;</code>
     * @return \Google\Ads\GoogleAds\V21\Common\UserInterestInfo|null
     */
    public function getUserInterest()
    {
        return $this->user_interest;
    }

    public function hasUserInterest()
    {
        return isset($this->user_interest);
    }

    public function clearUserInterest()
    {
        unset($this->user_interest);
    }

    /**
     * The user interest id.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v21.common.UserInterestInfo user_interest = 1;</code>
     * @param \Google\Ads\GoogleAds\V21\Common\UserInterestInfo $var
     * @return $this
     */
    public function setUserInterest($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V21\Common\UserInterestInfo::class);
        $this->user_interest = $var;

        return $this;
    }

    /**
     * The user interest type.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v21.enums.UserInterestTaxonomyTypeEnum.UserInterestTaxonomyType user_interest_type = 2;</code>
     * @return int
     */
    public function getUserInterestType()
    {
        return $this->user_interest_type;
    }

    /**
     * The user interest type.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v21.enums.UserInterestTaxonomyTypeEnum.UserInterestTaxonomyType user_interest_type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setUserInterestType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V21\Enums\UserInterestTaxonomyTypeEnum\UserInterestTaxonomyType::class);
        $this->user_interest_type = $var;

        return $this;
    }

    /**
     * The user interest display name.
     * For example, "Autos & Vehicles"
     *
     * Generated from protobuf field <code>string user_interest_display_name = 3;</code>
     * @return string
     */
    public function getUserInterestDisplayName()
    {
        return $this->user_interest_display_name;
    }

    /**
     * The user interest display name.
     * For example, "Autos & Vehicles"
     *
     * Generated from protobuf field <code>string user_interest_display_name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setUserInterestDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->user_interest_display_name = $var;

        return $this;
    }

    /**
     * The user interest path.
     * For example, "/Autos & Vehicles/Motor Vehicles/Motor Vehicles by
     * Type/Off-Road Vehicles"
     *
     * Generated from protobuf field <code>string user_interest_path = 4;</code>
     * @return string
     */
    public function getUserInterestPath()
    {
        return $this->user_interest_path;
    }

    /**
     * The user interest path.
     * For example, "/Autos & Vehicles/Motor Vehicles/Motor Vehicles by
     * Type/Off-Road Vehicles"
     *
     * Generated from protobuf field <code>string user_interest_path = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setUserInterestPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->user_interest_path = $var;

        return $this;
    }

}

