<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/managedkafka/v1/managed_kafka.proto

namespace Google\Cloud\ManagedKafka\V1;

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

/**
 * Request for RemoveAclEntry.
 *
 * Generated from protobuf message <code>google.cloud.managedkafka.v1.RemoveAclEntryRequest</code>
 */
class RemoveAclEntryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of the acl to remove the acl entry from.
     * Structured like:
     * `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`.
     * The structure of `acl_id` defines the Resource Pattern (resource_type,
     * resource_name, pattern_type) of the acl. See `Acl.name` for
     * details.
     *
     * Generated from protobuf field <code>string acl = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $acl = '';
    /**
     * Required. The acl entry to remove.
     *
     * Generated from protobuf field <code>.google.cloud.managedkafka.v1.AclEntry acl_entry = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $acl_entry = null;

    /**
     * @param string                                 $acl      Required. The name of the acl to remove the acl entry from.
     *                                                         Structured like:
     *                                                         `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`.
     *
     *                                                         The structure of `acl_id` defines the Resource Pattern (resource_type,
     *                                                         resource_name, pattern_type) of the acl. See `Acl.name` for
     *                                                         details. Please see
     *                                                         {@see ManagedKafkaClient::aclName()} for help formatting this field.
     * @param \Google\Cloud\ManagedKafka\V1\AclEntry $aclEntry Required. The acl entry to remove.
     *
     * @return \Google\Cloud\ManagedKafka\V1\RemoveAclEntryRequest
     *
     * @experimental
     */
    public static function build(string $acl, \Google\Cloud\ManagedKafka\V1\AclEntry $aclEntry): self
    {
        return (new self())
            ->setAcl($acl)
            ->setAclEntry($aclEntry);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $acl
     *           Required. The name of the acl to remove the acl entry from.
     *           Structured like:
     *           `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`.
     *           The structure of `acl_id` defines the Resource Pattern (resource_type,
     *           resource_name, pattern_type) of the acl. See `Acl.name` for
     *           details.
     *     @type \Google\Cloud\ManagedKafka\V1\AclEntry $acl_entry
     *           Required. The acl entry to remove.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of the acl to remove the acl entry from.
     * Structured like:
     * `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`.
     * The structure of `acl_id` defines the Resource Pattern (resource_type,
     * resource_name, pattern_type) of the acl. See `Acl.name` for
     * details.
     *
     * Generated from protobuf field <code>string acl = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getAcl()
    {
        return $this->acl;
    }

    /**
     * Required. The name of the acl to remove the acl entry from.
     * Structured like:
     * `projects/{project}/locations/{location}/clusters/{cluster}/acls/{acl_id}`.
     * The structure of `acl_id` defines the Resource Pattern (resource_type,
     * resource_name, pattern_type) of the acl. See `Acl.name` for
     * details.
     *
     * Generated from protobuf field <code>string acl = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setAcl($var)
    {
        GPBUtil::checkString($var, True);
        $this->acl = $var;

        return $this;
    }

    /**
     * Required. The acl entry to remove.
     *
     * Generated from protobuf field <code>.google.cloud.managedkafka.v1.AclEntry acl_entry = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\ManagedKafka\V1\AclEntry|null
     */
    public function getAclEntry()
    {
        return $this->acl_entry;
    }

    public function hasAclEntry()
    {
        return isset($this->acl_entry);
    }

    public function clearAclEntry()
    {
        unset($this->acl_entry);
    }

    /**
     * Required. The acl entry to remove.
     *
     * Generated from protobuf field <code>.google.cloud.managedkafka.v1.AclEntry acl_entry = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\ManagedKafka\V1\AclEntry $var
     * @return $this
     */
    public function setAclEntry($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\AclEntry::class);
        $this->acl_entry = $var;

        return $this;
    }

}

