> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# gpudb::HasRoleRequest

> gpudb::HasRoleRequest — Kinetica C++ API

<div className="kinetica-doxygen">
  <div className="contents">
    <p>A set of parameters for <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#a9de0d2bb24bdfa17ea915c8c29ab9f06">GPUdb::hasRole</a>. <a href="#details">More...</a></p>
    <p><code>#include \<<a className="el" href="/content/api/cpp/has__role_8h_source">gpudb/protocol/has\_role.h</a>></code></p>

    <table className="memberdecls">
      <tr className="heading">
        <td colSpan="2">
          <h2 className="groupheader"> Public Member Functions</h2>
        </td>
      </tr>

      <tr className="memitem:a9b9d31a0ba4db55659d34413fa6b115a" id="r_a9b9d31a0ba4db55659d34413fa6b115a">
        <td className="memItemLeft" align="right" valign="top"> </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a9b9d31a0ba4db55659d34413fa6b115a">HasRoleRequest</a> ()</td>
      </tr>

      <tr className="memdesc:a9b9d31a0ba4db55659d34413fa6b115a">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Constructs a <a className="el" href="/content/api/cpp/structgpudb_1_1HasRoleRequest" title="A set of parameters for GPUdb::hasRole.">HasRoleRequest</a> object with default parameters. <br /></td>
      </tr>

      <tr className="separator:a9b9d31a0ba4db55659d34413fa6b115a">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:aeffd6e3e057a63ee7ac61d74b27cd138" id="r_aeffd6e3e057a63ee7ac61d74b27cd138">
        <td className="memItemLeft" align="right" valign="top"> </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#aeffd6e3e057a63ee7ac61d74b27cd138">HasRoleRequest</a> (const std::string \&principal\_, const std::string \&role\_, const std::map\< std::string, std::string > \&options\_)</td>
      </tr>

      <tr className="memdesc:aeffd6e3e057a63ee7ac61d74b27cd138">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Constructs a <a className="el" href="/content/api/cpp/structgpudb_1_1HasRoleRequest" title="A set of parameters for GPUdb::hasRole.">HasRoleRequest</a> object with the specified parameters. <br /></td>
      </tr>

      <tr className="separator:aeffd6e3e057a63ee7ac61d74b27cd138">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>
    </table>

    <table className="memberdecls">
      <tr className="heading">
        <td colSpan="2">
          <h2 className="groupheader"> Public Attributes</h2>
        </td>
      </tr>

      <tr className="memitem:a2d3e3cf052ec4b4fb42938501bf2de0f" id="r_a2d3e3cf052ec4b4fb42938501bf2de0f">
        <td className="memItemLeft" align="right" valign="top">std::string </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a2d3e3cf052ec4b4fb42938501bf2de0f">principal</a></td>
      </tr>

      <tr className="memdesc:a2d3e3cf052ec4b4fb42938501bf2de0f">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Name of the user for which role membership is being checked. <br /></td>
      </tr>

      <tr className="separator:a2d3e3cf052ec4b4fb42938501bf2de0f">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:aeba5e51d592c1ad66b4010878a79733d" id="r_aeba5e51d592c1ad66b4010878a79733d">
        <td className="memItemLeft" align="right" valign="top">std::string </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#aeba5e51d592c1ad66b4010878a79733d">role</a></td>
      </tr>

      <tr className="memdesc:aeba5e51d592c1ad66b4010878a79733d">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Name of role to check for membership. <br /></td>
      </tr>

      <tr className="separator:aeba5e51d592c1ad66b4010878a79733d">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:afbf12ecca8218b964e40b08205889ec3" id="r_afbf12ecca8218b964e40b08205889ec3">
        <td className="memItemLeft" align="right" valign="top">std::map\< std::string, std::string > </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#afbf12ecca8218b964e40b08205889ec3">options</a></td>
      </tr>

      <tr className="memdesc:afbf12ecca8218b964e40b08205889ec3">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Optional parameters. <br /></td>
      </tr>

      <tr className="separator:afbf12ecca8218b964e40b08205889ec3">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>
    </table>

    <h2 className="groupheader">Detailed Description</h2>

    <div className="textblock">
      <p>A set of parameters for <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#a9de0d2bb24bdfa17ea915c8c29ab9f06">GPUdb::hasRole</a>. </p>
      <p>Checks if the specified user has the specified role. </p>
      <p className="definition">Definition at line <a className="el" href="/content/api/cpp/has__role_8h_source#l00017">17</a> of file <a className="el" href="/content/api/cpp/has__role_8h_source">has\_role.h</a>.</p>
    </div>

    <h2 className="groupheader">Constructor & Destructor Documentation</h2>
    <h2 className="memtitle"><span className="permalink"><a href="#a9b9d31a0ba4db55659d34413fa6b115a">◆ </a></span>HasRoleRequest() <span className="overload">\[1/2]</span></h2>

    <div className="memitem">
      <div className="memproto">
        <table className="mlabels">
          <tr>
            <td className="mlabels-left">
              <table className="memname">
                <tr>
                  <td className="memname">gpudb::HasRoleRequest::HasRoleRequest </td>
                  <td>(</td>

                  <td className="paramname">
                    <span className="paramname">
                      <span className="em" />
                    </span>
                  </td>

                  <td>)</td>

                  <td />
                </tr>
              </table>
            </td>

            <td className="mlabels-right"> <span className="mlabels"><span className="mlabel inline">inline</span></span> </td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Constructs a <a className="el" href="/content/api/cpp/structgpudb_1_1HasRoleRequest" title="A set of parameters for GPUdb::hasRole.">HasRoleRequest</a> object with default parameters. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/has__role_8h_source#l00022">22</a> of file <a className="el" href="/content/api/cpp/has__role_8h_source">has\_role.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#aeffd6e3e057a63ee7ac61d74b27cd138">◆ </a></span>HasRoleRequest() <span className="overload">\[2/2]</span></h2>

    <div className="memitem">
      <div className="memproto">
        <table className="mlabels">
          <tr>
            <td className="mlabels-left">
              <table className="memname">
                <tr>
                  <td className="memname">gpudb::HasRoleRequest::HasRoleRequest </td>
                  <td>(</td>
                  <td className="paramtype">const std::string &</td>
                  <td className="paramname"><span className="paramname"><span className="em">principal\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const std::string &</td>
                  <td className="paramname"><span className="paramname"><span className="em">role\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const std::map\< std::string, std::string > &</td>
                  <td className="paramname"><span className="paramname"><span className="em">options\_</span></span> )</td>
                </tr>
              </table>
            </td>

            <td className="mlabels-right"> <span className="mlabels"><span className="mlabel inline">inline</span></span> </td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Constructs a <a className="el" href="/content/api/cpp/structgpudb_1_1HasRoleRequest" title="A set of parameters for GPUdb::hasRole.">HasRoleRequest</a> object with the specified parameters. </p>

        <div className="dl params">
          <div className="dt">Parameters</div>

          <div className="dd">
            <table className="params">
              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">principal\_</td>
                <td>Name of the user for which role membership is being checked. Must be an existing user. If blank, will use the current user. The default value is ''. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">role\_</td>
                <td>Name of role to check for membership. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">options\_</td>

                <td>
                  Optional parameters.

                  <ul>
                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#aacf51814d2a53ab6e98ce65fa0acf955">has\_role\_no\_error\_if\_not\_exists</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">false</a> will return an error if the provided <span className="em arg">role\_</span> does not exist or is blank. If <a className="el" href="/content/api/cpp/namespacegpudb#a7a9e6d715315aec0f6eb6ceb3c6a5a55">true</a> then it will return <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">false</a> for <a className="el" href="/content/api/cpp/structgpudb_1_1HasRoleResponse#a9fb645db6c469a4a10e59b4e823461fa">hasRole</a>. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a7a9e6d715315aec0f6eb6ceb3c6a5a55">has\_role\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">has\_role\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">has\_role\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a448bac98035ddaa22a4f20f944a91287">has\_role\_only\_direct</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">false</a> will search recursively if the <span className="em arg">principal\_</span> is a member of <span className="em arg">role\_</span>. If <a className="el" href="/content/api/cpp/namespacegpudb#a7a9e6d715315aec0f6eb6ceb3c6a5a55">true</a> then <span className="em arg">principal\_</span> must directly be a member of <span className="em arg">role\_</span>. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a7a9e6d715315aec0f6eb6ceb3c6a5a55">has\_role\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">has\_role\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">has\_role\_false</a>.
                    </li>
                  </ul>

                  The default value is an empty map.
                </td>
              </tr>
            </table>
          </div>
        </div>

        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/has__role_8h_source#l00079">79</a> of file <a className="el" href="/content/api/cpp/has__role_8h_source">has\_role.h</a>.</p>
      </div>
    </div>

    <h2 className="groupheader">Member Data Documentation</h2>
    <h2 className="memtitle"><span className="permalink"><a href="#afbf12ecca8218b964e40b08205889ec3">◆ </a></span>options</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::map\<std::string, std::string> gpudb::HasRoleRequest::options</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Optional parameters. </p>

        <ul>
          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#aacf51814d2a53ab6e98ce65fa0acf955">has\_role\_no\_error\_if\_not\_exists</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">false</a> will return an error if the provided <a className="el" href="#aeba5e51d592c1ad66b4010878a79733d">role</a> does not exist or is blank. If <a className="el" href="/content/api/cpp/namespacegpudb#a7a9e6d715315aec0f6eb6ceb3c6a5a55">true</a> then it will return <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">false</a> for <a className="el" href="/content/api/cpp/structgpudb_1_1HasRoleResponse#a9fb645db6c469a4a10e59b4e823461fa">hasRole</a>. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a7a9e6d715315aec0f6eb6ceb3c6a5a55">has\_role\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">has\_role\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">has\_role\_false</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a448bac98035ddaa22a4f20f944a91287">has\_role\_only\_direct</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">false</a> will search recursively if the <a className="el" href="#a2d3e3cf052ec4b4fb42938501bf2de0f">principal</a> is a member of <a className="el" href="#aeba5e51d592c1ad66b4010878a79733d">role</a>. If <a className="el" href="/content/api/cpp/namespacegpudb#a7a9e6d715315aec0f6eb6ceb3c6a5a55">true</a> then <a className="el" href="#a2d3e3cf052ec4b4fb42938501bf2de0f">principal</a> must directly be a member of <a className="el" href="#aeba5e51d592c1ad66b4010878a79733d">role</a>. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a7a9e6d715315aec0f6eb6ceb3c6a5a55">has\_role\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">has\_role\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a75680d2b8b9603da05dcd22794162a06">has\_role\_false</a>.
          </li>
        </ul>

        <p>The default value is an empty map. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/has__role_8h_source#l00130">130</a> of file <a className="el" href="/content/api/cpp/has__role_8h_source">has\_role.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#a2d3e3cf052ec4b4fb42938501bf2de0f">◆ </a></span>principal</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::string gpudb::HasRoleRequest::principal</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Name of the user for which role membership is being checked. </p>
        <p>Must be an existing user. If blank, will use the current user. The default value is ''. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/has__role_8h_source#l00091">91</a> of file <a className="el" href="/content/api/cpp/has__role_8h_source">has\_role.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#aeba5e51d592c1ad66b4010878a79733d">◆ </a></span>role</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::string gpudb::HasRoleRequest::role</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Name of role to check for membership. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/has__role_8h_source#l00096">96</a> of file <a className="el" href="/content/api/cpp/has__role_8h_source">has\_role.h</a>.</p>
      </div>
    </div>

    <hr />

    The documentation for this struct was generated from the following file:

    <ul>
      <li>gpudb/protocol/<a className="el" href="/content/api/cpp/has__role_8h_source">has\_role.h</a></li>
    </ul>
  </div>
</div>
