# coding: utf-8

"""
    Lookup/Ibis web service API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: 1.2
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import re  # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictInt, StrictStr

from typing import Optional

from identitylib.lookup_client.models.group_all_groups200_response import GroupAllGroups200Response
from identitylib.lookup_client.models.group_get_cancelled_members200_response import GroupGetCancelledMembers200Response
from identitylib.lookup_client.models.group_search_count200_response import GroupSearchCount200Response
from identitylib.lookup_client.models.institution_all_attribute_schemes200_response import InstitutionAllAttributeSchemes200Response
from identitylib.lookup_client.models.institution_all_insts200_response import InstitutionAllInsts200Response
from identitylib.lookup_client.models.institution_get_attribute200_response import InstitutionGetAttribute200Response
from identitylib.lookup_client.models.institution_get_attributes200_response import InstitutionGetAttributes200Response
from identitylib.lookup_client.models.person_get_person200_response import PersonGetPerson200Response
from identitylib.lookup_client.models.person_is_member_of_group200_response import PersonIsMemberOfGroup200Response

from identitylib.lookup_client.api_client import ApiClient
from identitylib.lookup_client.api_response import ApiResponse
from identitylib.lookup_client.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


class PersonApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client

    @validate_arguments
    def person_all_attribute_schemes(self, **kwargs) -> InstitutionAllAttributeSchemes200Response:  # noqa: E501
        """Return a list of all the person attribute schemes available.  # noqa: E501

        Return a list of all the person attribute schemes available. The `schemeid` values of these schemes may be used in the `fetch` parameter of other methods that return people.  NOTE: Some of these attribute schemes are not currently used (no people have attribute values in the scheme). These schemes are reserved for possible future use.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_all_attribute_schemes(async_req=True)
        >>> result = thread.get()

        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: InstitutionAllAttributeSchemes200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_all_attribute_schemes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_all_attribute_schemes_with_http_info(**kwargs)  # noqa: E501

    @validate_arguments
    def person_all_attribute_schemes_with_http_info(self, **kwargs) -> ApiResponse:  # noqa: E501
        """Return a list of all the person attribute schemes available.  # noqa: E501

        Return a list of all the person attribute schemes available. The `schemeid` values of these schemes may be used in the `fetch` parameter of other methods that return people.  NOTE: Some of these attribute schemes are not currently used (no people have attribute values in the scheme). These schemes are reserved for possible future use.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_all_attribute_schemes_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(InstitutionAllAttributeSchemes200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_all_attribute_schemes" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "InstitutionAllAttributeSchemes200Response",
        }

        return self.api_client.call_api(
            '/person/all-attr-schemes', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_all_people(self, include_cancelled : Annotated[Optional[StrictBool], Field(description="Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.")] = None, identifier : Annotated[Optional[StrictStr], Field(description="The identifier (CRSid) of the person to start after, or `null` to start from the first person.")] = None, limit : Annotated[Optional[StrictInt], Field(description="The maximum number of people to return. Defaults to 100.")] = None, fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> GroupGetCancelledMembers200Response:  # noqa: E501
        """Return a list of all people (in batches).  # noqa: E501

        Return a list of all people (in batches).  The results are sorted by identifier, starting with the first person after the person with the specified identifier. Thus, to iterate over all people, pass a `null` identifier to get the first batch of people, then pass the last identifier from the previous batch to get the next batch, and repeat until no more people are returned.  By default, only a few basic details about each person are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_all_people(include_cancelled, identifier, limit, fetch, async_req=True)
        >>> result = thread.get()

        :param include_cancelled: Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.
        :type include_cancelled: bool
        :param identifier: The identifier (CRSid) of the person to start after, or `null` to start from the first person.
        :type identifier: str
        :param limit: The maximum number of people to return. Defaults to 100.
        :type limit: int
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: GroupGetCancelledMembers200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_all_people_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_all_people_with_http_info(include_cancelled, identifier, limit, fetch, **kwargs)  # noqa: E501

    @validate_arguments
    def person_all_people_with_http_info(self, include_cancelled : Annotated[Optional[StrictBool], Field(description="Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.")] = None, identifier : Annotated[Optional[StrictStr], Field(description="The identifier (CRSid) of the person to start after, or `null` to start from the first person.")] = None, limit : Annotated[Optional[StrictInt], Field(description="The maximum number of people to return. Defaults to 100.")] = None, fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Return a list of all people (in batches).  # noqa: E501

        Return a list of all people (in batches).  The results are sorted by identifier, starting with the first person after the person with the specified identifier. Thus, to iterate over all people, pass a `null` identifier to get the first batch of people, then pass the last identifier from the previous batch to get the next batch, and repeat until no more people are returned.  By default, only a few basic details about each person are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_all_people_with_http_info(include_cancelled, identifier, limit, fetch, async_req=True)
        >>> result = thread.get()

        :param include_cancelled: Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.
        :type include_cancelled: bool
        :param identifier: The identifier (CRSid) of the person to start after, or `null` to start from the first person.
        :type identifier: str
        :param limit: The maximum number of people to return. Defaults to 100.
        :type limit: int
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(GroupGetCancelledMembers200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'include_cancelled',
            'identifier',
            'limit',
            'fetch'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_all_people" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        if _params.get('include_cancelled') is not None:  # noqa: E501
            _query_params.append(('includeCancelled', _params['include_cancelled']))

        if _params.get('identifier') is not None:  # noqa: E501
            _query_params.append(('identifier', _params['identifier']))

        if _params.get('limit') is not None:  # noqa: E501
            _query_params.append(('limit', _params['limit']))

        if _params.get('fetch') is not None:  # noqa: E501
            _query_params.append(('fetch', _params['fetch']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "GroupGetCancelledMembers200Response",
        }

        return self.api_client.call_api(
            '/person/all-people', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_get_attribute(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], attrid : Annotated[StrictInt, Field(..., description="The ID of the attribute to fetch.")], **kwargs) -> InstitutionGetAttribute200Response:  # noqa: E501
        """Get a specific attribute of a person.  # noqa: E501

        Get a specific attribute of a person.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_attribute(scheme, identifier, attrid, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param attrid: The ID of the attribute to fetch. (required)
        :type attrid: int
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: InstitutionGetAttribute200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_get_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_get_attribute_with_http_info(scheme, identifier, attrid, **kwargs)  # noqa: E501

    @validate_arguments
    def person_get_attribute_with_http_info(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], attrid : Annotated[StrictInt, Field(..., description="The ID of the attribute to fetch.")], **kwargs) -> ApiResponse:  # noqa: E501
        """Get a specific attribute of a person.  # noqa: E501

        Get a specific attribute of a person.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_attribute_with_http_info(scheme, identifier, attrid, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param attrid: The ID of the attribute to fetch. (required)
        :type attrid: int
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(InstitutionGetAttribute200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'scheme',
            'identifier',
            'attrid'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_get_attribute" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['scheme']:
            _path_params['scheme'] = _params['scheme']

        if _params['identifier']:
            _path_params['identifier'] = _params['identifier']

        if _params['attrid']:
            _path_params['attrid'] = _params['attrid']


        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "InstitutionGetAttribute200Response",
        }

        return self.api_client.call_api(
            '/person/{scheme}/{identifier}/{attrid}', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_get_attributes(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], attrs : Annotated[StrictStr, Field(..., description="The attribute scheme(s) to fetch. This may include any number of the attributes or pseudo-attributes, but it may not include references or attribute chains (see the documentation for the `fetch` parameter in this class).")], **kwargs) -> InstitutionGetAttributes200Response:  # noqa: E501
        """Get one or more (possibly multi-valued) attributes of a person.  # noqa: E501

        Get one or more (possibly multi-valued) attributes of a person. The returned attributes are sorted by attribute scheme precedence and then attribute precedence.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_attributes(scheme, identifier, attrs, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param attrs: The attribute scheme(s) to fetch. This may include any number of the attributes or pseudo-attributes, but it may not include references or attribute chains (see the documentation for the `fetch` parameter in this class). (required)
        :type attrs: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: InstitutionGetAttributes200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_get_attributes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_get_attributes_with_http_info(scheme, identifier, attrs, **kwargs)  # noqa: E501

    @validate_arguments
    def person_get_attributes_with_http_info(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], attrs : Annotated[StrictStr, Field(..., description="The attribute scheme(s) to fetch. This may include any number of the attributes or pseudo-attributes, but it may not include references or attribute chains (see the documentation for the `fetch` parameter in this class).")], **kwargs) -> ApiResponse:  # noqa: E501
        """Get one or more (possibly multi-valued) attributes of a person.  # noqa: E501

        Get one or more (possibly multi-valued) attributes of a person. The returned attributes are sorted by attribute scheme precedence and then attribute precedence.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_attributes_with_http_info(scheme, identifier, attrs, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param attrs: The attribute scheme(s) to fetch. This may include any number of the attributes or pseudo-attributes, but it may not include references or attribute chains (see the documentation for the `fetch` parameter in this class). (required)
        :type attrs: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(InstitutionGetAttributes200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'scheme',
            'identifier',
            'attrs'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_get_attributes" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['scheme']:
            _path_params['scheme'] = _params['scheme']

        if _params['identifier']:
            _path_params['identifier'] = _params['identifier']


        # process the query parameters
        _query_params = []
        if _params.get('attrs') is not None:  # noqa: E501
            _query_params.append(('attrs', _params['attrs']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "InstitutionGetAttributes200Response",
        }

        return self.api_client.call_api(
            '/person/{scheme}/{identifier}/get-attributes', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_get_groups(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> GroupAllGroups200Response:  # noqa: E501
        """Get all the groups to which the specified person belongs, including indirect group memberships, via groups that include other groups.  # noqa: E501

        Get all the groups to which the specified person belongs, including indirect group memberships, via groups that include other groups. The returned list of groups is sorted by groupid.  Note that some group memberships may not be visible to you. This method will only return those group memberships that you have permission to see.  By default, only a few basic details about each group are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references of each group.  NOTE: This method will not include cancelled groups.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_groups(scheme, identifier, fetch, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: GroupAllGroups200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_get_groups_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_get_groups_with_http_info(scheme, identifier, fetch, **kwargs)  # noqa: E501

    @validate_arguments
    def person_get_groups_with_http_info(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Get all the groups to which the specified person belongs, including indirect group memberships, via groups that include other groups.  # noqa: E501

        Get all the groups to which the specified person belongs, including indirect group memberships, via groups that include other groups. The returned list of groups is sorted by groupid.  Note that some group memberships may not be visible to you. This method will only return those group memberships that you have permission to see.  By default, only a few basic details about each group are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references of each group.  NOTE: This method will not include cancelled groups.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_groups_with_http_info(scheme, identifier, fetch, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(GroupAllGroups200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'scheme',
            'identifier',
            'fetch'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_get_groups" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['scheme']:
            _path_params['scheme'] = _params['scheme']

        if _params['identifier']:
            _path_params['identifier'] = _params['identifier']


        # process the query parameters
        _query_params = []
        if _params.get('fetch') is not None:  # noqa: E501
            _query_params.append(('fetch', _params['fetch']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "GroupAllGroups200Response",
        }

        return self.api_client.call_api(
            '/person/{scheme}/{identifier}/groups', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_get_insts(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> InstitutionAllInsts200Response:  # noqa: E501
        """Get all the institutions to which the specified person belongs.  # noqa: E501

        Get all the institutions to which the specified person belongs. The returned list of institutions is sorted by name.  By default, only a few basic details about each institution are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references of each institution.  NOTE: This method will not include cancelled institutions.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_insts(scheme, identifier, fetch, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: InstitutionAllInsts200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_get_insts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_get_insts_with_http_info(scheme, identifier, fetch, **kwargs)  # noqa: E501

    @validate_arguments
    def person_get_insts_with_http_info(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Get all the institutions to which the specified person belongs.  # noqa: E501

        Get all the institutions to which the specified person belongs. The returned list of institutions is sorted by name.  By default, only a few basic details about each institution are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references of each institution.  NOTE: This method will not include cancelled institutions.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_insts_with_http_info(scheme, identifier, fetch, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(InstitutionAllInsts200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'scheme',
            'identifier',
            'fetch'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_get_insts" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['scheme']:
            _path_params['scheme'] = _params['scheme']

        if _params['identifier']:
            _path_params['identifier'] = _params['identifier']


        # process the query parameters
        _query_params = []
        if _params.get('fetch') is not None:  # noqa: E501
            _query_params.append(('fetch', _params['fetch']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "InstitutionAllInsts200Response",
        }

        return self.api_client.call_api(
            '/person/{scheme}/{identifier}/insts', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_get_managed_groups(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> GroupAllGroups200Response:  # noqa: E501
        """Get all the groups that the specified person has persmission to edit.  # noqa: E501

        Get all the groups that the specified person has persmission to edit. The returned list of groups is sorted by groupid.  Note that some group memberships may not be visible to you. This method will only include groups for which you have persmission to see the applicable manager group memberships.  By default, only a few basic details about each group are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references of each group.  NOTE: This method will not include cancelled groups.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_managed_groups(scheme, identifier, fetch, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: GroupAllGroups200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_get_managed_groups_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_get_managed_groups_with_http_info(scheme, identifier, fetch, **kwargs)  # noqa: E501

    @validate_arguments
    def person_get_managed_groups_with_http_info(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Get all the groups that the specified person has persmission to edit.  # noqa: E501

        Get all the groups that the specified person has persmission to edit. The returned list of groups is sorted by groupid.  Note that some group memberships may not be visible to you. This method will only include groups for which you have persmission to see the applicable manager group memberships.  By default, only a few basic details about each group are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references of each group.  NOTE: This method will not include cancelled groups.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_managed_groups_with_http_info(scheme, identifier, fetch, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(GroupAllGroups200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'scheme',
            'identifier',
            'fetch'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_get_managed_groups" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['scheme']:
            _path_params['scheme'] = _params['scheme']

        if _params['identifier']:
            _path_params['identifier'] = _params['identifier']


        # process the query parameters
        _query_params = []
        if _params.get('fetch') is not None:  # noqa: E501
            _query_params.append(('fetch', _params['fetch']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "GroupAllGroups200Response",
        }

        return self.api_client.call_api(
            '/person/{scheme}/{identifier}/manages-groups', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_get_managed_insts(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> InstitutionAllInsts200Response:  # noqa: E501
        """Get all the institutions that the specified person has permission to edit.  # noqa: E501

        Get all the institutions that the specified person has permission to edit. The returned list of institutions is sorted by name.  Note that some group memberships may not be visible to you. This method will only include institutions for which you have permission to see the applicable editor group memberships.  By default, only a few basic details about each institution are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references of each institution.  NOTE: This method will not include cancelled institutions.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_managed_insts(scheme, identifier, fetch, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: InstitutionAllInsts200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_get_managed_insts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_get_managed_insts_with_http_info(scheme, identifier, fetch, **kwargs)  # noqa: E501

    @validate_arguments
    def person_get_managed_insts_with_http_info(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Get all the institutions that the specified person has permission to edit.  # noqa: E501

        Get all the institutions that the specified person has permission to edit. The returned list of institutions is sorted by name.  Note that some group memberships may not be visible to you. This method will only include institutions for which you have permission to see the applicable editor group memberships.  By default, only a few basic details about each institution are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references of each institution.  NOTE: This method will not include cancelled institutions.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_managed_insts_with_http_info(scheme, identifier, fetch, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(InstitutionAllInsts200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'scheme',
            'identifier',
            'fetch'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_get_managed_insts" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['scheme']:
            _path_params['scheme'] = _params['scheme']

        if _params['identifier']:
            _path_params['identifier'] = _params['identifier']


        # process the query parameters
        _query_params = []
        if _params.get('fetch') is not None:  # noqa: E501
            _query_params.append(('fetch', _params['fetch']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "InstitutionAllInsts200Response",
        }

        return self.api_client.call_api(
            '/person/{scheme}/{identifier}/manages-insts', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_get_person(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person to fetch (typically their CRSid).")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> PersonGetPerson200Response:  # noqa: E501
        """Get the person with the specified identifier.  # noqa: E501

        Get the person with the specified identifier.  By default, only a few basic details about the person are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references of the person.  NOTE: The person returned may be a cancelled person. It is the caller's repsonsibility to check its cancelled flag.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_person(scheme, identifier, fetch, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person to fetch (typically their CRSid). (required)
        :type identifier: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: PersonGetPerson200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_get_person_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_get_person_with_http_info(scheme, identifier, fetch, **kwargs)  # noqa: E501

    @validate_arguments
    def person_get_person_with_http_info(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person to fetch (typically their CRSid).")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Get the person with the specified identifier.  # noqa: E501

        Get the person with the specified identifier.  By default, only a few basic details about the person are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references of the person.  NOTE: The person returned may be a cancelled person. It is the caller's repsonsibility to check its cancelled flag.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_get_person_with_http_info(scheme, identifier, fetch, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person to fetch (typically their CRSid). (required)
        :type identifier: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(PersonGetPerson200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'scheme',
            'identifier',
            'fetch'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_get_person" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['scheme']:
            _path_params['scheme'] = _params['scheme']

        if _params['identifier']:
            _path_params['identifier'] = _params['identifier']


        # process the query parameters
        _query_params = []
        if _params.get('fetch') is not None:  # noqa: E501
            _query_params.append(('fetch', _params['fetch']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "PersonGetPerson200Response",
        }

        return self.api_client.call_api(
            '/person/{scheme}/{identifier}', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_is_member_of_group(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], groupid : Annotated[StrictStr, Field(..., description="The ID or name of the group.")], **kwargs) -> PersonIsMemberOfGroup200Response:  # noqa: E501
        """Test if the specified person is a member of the specified group.  # noqa: E501

        Test if the specified person is a member of the specified group.  NOTE: This may be used with cancelled people and groups.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_is_member_of_group(scheme, identifier, groupid, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param groupid: The ID or name of the group. (required)
        :type groupid: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: PersonIsMemberOfGroup200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_is_member_of_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_is_member_of_group_with_http_info(scheme, identifier, groupid, **kwargs)  # noqa: E501

    @validate_arguments
    def person_is_member_of_group_with_http_info(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], groupid : Annotated[StrictStr, Field(..., description="The ID or name of the group.")], **kwargs) -> ApiResponse:  # noqa: E501
        """Test if the specified person is a member of the specified group.  # noqa: E501

        Test if the specified person is a member of the specified group.  NOTE: This may be used with cancelled people and groups.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_is_member_of_group_with_http_info(scheme, identifier, groupid, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param groupid: The ID or name of the group. (required)
        :type groupid: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(PersonIsMemberOfGroup200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'scheme',
            'identifier',
            'groupid'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_is_member_of_group" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['scheme']:
            _path_params['scheme'] = _params['scheme']

        if _params['identifier']:
            _path_params['identifier'] = _params['identifier']

        if _params['groupid']:
            _path_params['groupid'] = _params['groupid']


        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "PersonIsMemberOfGroup200Response",
        }

        return self.api_client.call_api(
            '/person/{scheme}/{identifier}/is-member-of-group/{groupid}', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_is_member_of_inst(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], instid : Annotated[StrictStr, Field(..., description="The ID of the institution.")], **kwargs) -> PersonIsMemberOfGroup200Response:  # noqa: E501
        """Test if the specified person is a member of the specified institution.  # noqa: E501

        Test if the specified person is a member of the specified institution.  NOTE: This may be used with cancelled people and institutions, but it will not include cancelled membership groups.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_is_member_of_inst(scheme, identifier, instid, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param instid: The ID of the institution. (required)
        :type instid: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: PersonIsMemberOfGroup200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_is_member_of_inst_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_is_member_of_inst_with_http_info(scheme, identifier, instid, **kwargs)  # noqa: E501

    @validate_arguments
    def person_is_member_of_inst_with_http_info(self, scheme : Annotated[StrictStr, Field(..., description="The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`.")], identifier : Annotated[StrictStr, Field(..., description="The identifier of the person (typically their CRSid).")], instid : Annotated[StrictStr, Field(..., description="The ID of the institution.")], **kwargs) -> ApiResponse:  # noqa: E501
        """Test if the specified person is a member of the specified institution.  # noqa: E501

        Test if the specified person is a member of the specified institution.  NOTE: This may be used with cancelled people and institutions, but it will not include cancelled membership groups.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_is_member_of_inst_with_http_info(scheme, identifier, instid, async_req=True)
        >>> result = thread.get()

        :param scheme: The person identifier scheme. Typically this should be `\"crsid\"`, but other identifier schemes may be available in the future, such as `\"usn\"` or `\"staffNumber\"`. (required)
        :type scheme: str
        :param identifier: The identifier of the person (typically their CRSid). (required)
        :type identifier: str
        :param instid: The ID of the institution. (required)
        :type instid: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(PersonIsMemberOfGroup200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'scheme',
            'identifier',
            'instid'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_is_member_of_inst" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['scheme']:
            _path_params['scheme'] = _params['scheme']

        if _params['identifier']:
            _path_params['identifier'] = _params['identifier']

        if _params['instid']:
            _path_params['instid'] = _params['instid']


        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "PersonIsMemberOfGroup200Response",
        }

        return self.api_client.call_api(
            '/person/{scheme}/{identifier}/is-member-of-inst/{instid}', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_list_people(self, crsids : Annotated[StrictStr, Field(..., description="A comma-separated list of identifiers.")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> GroupGetCancelledMembers200Response:  # noqa: E501
        """Get the people with the specified identifiers (typically CRSids).  # noqa: E501

        Get the people with the specified identifiers (typically CRSids).  Each identifier may be either a CRSid, or an identifier from another identifier scheme, prefixed with that scheme's name and a slash. For example `\"mug99\"` or `\"usn/123456789\"`.  By default, only a few basic details about each person are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references.  The results are sorted by identifier scheme and value.  NOTE: The number of people that may be fetched in a single call is limited by the URL path length limit (around 8000 characters). A CRSid is up to 7 characters long, and other identifiers are typically longer, since they must also include the identifier scheme. Thus the number of people that this method may fetch is typically limited to a few hundred.  NOTE: The people returned may include cancelled people. It is the caller's repsonsibility to check their cancelled flags.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_list_people(crsids, fetch, async_req=True)
        >>> result = thread.get()

        :param crsids: A comma-separated list of identifiers. (required)
        :type crsids: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: GroupGetCancelledMembers200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_list_people_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_list_people_with_http_info(crsids, fetch, **kwargs)  # noqa: E501

    @validate_arguments
    def person_list_people_with_http_info(self, crsids : Annotated[StrictStr, Field(..., description="A comma-separated list of identifiers.")], fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Get the people with the specified identifiers (typically CRSids).  # noqa: E501

        Get the people with the specified identifiers (typically CRSids).  Each identifier may be either a CRSid, or an identifier from another identifier scheme, prefixed with that scheme's name and a slash. For example `\"mug99\"` or `\"usn/123456789\"`.  By default, only a few basic details about each person are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references.  The results are sorted by identifier scheme and value.  NOTE: The number of people that may be fetched in a single call is limited by the URL path length limit (around 8000 characters). A CRSid is up to 7 characters long, and other identifiers are typically longer, since they must also include the identifier scheme. Thus the number of people that this method may fetch is typically limited to a few hundred.  NOTE: The people returned may include cancelled people. It is the caller's repsonsibility to check their cancelled flags.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_list_people_with_http_info(crsids, fetch, async_req=True)
        >>> result = thread.get()

        :param crsids: A comma-separated list of identifiers. (required)
        :type crsids: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(GroupGetCancelledMembers200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'crsids',
            'fetch'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_list_people" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        if _params.get('crsids') is not None:  # noqa: E501
            _query_params.append(('crsids', _params['crsids']))

        if _params.get('fetch') is not None:  # noqa: E501
            _query_params.append(('fetch', _params['fetch']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "GroupGetCancelledMembers200Response",
        }

        return self.api_client.call_api(
            '/person/list', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_modified_people(self, min_tx_id : Annotated[StrictInt, Field(..., description="Include modifications made in transactions after (but not including) this one.")], max_tx_id : Annotated[StrictInt, Field(..., description="Include modifications made in transactions up to and including this one.")], crsids : Annotated[Optional[StrictStr], Field(description="Only include people with identifiers in this list. By default, all modified people will be included.")] = None, include_cancelled : Annotated[Optional[StrictBool], Field(description="Include cancelled people (people who are no longer members of the University). By default, cancelled people are excluded.")] = None, membership_changes : Annotated[Optional[StrictBool], Field(description="Include people whose group or institutional memberships have changed. By default, only people whose attributes have been directly modified are included.")] = None, inst_name_changes : Annotated[Optional[StrictBool], Field(description="Include people who are members of instituions whose names have changed. This will also cause people whose group or institutional memberships have changed to be included. By default, changes to institution names do not propagate to people.")] = None, fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> GroupGetCancelledMembers200Response:  # noqa: E501
        """Find all people modified between the specified pair of transactions.  # noqa: E501

        Find all people modified between the specified pair of transactions.  The transaction IDs specified should be the IDs from two different requests for the last (most recent) transaction ID, made at different times, that returned different values, indicating that some Lookup data was modified in the period between the two requests. This method then determines which (if any) people were affected.  By default, only a few basic details about each person are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references.  NOTE: All data returned reflects the latest available data about each person. It is not possible to query for old data, or more detailed information about the specific changes made.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_modified_people(min_tx_id, max_tx_id, crsids, include_cancelled, membership_changes, inst_name_changes, fetch, async_req=True)
        >>> result = thread.get()

        :param min_tx_id: Include modifications made in transactions after (but not including) this one. (required)
        :type min_tx_id: int
        :param max_tx_id: Include modifications made in transactions up to and including this one. (required)
        :type max_tx_id: int
        :param crsids: Only include people with identifiers in this list. By default, all modified people will be included.
        :type crsids: str
        :param include_cancelled: Include cancelled people (people who are no longer members of the University). By default, cancelled people are excluded.
        :type include_cancelled: bool
        :param membership_changes: Include people whose group or institutional memberships have changed. By default, only people whose attributes have been directly modified are included.
        :type membership_changes: bool
        :param inst_name_changes: Include people who are members of instituions whose names have changed. This will also cause people whose group or institutional memberships have changed to be included. By default, changes to institution names do not propagate to people.
        :type inst_name_changes: bool
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: GroupGetCancelledMembers200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_modified_people_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_modified_people_with_http_info(min_tx_id, max_tx_id, crsids, include_cancelled, membership_changes, inst_name_changes, fetch, **kwargs)  # noqa: E501

    @validate_arguments
    def person_modified_people_with_http_info(self, min_tx_id : Annotated[StrictInt, Field(..., description="Include modifications made in transactions after (but not including) this one.")], max_tx_id : Annotated[StrictInt, Field(..., description="Include modifications made in transactions up to and including this one.")], crsids : Annotated[Optional[StrictStr], Field(description="Only include people with identifiers in this list. By default, all modified people will be included.")] = None, include_cancelled : Annotated[Optional[StrictBool], Field(description="Include cancelled people (people who are no longer members of the University). By default, cancelled people are excluded.")] = None, membership_changes : Annotated[Optional[StrictBool], Field(description="Include people whose group or institutional memberships have changed. By default, only people whose attributes have been directly modified are included.")] = None, inst_name_changes : Annotated[Optional[StrictBool], Field(description="Include people who are members of instituions whose names have changed. This will also cause people whose group or institutional memberships have changed to be included. By default, changes to institution names do not propagate to people.")] = None, fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Find all people modified between the specified pair of transactions.  # noqa: E501

        Find all people modified between the specified pair of transactions.  The transaction IDs specified should be the IDs from two different requests for the last (most recent) transaction ID, made at different times, that returned different values, indicating that some Lookup data was modified in the period between the two requests. This method then determines which (if any) people were affected.  By default, only a few basic details about each person are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references.  NOTE: All data returned reflects the latest available data about each person. It is not possible to query for old data, or more detailed information about the specific changes made.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_modified_people_with_http_info(min_tx_id, max_tx_id, crsids, include_cancelled, membership_changes, inst_name_changes, fetch, async_req=True)
        >>> result = thread.get()

        :param min_tx_id: Include modifications made in transactions after (but not including) this one. (required)
        :type min_tx_id: int
        :param max_tx_id: Include modifications made in transactions up to and including this one. (required)
        :type max_tx_id: int
        :param crsids: Only include people with identifiers in this list. By default, all modified people will be included.
        :type crsids: str
        :param include_cancelled: Include cancelled people (people who are no longer members of the University). By default, cancelled people are excluded.
        :type include_cancelled: bool
        :param membership_changes: Include people whose group or institutional memberships have changed. By default, only people whose attributes have been directly modified are included.
        :type membership_changes: bool
        :param inst_name_changes: Include people who are members of instituions whose names have changed. This will also cause people whose group or institutional memberships have changed to be included. By default, changes to institution names do not propagate to people.
        :type inst_name_changes: bool
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(GroupGetCancelledMembers200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'min_tx_id',
            'max_tx_id',
            'crsids',
            'include_cancelled',
            'membership_changes',
            'inst_name_changes',
            'fetch'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_modified_people" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        if _params.get('min_tx_id') is not None:  # noqa: E501
            _query_params.append(('minTxId', _params['min_tx_id']))

        if _params.get('max_tx_id') is not None:  # noqa: E501
            _query_params.append(('maxTxId', _params['max_tx_id']))

        if _params.get('crsids') is not None:  # noqa: E501
            _query_params.append(('crsids', _params['crsids']))

        if _params.get('include_cancelled') is not None:  # noqa: E501
            _query_params.append(('includeCancelled', _params['include_cancelled']))

        if _params.get('membership_changes') is not None:  # noqa: E501
            _query_params.append(('membershipChanges', _params['membership_changes']))

        if _params.get('inst_name_changes') is not None:  # noqa: E501
            _query_params.append(('instNameChanges', _params['inst_name_changes']))

        if _params.get('fetch') is not None:  # noqa: E501
            _query_params.append(('fetch', _params['fetch']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "GroupGetCancelledMembers200Response",
        }

        return self.api_client.call_api(
            '/person/modified-people', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_search(self, query : Annotated[StrictStr, Field(..., description="The search string.")], approx_matches : Annotated[Optional[StrictBool], Field(description="Flag to enable more approximate matching in the search, causing more results to be returned. Defaults to `false`. This is ignored for LQL queries.")] = None, include_cancelled : Annotated[Optional[StrictBool], Field(description="Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.")] = None, mis_status : Annotated[Optional[StrictStr], Field(description="The type of people to search for. This may be  * `\"staff\"` - only include people whose MIS status is   `\"\"` (empty string), `\"staff\"`, or   `\"staff,student\"`.  * `\"student\"` - only include people whose MIS status is set to   `\"student\"` or `\"staff,student\"`.  Otherwise all matching people will be included (the default). Note that the `\"staff\"` and `\"student\"` options are not mutually exclusive.")] = None, attributes : Annotated[Optional[StrictStr], Field(description="A comma-separated list of attributes to consider when searching. If this is `null` (the default) then all attribute schemes marked as searchable will be included. This is ignored for LQL queries.")] = None, offset : Annotated[Optional[StrictInt], Field(description="The number of results to skip at the start of the search. Defaults to 0.")] = None, limit : Annotated[Optional[StrictInt], Field(description="The maximum number of results to return. Defaults to 100.")] = None, order_by : Annotated[Optional[StrictStr], Field(description="The order in which to list the results. This may be either `\"identifier\"` or `\"surname\"` (the default for non-LQL queries). This is ignored for LQL queries, which always return results in identifier order.")] = None, fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> GroupGetCancelledMembers200Response:  # noqa: E501
        """Search for people using a free text query string.  # noqa: E501

        Search for people using a free text query string. This is the same search function that is used in the Lookup web application.  By default, only a few basic details about each person are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references.  NOTE: If the query string starts with the prefix `\"person:\"`, it is treated as an [LQL query](/lql), allowing more advanced searches. An LQL query will ignore the `approxMatches` and `attributes` parameters, but it will respect the values of `includeCancelled` and `misStatus`. In addition, an LQL query will ignore the `orderBy` parameter, since LQL queries always return results in ID order.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_search(query, approx_matches, include_cancelled, mis_status, attributes, offset, limit, order_by, fetch, async_req=True)
        >>> result = thread.get()

        :param query: The search string. (required)
        :type query: str
        :param approx_matches: Flag to enable more approximate matching in the search, causing more results to be returned. Defaults to `false`. This is ignored for LQL queries.
        :type approx_matches: bool
        :param include_cancelled: Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.
        :type include_cancelled: bool
        :param mis_status: The type of people to search for. This may be  * `\"staff\"` - only include people whose MIS status is   `\"\"` (empty string), `\"staff\"`, or   `\"staff,student\"`.  * `\"student\"` - only include people whose MIS status is set to   `\"student\"` or `\"staff,student\"`.  Otherwise all matching people will be included (the default). Note that the `\"staff\"` and `\"student\"` options are not mutually exclusive.
        :type mis_status: str
        :param attributes: A comma-separated list of attributes to consider when searching. If this is `null` (the default) then all attribute schemes marked as searchable will be included. This is ignored for LQL queries.
        :type attributes: str
        :param offset: The number of results to skip at the start of the search. Defaults to 0.
        :type offset: int
        :param limit: The maximum number of results to return. Defaults to 100.
        :type limit: int
        :param order_by: The order in which to list the results. This may be either `\"identifier\"` or `\"surname\"` (the default for non-LQL queries). This is ignored for LQL queries, which always return results in identifier order.
        :type order_by: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: GroupGetCancelledMembers200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_search_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_search_with_http_info(query, approx_matches, include_cancelled, mis_status, attributes, offset, limit, order_by, fetch, **kwargs)  # noqa: E501

    @validate_arguments
    def person_search_with_http_info(self, query : Annotated[StrictStr, Field(..., description="The search string.")], approx_matches : Annotated[Optional[StrictBool], Field(description="Flag to enable more approximate matching in the search, causing more results to be returned. Defaults to `false`. This is ignored for LQL queries.")] = None, include_cancelled : Annotated[Optional[StrictBool], Field(description="Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.")] = None, mis_status : Annotated[Optional[StrictStr], Field(description="The type of people to search for. This may be  * `\"staff\"` - only include people whose MIS status is   `\"\"` (empty string), `\"staff\"`, or   `\"staff,student\"`.  * `\"student\"` - only include people whose MIS status is set to   `\"student\"` or `\"staff,student\"`.  Otherwise all matching people will be included (the default). Note that the `\"staff\"` and `\"student\"` options are not mutually exclusive.")] = None, attributes : Annotated[Optional[StrictStr], Field(description="A comma-separated list of attributes to consider when searching. If this is `null` (the default) then all attribute schemes marked as searchable will be included. This is ignored for LQL queries.")] = None, offset : Annotated[Optional[StrictInt], Field(description="The number of results to skip at the start of the search. Defaults to 0.")] = None, limit : Annotated[Optional[StrictInt], Field(description="The maximum number of results to return. Defaults to 100.")] = None, order_by : Annotated[Optional[StrictStr], Field(description="The order in which to list the results. This may be either `\"identifier\"` or `\"surname\"` (the default for non-LQL queries). This is ignored for LQL queries, which always return results in identifier order.")] = None, fetch : Annotated[Optional[StrictStr], Field(description="A comma-separated list of any additional attributes or references to fetch.")] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Search for people using a free text query string.  # noqa: E501

        Search for people using a free text query string. This is the same search function that is used in the Lookup web application.  By default, only a few basic details about each person are returned, but the optional `fetch` parameter may be used to fetch additional attributes or references.  NOTE: If the query string starts with the prefix `\"person:\"`, it is treated as an [LQL query](/lql), allowing more advanced searches. An LQL query will ignore the `approxMatches` and `attributes` parameters, but it will respect the values of `includeCancelled` and `misStatus`. In addition, an LQL query will ignore the `orderBy` parameter, since LQL queries always return results in ID order.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_search_with_http_info(query, approx_matches, include_cancelled, mis_status, attributes, offset, limit, order_by, fetch, async_req=True)
        >>> result = thread.get()

        :param query: The search string. (required)
        :type query: str
        :param approx_matches: Flag to enable more approximate matching in the search, causing more results to be returned. Defaults to `false`. This is ignored for LQL queries.
        :type approx_matches: bool
        :param include_cancelled: Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.
        :type include_cancelled: bool
        :param mis_status: The type of people to search for. This may be  * `\"staff\"` - only include people whose MIS status is   `\"\"` (empty string), `\"staff\"`, or   `\"staff,student\"`.  * `\"student\"` - only include people whose MIS status is set to   `\"student\"` or `\"staff,student\"`.  Otherwise all matching people will be included (the default). Note that the `\"staff\"` and `\"student\"` options are not mutually exclusive.
        :type mis_status: str
        :param attributes: A comma-separated list of attributes to consider when searching. If this is `null` (the default) then all attribute schemes marked as searchable will be included. This is ignored for LQL queries.
        :type attributes: str
        :param offset: The number of results to skip at the start of the search. Defaults to 0.
        :type offset: int
        :param limit: The maximum number of results to return. Defaults to 100.
        :type limit: int
        :param order_by: The order in which to list the results. This may be either `\"identifier\"` or `\"surname\"` (the default for non-LQL queries). This is ignored for LQL queries, which always return results in identifier order.
        :type order_by: str
        :param fetch: A comma-separated list of any additional attributes or references to fetch.
        :type fetch: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(GroupGetCancelledMembers200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'query',
            'approx_matches',
            'include_cancelled',
            'mis_status',
            'attributes',
            'offset',
            'limit',
            'order_by',
            'fetch'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_search" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        if _params.get('query') is not None:  # noqa: E501
            _query_params.append(('query', _params['query']))

        if _params.get('approx_matches') is not None:  # noqa: E501
            _query_params.append(('approxMatches', _params['approx_matches']))

        if _params.get('include_cancelled') is not None:  # noqa: E501
            _query_params.append(('includeCancelled', _params['include_cancelled']))

        if _params.get('mis_status') is not None:  # noqa: E501
            _query_params.append(('misStatus', _params['mis_status']))

        if _params.get('attributes') is not None:  # noqa: E501
            _query_params.append(('attributes', _params['attributes']))

        if _params.get('offset') is not None:  # noqa: E501
            _query_params.append(('offset', _params['offset']))

        if _params.get('limit') is not None:  # noqa: E501
            _query_params.append(('limit', _params['limit']))

        if _params.get('order_by') is not None:  # noqa: E501
            _query_params.append(('orderBy', _params['order_by']))

        if _params.get('fetch') is not None:  # noqa: E501
            _query_params.append(('fetch', _params['fetch']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "GroupGetCancelledMembers200Response",
        }

        return self.api_client.call_api(
            '/person/search', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def person_search_count(self, query : Annotated[StrictStr, Field(..., description="The search string.")], approx_matches : Annotated[Optional[StrictBool], Field(description="Flag to enable more approximate matching in the search, causing more results to be returned. Defaults to `false`. This is ignored for LQL queries.")] = None, include_cancelled : Annotated[Optional[StrictBool], Field(description="Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.")] = None, mis_status : Annotated[Optional[StrictStr], Field(description="The type of people to search for. This may be  * `\"staff\"` - only include people whose MIS status is   `\"\"` (empty string), `\"staff\"`, or   `\"staff,student\"`.  * `\"student\"` - only include people whose MIS status is set to   `\"student\"` or `\"staff,student\"`.  Otherwise all matching people will be included (the default). Note that the `\"staff\"` and `\"student\"` options are not mutually exclusive.")] = None, attributes : Annotated[Optional[StrictStr], Field(description="A comma-separated list of attributes to consider when searching. If this is `null` (the default) then all attribute schemes marked as searchable will be included. This is ignored for LQL queries.")] = None, **kwargs) -> GroupSearchCount200Response:  # noqa: E501
        """Count the number of people that would be returned by a search using a free text query string.  # noqa: E501

        Count the number of people that would be returned by a search using a free text query string.  NOTE: If the query string starts with the prefix `\"person:\"`, it is treated as an [LQL query](/lql), allowing more advanced searches. An LQL query will ignore the `approxMatches` and `attributes` parameters, but it will respect the values of `includeCancelled` and `misStatus`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_search_count(query, approx_matches, include_cancelled, mis_status, attributes, async_req=True)
        >>> result = thread.get()

        :param query: The search string. (required)
        :type query: str
        :param approx_matches: Flag to enable more approximate matching in the search, causing more results to be returned. Defaults to `false`. This is ignored for LQL queries.
        :type approx_matches: bool
        :param include_cancelled: Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.
        :type include_cancelled: bool
        :param mis_status: The type of people to search for. This may be  * `\"staff\"` - only include people whose MIS status is   `\"\"` (empty string), `\"staff\"`, or   `\"staff,student\"`.  * `\"student\"` - only include people whose MIS status is set to   `\"student\"` or `\"staff,student\"`.  Otherwise all matching people will be included (the default). Note that the `\"staff\"` and `\"student\"` options are not mutually exclusive.
        :type mis_status: str
        :param attributes: A comma-separated list of attributes to consider when searching. If this is `null` (the default) then all attribute schemes marked as searchable will be included. This is ignored for LQL queries.
        :type attributes: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: GroupSearchCount200Response
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the person_search_count_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.person_search_count_with_http_info(query, approx_matches, include_cancelled, mis_status, attributes, **kwargs)  # noqa: E501

    @validate_arguments
    def person_search_count_with_http_info(self, query : Annotated[StrictStr, Field(..., description="The search string.")], approx_matches : Annotated[Optional[StrictBool], Field(description="Flag to enable more approximate matching in the search, causing more results to be returned. Defaults to `false`. This is ignored for LQL queries.")] = None, include_cancelled : Annotated[Optional[StrictBool], Field(description="Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.")] = None, mis_status : Annotated[Optional[StrictStr], Field(description="The type of people to search for. This may be  * `\"staff\"` - only include people whose MIS status is   `\"\"` (empty string), `\"staff\"`, or   `\"staff,student\"`.  * `\"student\"` - only include people whose MIS status is set to   `\"student\"` or `\"staff,student\"`.  Otherwise all matching people will be included (the default). Note that the `\"staff\"` and `\"student\"` options are not mutually exclusive.")] = None, attributes : Annotated[Optional[StrictStr], Field(description="A comma-separated list of attributes to consider when searching. If this is `null` (the default) then all attribute schemes marked as searchable will be included. This is ignored for LQL queries.")] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Count the number of people that would be returned by a search using a free text query string.  # noqa: E501

        Count the number of people that would be returned by a search using a free text query string.  NOTE: If the query string starts with the prefix `\"person:\"`, it is treated as an [LQL query](/lql), allowing more advanced searches. An LQL query will ignore the `approxMatches` and `attributes` parameters, but it will respect the values of `includeCancelled` and `misStatus`.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.person_search_count_with_http_info(query, approx_matches, include_cancelled, mis_status, attributes, async_req=True)
        >>> result = thread.get()

        :param query: The search string. (required)
        :type query: str
        :param approx_matches: Flag to enable more approximate matching in the search, causing more results to be returned. Defaults to `false`. This is ignored for LQL queries.
        :type approx_matches: bool
        :param include_cancelled: Flag to allow cancelled people to be included (people who are no longer members of the University). Defaults to `false`.
        :type include_cancelled: bool
        :param mis_status: The type of people to search for. This may be  * `\"staff\"` - only include people whose MIS status is   `\"\"` (empty string), `\"staff\"`, or   `\"staff,student\"`.  * `\"student\"` - only include people whose MIS status is set to   `\"student\"` or `\"staff,student\"`.  Otherwise all matching people will be included (the default). Note that the `\"staff\"` and `\"student\"` options are not mutually exclusive.
        :type mis_status: str
        :param attributes: A comma-separated list of attributes to consider when searching. If this is `null` (the default) then all attribute schemes marked as searchable will be included. This is ignored for LQL queries.
        :type attributes: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(GroupSearchCount200Response, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'query',
            'approx_matches',
            'include_cancelled',
            'mis_status',
            'attributes'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method person_search_count" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        if _params.get('query') is not None:  # noqa: E501
            _query_params.append(('query', _params['query']))

        if _params.get('approx_matches') is not None:  # noqa: E501
            _query_params.append(('approxMatches', _params['approx_matches']))

        if _params.get('include_cancelled') is not None:  # noqa: E501
            _query_params.append(('includeCancelled', _params['include_cancelled']))

        if _params.get('mis_status') is not None:  # noqa: E501
            _query_params.append(('misStatus', _params['mis_status']))

        if _params.get('attributes') is not None:  # noqa: E501
            _query_params.append(('attributes', _params['attributes']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = ['APIGatewayAuth', 'APIGatewayAuth']  # noqa: E501

        _response_types_map = {
            '200': "GroupSearchCount200Response",
        }

        return self.api_client.call_api(
            '/person/search-count', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))
