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

namespace Google\Ads\DataManager\V1;

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

/**
 * Request to remove users from an audience in the provided destinations.
 * Returns a
 * [RemoveAudienceMembersResponse][google.ads.datamanager.v1.RemoveAudienceMembersResponse].
 *
 * Generated from protobuf message <code>google.ads.datamanager.v1.RemoveAudienceMembersRequest</code>
 */
class RemoveAudienceMembersRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The list of destinations to remove the users from.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.Destination destinations = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $destinations;
    /**
     * Required. The list of users to remove.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.AudienceMember audience_members = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $audience_members;
    /**
     * Optional. For testing purposes. If `true`, the request is validated but not
     * executed. Only errors are returned, not results.
     *
     * Generated from protobuf field <code>bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $validate_only = false;
    /**
     * Optional. Required for [UserData][google.ads.datamanager.v1.UserData]
     * uploads. The encoding type of the user identifiers. Applies to only the
     * outer encoding for encrypted user identifiers. For non `UserData` uploads,
     * this field is ignored.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.Encoding encoding = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $encoding = 0;
    /**
     * Optional. Encryption information for
     * [UserData][google.ads.datamanager.v1.UserData] uploads. If not set, it's
     * assumed that uploaded identifying information is hashed but not encrypted.
     * For non `UserData` uploads, this field is ignored.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.EncryptionInfo encryption_info = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $encryption_info = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Ads\DataManager\V1\Destination>|\Google\Protobuf\Internal\RepeatedField $destinations
     *           Required. The list of destinations to remove the users from.
     *     @type array<\Google\Ads\DataManager\V1\AudienceMember>|\Google\Protobuf\Internal\RepeatedField $audience_members
     *           Required. The list of users to remove.
     *     @type bool $validate_only
     *           Optional. For testing purposes. If `true`, the request is validated but not
     *           executed. Only errors are returned, not results.
     *     @type int $encoding
     *           Optional. Required for [UserData][google.ads.datamanager.v1.UserData]
     *           uploads. The encoding type of the user identifiers. Applies to only the
     *           outer encoding for encrypted user identifiers. For non `UserData` uploads,
     *           this field is ignored.
     *     @type \Google\Ads\DataManager\V1\EncryptionInfo $encryption_info
     *           Optional. Encryption information for
     *           [UserData][google.ads.datamanager.v1.UserData] uploads. If not set, it's
     *           assumed that uploaded identifying information is hashed but not encrypted.
     *           For non `UserData` uploads, this field is ignored.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Datamanager\V1\IngestionService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The list of destinations to remove the users from.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.Destination destinations = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDestinations()
    {
        return $this->destinations;
    }

    /**
     * Required. The list of destinations to remove the users from.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.Destination destinations = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Ads\DataManager\V1\Destination>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDestinations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\DataManager\V1\Destination::class);
        $this->destinations = $arr;

        return $this;
    }

    /**
     * Required. The list of users to remove.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.AudienceMember audience_members = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAudienceMembers()
    {
        return $this->audience_members;
    }

    /**
     * Required. The list of users to remove.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.AudienceMember audience_members = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Ads\DataManager\V1\AudienceMember>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAudienceMembers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\DataManager\V1\AudienceMember::class);
        $this->audience_members = $arr;

        return $this;
    }

    /**
     * Optional. For testing purposes. If `true`, the request is validated but not
     * executed. Only errors are returned, not results.
     *
     * Generated from protobuf field <code>bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getValidateOnly()
    {
        return $this->validate_only;
    }

    /**
     * Optional. For testing purposes. If `true`, the request is validated but not
     * executed. Only errors are returned, not results.
     *
     * Generated from protobuf field <code>bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setValidateOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->validate_only = $var;

        return $this;
    }

    /**
     * Optional. Required for [UserData][google.ads.datamanager.v1.UserData]
     * uploads. The encoding type of the user identifiers. Applies to only the
     * outer encoding for encrypted user identifiers. For non `UserData` uploads,
     * this field is ignored.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.Encoding encoding = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getEncoding()
    {
        return $this->encoding;
    }

    /**
     * Optional. Required for [UserData][google.ads.datamanager.v1.UserData]
     * uploads. The encoding type of the user identifiers. Applies to only the
     * outer encoding for encrypted user identifiers. For non `UserData` uploads,
     * this field is ignored.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.Encoding encoding = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setEncoding($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\DataManager\V1\Encoding::class);
        $this->encoding = $var;

        return $this;
    }

    /**
     * Optional. Encryption information for
     * [UserData][google.ads.datamanager.v1.UserData] uploads. If not set, it's
     * assumed that uploaded identifying information is hashed but not encrypted.
     * For non `UserData` uploads, this field is ignored.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.EncryptionInfo encryption_info = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Ads\DataManager\V1\EncryptionInfo|null
     */
    public function getEncryptionInfo()
    {
        return $this->encryption_info;
    }

    public function hasEncryptionInfo()
    {
        return isset($this->encryption_info);
    }

    public function clearEncryptionInfo()
    {
        unset($this->encryption_info);
    }

    /**
     * Optional. Encryption information for
     * [UserData][google.ads.datamanager.v1.UserData] uploads. If not set, it's
     * assumed that uploaded identifying information is hashed but not encrypted.
     * For non `UserData` uploads, this field is ignored.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.EncryptionInfo encryption_info = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Ads\DataManager\V1\EncryptionInfo $var
     * @return $this
     */
    public function setEncryptionInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\DataManager\V1\EncryptionInfo::class);
        $this->encryption_info = $var;

        return $this;
    }

}

