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

namespace Google\Cloud\SecurityCenter\V2\Kubernetes;

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

/**
 * Conveys information about a Kubernetes access review (such as one returned
 * by a [`kubectl auth
 * can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access)
 * command) that was involved in a finding.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v2.Kubernetes.AccessReview</code>
 */
class AccessReview extends \Google\Protobuf\Internal\Message
{
    /**
     * The API group of the resource. "*" means all.
     *
     * Generated from protobuf field <code>string group = 1;</code>
     */
    protected $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>
     */
    protected $ns = '';
    /**
     * The name of the resource being requested. Empty means all.
     *
     * Generated from protobuf field <code>string name = 3;</code>
     */
    protected $name = '';
    /**
     * The optional resource type requested. "*" means all.
     *
     * Generated from protobuf field <code>string resource = 4;</code>
     */
    protected $resource = '';
    /**
     * The optional subresource type.
     *
     * Generated from protobuf field <code>string subresource = 5;</code>
     */
    protected $subresource = '';
    /**
     * A Kubernetes resource API verb, like get, list, watch, create, update,
     * delete, proxy. "*" means all.
     *
     * Generated from protobuf field <code>string verb = 6;</code>
     */
    protected $verb = '';
    /**
     * The API version of the resource. "*" means all.
     *
     * Generated from protobuf field <code>string version = 7;</code>
     */
    protected $version = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $group
     *           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
     *           The name of the resource being requested. Empty means all.
     *     @type string $resource
     *           The optional resource type requested. "*" means all.
     *     @type string $subresource
     *           The optional subresource type.
     *     @type string $verb
     *           A Kubernetes resource API verb, like get, list, watch, create, update,
     *           delete, proxy. "*" means all.
     *     @type string $version
     *           The API version of the resource. "*" means all.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V2\Kubernetes::initOnce();
        parent::__construct($data);
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

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

    /**
     * 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;
    }

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

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

}


