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

namespace Google\Cloud\BinaryAuthorization\V1beta1;

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

/**
 * An [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] exempts images
 * from checks by [admission rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule].
 *
 * Generated from protobuf message <code>google.cloud.binaryauthorization.v1beta1.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 `*` as a wildcard, but this is allowed only in
     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
     * `gcr.io/nginx*` matches `gcr.io/nginx&#64;latest`, but it does not match
     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
     * matches subdirectories, i.e., `gcr.io/nginx**` matches
     * `gcr.io/nginx/image`.
     *
     * 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 `*` as a wildcard, but this is allowed only in
     *           text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
     *           `gcr.io/nginx*` matches `gcr.io/nginx&#64;latest`, but it does not match
     *           `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
     *           matches subdirectories, i.e., `gcr.io/nginx**` matches
     *           `gcr.io/nginx/image`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Binaryauthorization\V1Beta1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * An image name pattern to allowlist, in the form `registry/path/to/image`.
     * This supports a trailing `*` as a wildcard, but this is allowed only in
     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
     * `gcr.io/nginx*` matches `gcr.io/nginx&#64;latest`, but it does not match
     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
     * matches subdirectories, i.e., `gcr.io/nginx**` matches
     * `gcr.io/nginx/image`.
     *
     * 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 `*` as a wildcard, but this is allowed only in
     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
     * `gcr.io/nginx*` matches `gcr.io/nginx&#64;latest`, but it does not match
     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
     * matches subdirectories, i.e., `gcr.io/nginx**` matches
     * `gcr.io/nginx/image`.
     *
     * 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;
    }

}

