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

namespace Google\Cloud\BinaryAuthorization\V1;

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

/**
 * An [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] exempts images
 * from checks by [admission rules][google.cloud.binaryauthorization.v1.AdmissionRule].
 *
 * Generated from protobuf message <code>google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern</code>
 */
class AdmissionWhitelistPattern extends \Google\Protobuf\Internal\Message
{
    /**
     * An image name pattern to allowlist, in the form `registry/path/to/image`.
     * This supports a trailing `*` wildcard, but this is allowed only in
     * text after the `registry/` part. This also supports a trailing `**`
     * wildcard which matches subdirectories of a given entry.
     *
     * Generated from protobuf field <code>string name_pattern = 1;</code>
     */
    private $name_pattern = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name_pattern
     *           An image name pattern to allowlist, in the form `registry/path/to/image`.
     *           This supports a trailing `*` wildcard, but this is allowed only in
     *           text after the `registry/` part. This also supports a trailing `**`
     *           wildcard which matches subdirectories of a given entry.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Binaryauthorization\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * An image name pattern to allowlist, in the form `registry/path/to/image`.
     * This supports a trailing `*` wildcard, but this is allowed only in
     * text after the `registry/` part. This also supports a trailing `**`
     * wildcard which matches subdirectories of a given entry.
     *
     * Generated from protobuf field <code>string name_pattern = 1;</code>
     * @return string
     */
    public function getNamePattern()
    {
        return $this->name_pattern;
    }

    /**
     * An image name pattern to allowlist, in the form `registry/path/to/image`.
     * This supports a trailing `*` wildcard, but this is allowed only in
     * text after the `registry/` part. This also supports a trailing `**`
     * wildcard which matches subdirectories of a given entry.
     *
     * Generated from protobuf field <code>string name_pattern = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setNamePattern($var)
    {
        GPBUtil::checkString($var, True);
        $this->name_pattern = $var;

        return $this;
    }

}

