def graph_directory_role(self) -> GraphDirectoryRoleRequestBuilder:
        """
        Casts the previous resource to directoryRole.
        """
        from .graph_directory_role.graph_directory_role_request_builder import GraphDirectoryRoleRequestBuilder

        return GraphDirectoryRoleRequestBuilder(self.request_adapter, self.path_parameters)

        Casts the previous resource to directoryRole.
        
msgraph/generated/users/item/member_of/member_of_request_builder.py