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

namespace Google\Cloud\GkeHub\V1\RBACRoleBinding;

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

/**
 * Role is the type for Kubernetes roles
 *
 * Generated from protobuf message <code>google.cloud.gkehub.v1.RBACRoleBinding.Role</code>
 */
class Role extends \Google\Protobuf\Internal\Message
{
    /**
     * predefined_role is the Kubernetes default role to use
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles predefined_role = 1;</code>
     */
    protected $predefined_role = 0;
    /**
     * Optional. custom_role is the name of a custom KubernetesClusterRole to
     * use.
     *
     * Generated from protobuf field <code>string custom_role = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $custom_role = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $predefined_role
     *           predefined_role is the Kubernetes default role to use
     *     @type string $custom_role
     *           Optional. custom_role is the name of a custom KubernetesClusterRole to
     *           use.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce();
        parent::__construct($data);
    }

    /**
     * predefined_role is the Kubernetes default role to use
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles predefined_role = 1;</code>
     * @return int
     */
    public function getPredefinedRole()
    {
        return $this->predefined_role;
    }

    /**
     * predefined_role is the Kubernetes default role to use
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles predefined_role = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setPredefinedRole($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\RBACRoleBinding\Role\PredefinedRoles::class);
        $this->predefined_role = $var;

        return $this;
    }

    /**
     * Optional. custom_role is the name of a custom KubernetesClusterRole to
     * use.
     *
     * Generated from protobuf field <code>string custom_role = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getCustomRole()
    {
        return $this->custom_role;
    }

    /**
     * Optional. custom_role is the name of a custom KubernetesClusterRole to
     * use.
     *
     * Generated from protobuf field <code>string custom_role = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setCustomRole($var)
    {
        GPBUtil::checkString($var, True);
        $this->custom_role = $var;

        return $this;
    }

}


