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

namespace Google\Cloud\SecurityCenter\V1\Kubernetes;

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

/**
 * Conveys information about a Kubernetes access review (e.g. kubectl auth
 * can-i ...) that was involved in a finding.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.Kubernetes.AccessReview</code>
 */
class AccessReview extends \Google\Protobuf\Internal\Message
{
    /**
     * Group is the API Group of the Resource. "*" means all.
     *
     * Generated from protobuf field <code>string group = 1;</code>
     */
    private $group = '';
    /**
     * Namespace of the action being requested. Currently, there is no
     * distinction between no namespace and all namespaces.  Both
     * are represented by "" (empty).
     *
     * Generated from protobuf field <code>string ns = 2;</code>
     */
    private $ns = '';
    /**
     * Name is the name of the resource being requested. Empty means all.
     *
     * Generated from protobuf field <code>string name = 3;</code>
     */
    private $name = '';
    /**
     * Resource is the optional resource type requested. "*" means all.
     *
     * Generated from protobuf field <code>string resource = 4;</code>
     */
    private $resource = '';
    /**
     * Subresource is the optional subresource type.
     *
     * Generated from protobuf field <code>string subresource = 5;</code>
     */
    private $subresource = '';
    /**
     * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
     * update, delete, proxy. "*" means all.
     *
     * Generated from protobuf field <code>string verb = 6;</code>
     */
    private $verb = '';
    /**
     * Version is the API Version of the Resource. "*" means all.
     *
     * Generated from protobuf field <code>string version = 7;</code>
     */
    private $version = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $group
     *           Group is the API Group of the Resource. "*" means all.
     *     @type string $ns
     *           Namespace of the action being requested. Currently, there is no
     *           distinction between no namespace and all namespaces.  Both
     *           are represented by "" (empty).
     *     @type string $name
     *           Name is the name of the resource being requested. Empty means all.
     *     @type string $resource
     *           Resource is the optional resource type requested. "*" means all.
     *     @type string $subresource
     *           Subresource is the optional subresource type.
     *     @type string $verb
     *           Verb is a Kubernetes resource API verb, like: get, list, watch, create,
     *           update, delete, proxy. "*" means all.
     *     @type string $version
     *           Version is the API Version of the Resource. "*" means all.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce();
        parent::__construct($data);
    }

    /**
     * Group is the API Group of the Resource. "*" means all.
     *
     * Generated from protobuf field <code>string group = 1;</code>
     * @return string
     */
    public function getGroup()
    {
        return $this->group;
    }

    /**
     * Group is the API Group of the Resource. "*" means all.
     *
     * Generated from protobuf field <code>string group = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setGroup($var)
    {
        GPBUtil::checkString($var, True);
        $this->group = $var;

        return $this;
    }

    /**
     * Namespace of the action being requested. Currently, there is no
     * distinction between no namespace and all namespaces.  Both
     * are represented by "" (empty).
     *
     * Generated from protobuf field <code>string ns = 2;</code>
     * @return string
     */
    public function getNs()
    {
        return $this->ns;
    }

    /**
     * Namespace of the action being requested. Currently, there is no
     * distinction between no namespace and all namespaces.  Both
     * are represented by "" (empty).
     *
     * Generated from protobuf field <code>string ns = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setNs($var)
    {
        GPBUtil::checkString($var, True);
        $this->ns = $var;

        return $this;
    }

    /**
     * Name is the name of the resource being requested. Empty means all.
     *
     * Generated from protobuf field <code>string name = 3;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Name is the name of the resource being requested. Empty means all.
     *
     * Generated from protobuf field <code>string name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Resource is the optional resource type requested. "*" means all.
     *
     * Generated from protobuf field <code>string resource = 4;</code>
     * @return string
     */
    public function getResource()
    {
        return $this->resource;
    }

    /**
     * Resource is the optional resource type requested. "*" means all.
     *
     * Generated from protobuf field <code>string resource = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setResource($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource = $var;

        return $this;
    }

    /**
     * Subresource is the optional subresource type.
     *
     * Generated from protobuf field <code>string subresource = 5;</code>
     * @return string
     */
    public function getSubresource()
    {
        return $this->subresource;
    }

    /**
     * Subresource is the optional subresource type.
     *
     * Generated from protobuf field <code>string subresource = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setSubresource($var)
    {
        GPBUtil::checkString($var, True);
        $this->subresource = $var;

        return $this;
    }

    /**
     * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
     * update, delete, proxy. "*" means all.
     *
     * Generated from protobuf field <code>string verb = 6;</code>
     * @return string
     */
    public function getVerb()
    {
        return $this->verb;
    }

    /**
     * Verb is a Kubernetes resource API verb, like: get, list, watch, create,
     * update, delete, proxy. "*" means all.
     *
     * Generated from protobuf field <code>string verb = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setVerb($var)
    {
        GPBUtil::checkString($var, True);
        $this->verb = $var;

        return $this;
    }

    /**
     * Version is the API Version of the Resource. "*" means all.
     *
     * Generated from protobuf field <code>string version = 7;</code>
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }

    /**
     * Version is the API Version of the Resource. "*" means all.
     *
     * Generated from protobuf field <code>string version = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->version = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AccessReview::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_AccessReview::class);

