<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/admanager/v1/targeting.proto

namespace Google\Ads\AdManager\V1;

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

/**
 * Mobile Application Targeting
 *
 * Generated from protobuf message <code>google.ads.admanager.v1.MobileApplicationTargeting</code>
 */
class MobileApplicationTargeting extends \Google\Protobuf\Internal\Message
{
    protected $targeting;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\AdManager\V1\FirstPartyMobileApplicationTargeting $first_party_targeting
     *           Optional. The targeted/excluded first-party mobile applications.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The targeted/excluded first-party mobile applications.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.FirstPartyMobileApplicationTargeting first_party_targeting = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Ads\AdManager\V1\FirstPartyMobileApplicationTargeting|null
     */
    public function getFirstPartyTargeting()
    {
        return $this->readOneof(1);
    }

    public function hasFirstPartyTargeting()
    {
        return $this->hasOneof(1);
    }

    /**
     * Optional. The targeted/excluded first-party mobile applications.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.FirstPartyMobileApplicationTargeting first_party_targeting = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Ads\AdManager\V1\FirstPartyMobileApplicationTargeting $var
     * @return $this
     */
    public function setFirstPartyTargeting($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\FirstPartyMobileApplicationTargeting::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

