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

namespace Google\Ads\DataManager\V1;

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

/**
 * [Digital Markets Act
 * (DMA)](//digital-markets-act.ec.europa.eu/index_en) consent settings
 * for the user.
 *
 * Generated from protobuf message <code>google.ads.datamanager.v1.Consent</code>
 */
class Consent extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Represents if the user consents to ad user data.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.ConsentStatus ad_user_data = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $ad_user_data = 0;
    /**
     * Optional. Represents if the user consents to ad personalization.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.ConsentStatus ad_personalization = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $ad_personalization = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $ad_user_data
     *           Optional. Represents if the user consents to ad user data.
     *     @type int $ad_personalization
     *           Optional. Represents if the user consents to ad personalization.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Datamanager\V1\Consent::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Represents if the user consents to ad user data.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.ConsentStatus ad_user_data = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getAdUserData()
    {
        return $this->ad_user_data;
    }

    /**
     * Optional. Represents if the user consents to ad user data.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.ConsentStatus ad_user_data = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setAdUserData($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\DataManager\V1\ConsentStatus::class);
        $this->ad_user_data = $var;

        return $this;
    }

    /**
     * Optional. Represents if the user consents to ad personalization.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.ConsentStatus ad_personalization = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getAdPersonalization()
    {
        return $this->ad_personalization;
    }

    /**
     * Optional. Represents if the user consents to ad personalization.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.ConsentStatus ad_personalization = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setAdPersonalization($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\DataManager\V1\ConsentStatus::class);
        $this->ad_personalization = $var;

        return $this;
    }

}

