<commit_before><?php
namespace AcademyHQ\API\Repository\OMA;

use AcademyHQ\API\ValueObjects as VO;
use AcademyHQ\API\Common\Credentials;
use Guzzle\Http\Client as GuzzleClient;
use AcademyHQ\API\Repository\BaseRepository;
use AcademyHQ\API\HTTP\Request\Request as Request;

/**
 * Quality Verifier Repository
 */
class QualityVerifierRepository extends BaseRepository
{

	/**
	 * @param Credentials $credentials
	 */
	public function __construct(Credentials $credentials)
    {
        parent::__construct();
        $this->credentials = $credentials;
        $this->base_url .= '/oma';
    }

	/**
	 * @param VO\Token         $token
	 * @param VO\MemberID      $verifier_id
	 * @param VO\Integer|null  $current_page
	 * @param VO\Integer|null  $per_page
	 * @param VO\StringVO|null $sort_by
	 * @param VO\StringVO|null $direction
	 * @param VO\StringVO|null $search
	 *
	 * @return \AcademyHQ\API\HTTP\Response\json
	 * @throws \AcademyHQ\API\HTTP\Response\Exception\ResponseException
	 */
	public function listQVLearners(
    	VO\Token $token,
    	VO\MemberID $verifier_id,
		VO\Integer $current_page=null,
    	VO\Integer $per_page=null,
    	VO\StringVO $sort_by=null,
    	VO\StringVO $direction=null,
    	VO\StringVO $search=null
    ){
    	$request = new Request(
            new GuzzleClient,
            $this->credentials,
            VO\HTTP\Url::fromNative($this->base_url.'/quality_verifier/learners/list'),
            new VO\HTTP\Method('POST')
        );
        
        $header_parameters = array('Authorization' => $token->__toEncodedString());
        $request_parameters = array(
        	'verifier_id' => $verifier_id->__toString()
        );
        if(!is_null($current_page)){
            $request_parameters['current_page'] = $current_page->__toInteger();
        }
        if(!is_null($per_page)){
            $request_parameters['per_page'] = $per_page->__toInteger();
        }
        if(!is_null($sort_by)){
            $request_parameters['sort_by'] = $sort_by->__toString();
        }
        if(!is_null($direction)){
            $request_parameters['direction'] = $direction->__toString();
        }
        if(!is_null($search)){
            $request_parameters['search'] = $search->__toString();
        }
        $response = $request->send($request_parameters, $header_parameters);
        $data = $response->get_data();
        return $data;
    }

	/**
	 * @param VO\Token         $token
	 * @param VO\MemberID      $verifier_id
	 * @param VO\Integer|null  $current_page
	 * @param VO\Integer|null  $per_page
	 * @param VO\StringVO|null $sort_by
	 * @param VO\StringVO|null $direction
	 * @param VO\StringVO|null $search
	 *
	 * @return \AcademyHQ\API\HTTP\Response\json
	 * @throws \AcademyHQ\API\HTTP\Response\Exception\ResponseException
	 */
	public function listQVAssessors(
    	VO\Token $token,
    	VO\MemberID $verifier_id,
		VO\Integer $current_page=null,
    	VO\Integer $per_page=null,
    	VO\StringVO $sort_by=null,
    	VO\StringVO $direction=null,
    	VO\StringVO $search=null
    ){
    	$request = new Request(
            new GuzzleClient,
            $this->credentials,
            VO\HTTP\Url::fromNative($this->base_url.'/quality_verifier/assessors/list'),
            new VO\HTTP\Method('POST')
        );
        
        $header_parameters = array('Authorization' => $token->__toEncodedString());
        $request_parameters = array(
        	'verifier_id' => $verifier_id->__toString()
        );
        if(!is_null($current_page)){
            $request_parameters['current_page'] = $current_page->__toInteger();
        }
        if(!is_null($per_page)){
            $request_parameters['per_page'] = $per_page->__toInteger();
        }
        if(!is_null($sort_by)){
            $request_parameters['sort_by'] = $sort_by->__toString();
        }
        if(!is_null($direction)){
            $request_parameters['direction'] = $direction->__toString();
        }
        if(!is_null($search)){
            $request_parameters['search'] = $search->__toString();
        }
        $response = $request->send($request_parameters, $header_parameters);
        $data = $response->get_data();
        return $data;
    }

	/**
	 * @param VO\Token         $token
	 * @param VO\MemberID      $verifier_id
	 * @param VO\Integer|null  $current_page
	 * @param VO\Integer|null  $per_page
	 * @param VO\StringVO|null $sort_by
	 * @param VO\StringVO|null $direction
	 * @param VO\StringVO|null $search
	 *
	 * @return \AcademyHQ\API\HTTP\Response\json
	 * @throws \AcademyHQ\API\HTTP\Response\Exception\ResponseException
	 */
	public function listQVOccupations(
    	VO\Token $token,
    	VO\MemberID $verifier_id,
		VO\Integer $current_page=null,
    	VO\Integer $per_page=null,
    	VO\StringVO $sort_by=null,
    	VO\StringVO $direction=null,
    	VO\StringVO $search=null
    ){
    	$request = new Request(
            new GuzzleClient,
            $this->credentials,
            VO\HTTP\Url::fromNative($this->base_url.'/quality_verifier/occupations/list'),
            new VO\HTTP\Method('POST')
        );
        
        $header_parameters = array('Authorization' => $token->__toEncodedString());
        $request_parameters = array(
        	'verifier_id' => $verifier_id->__toString()
        );
        if(!is_null($current_page)){
            $request_parameters['current_page'] = $current_page->__toInteger();
        }
        if(!is_null($per_page)){
            $request_parameters['per_page'] = $per_page->__toInteger();
        }
        if(!is_null($sort_by)){
            $request_parameters['sort_by'] = $sort_by->__toString();
        }
        if(!is_null($direction)){
            $request_parameters['direction'] = $direction->__toString();
        }
        if(!is_null($search)){
            $request_parameters['search'] = $search->__toString();
        }
        $response = $request->send($request_parameters, $header_parameters);
        $data = $response->get_data();
        return $data;
    }

	/**
	 * @param VO\Token               $token
	 * @param VO\Integer|null        $current_page
	 * @param VO\Integer|null        $per_page
	 * @param VO\StringVO|null       $order_by_field
	 * @param VO\StringVO|null       $order_by_direction
	 * @param VO\StringVO|null       $search
	 * @param VO\MemberID|null       $assessor_id
	 * @param VO\OccupationID|null   $occupation_id
	 * @param VO\OrganisationID|null $organisation_id
	 * @param VO\Flag                $unique_learner
	 *
	 * @return \AcademyHQ\API\HTTP\Response\json
	 * @throws \AcademyHQ\API\HTTP\Response\Exception\ResponseException
	 */
	public function listLearners(
		VO\Token $token,
        VO\Integer $current_page = null,
        VO\Integer $per_page = null,
        VO\StringVO $order_by_field = null,
        VO\StringVO $order_by_direction = null,
        VO\StringVO $search = null,<commit_msg>added sampling_method params on 3 apis for quality_verifier<commit_after><?php
namespace AcademyHQ\API\Repository\OMA;

use AcademyHQ\API\ValueObjects as VO;
use AcademyHQ\API\Common\Credentials;
use Guzzle\Http\Client as GuzzleClient;
use AcademyHQ\API\Repository\BaseRepository;
use AcademyHQ\API\HTTP\Request\Request as Request;

/**
 * Quality Verifier Repository
 */
class QualityVerifierRepository extends BaseRepository
{

	/**
	 * @param Credentials $credentials
	 */
	public function __construct(Credentials $credentials)
    {
        parent::__construct();
        $this->credentials = $credentials;
        $this->base_url .= '/oma';
    }

	/**
	 * @param VO\Token         $token
	 * @param VO\MemberID      $verifier_id
	 * @param VO\Integer|null  $current_page
	 * @param VO\Integer|null  $per_page
	 * @param VO\StringVO|null $sort_by
	 * @param VO\StringVO|null $direction
	 * @param VO\StringVO|null $search
	 *
	 * @return \AcademyHQ\API\HTTP\Response\json
	 * @throws \AcademyHQ\API\HTTP\Response\Exception\ResponseException
	 */
	public function listQVLearners(
    	VO\Token $token,
    	VO\MemberID $verifier_id,
		VO\Integer $current_page=null,
    	VO\Integer $per_page=null,
    	VO\StringVO $sort_by=null,
    	VO\StringVO $direction=null,
    	VO\StringVO $search=null,
        VO\StringVO $sampling_method=null
    ){
    	$request = new Request(
            new GuzzleClient,
            $this->credentials,
            VO\HTTP\Url::fromNative($this->base_url.'/quality_verifier/learners/list'),
            new VO\HTTP\Method('POST')
        );
        
        $header_parameters = array('Authorization' => $token->__toEncodedString());
        $request_parameters = array(
        	'verifier_id' => $verifier_id->__toString()
        );
        if(!is_null($current_page)){
            $request_parameters['current_page'] = $current_page->__toInteger();
        }
        if(!is_null($per_page)){
            $request_parameters['per_page'] = $per_page->__toInteger();
        }
        if(!is_null($sort_by)){
            $request_parameters['sort_by'] = $sort_by->__toString();
        }
        if(!is_null($direction)){
            $request_parameters['direction'] = $direction->__toString();
        }
        if(!is_null($search)){
            $request_parameters['search'] = $search->__toString();
        }
        if(!is_null($sampling_method)){
            $request_parameters['sampling_method'] = $sampling_method->__toString();
        }
        $response = $request->send($request_parameters, $header_parameters);
        $data = $response->get_data();
        return $data;
    }

	/**
	 * @param VO\Token         $token
	 * @param VO\MemberID      $verifier_id
	 * @param VO\Integer|null  $current_page
	 * @param VO\Integer|null  $per_page
	 * @param VO\StringVO|null $sort_by
	 * @param VO\StringVO|null $direction
	 * @param VO\StringVO|null $search
	 *
	 * @return \AcademyHQ\API\HTTP\Response\json
	 * @throws \AcademyHQ\API\HTTP\Response\Exception\ResponseException
	 */
	public function listQVAssessors(
    	VO\Token $token,
    	VO\MemberID $verifier_id,
		VO\Integer $current_page=null,
    	VO\Integer $per_page=null,
    	VO\StringVO $sort_by=null,
    	VO\StringVO $direction=null,
    	VO\StringVO $search=null,
        VO\StringVO $sampling_method=null
    ){
    	$request = new Request(
            new GuzzleClient,
            $this->credentials,
            VO\HTTP\Url::fromNative($this->base_url.'/quality_verifier/assessors/list'),
            new VO\HTTP\Method('POST')
        );
        
        $header_parameters = array('Authorization' => $token->__toEncodedString());
        $request_parameters = array(
        	'verifier_id' => $verifier_id->__toString()
        );
        if(!is_null($current_page)){
            $request_parameters['current_page'] = $current_page->__toInteger();
        }
        if(!is_null($per_page)){
            $request_parameters['per_page'] = $per_page->__toInteger();
        }
        if(!is_null($sort_by)){
            $request_parameters['sort_by'] = $sort_by->__toString();
        }
        if(!is_null($direction)){
            $request_parameters['direction'] = $direction->__toString();
        }
        if(!is_null($search)){
            $request_parameters['search'] = $search->__toString();
        }
        if(!is_null($sampling_method)){
            $request_parameters['sampling_method'] = $sampling_method->__toString();
        }
        $response = $request->send($request_parameters, $header_parameters);
        $data = $response->get_data();
        return $data;
    }

	/**
	 * @param VO\Token         $token
	 * @param VO\MemberID      $verifier_id
	 * @param VO\Integer|null  $current_page
	 * @param VO\Integer|null  $per_page
	 * @param VO\StringVO|null $sort_by
	 * @param VO\StringVO|null $direction
	 * @param VO\StringVO|null $search
	 *
	 * @return \AcademyHQ\API\HTTP\Response\json
	 * @throws \AcademyHQ\API\HTTP\Response\Exception\ResponseException
	 */
	public function listQVOccupations(
    	VO\Token $token,
    	VO\MemberID $verifier_id,
		VO\Integer $current_page=null,
    	VO\Integer $per_page=null,
    	VO\StringVO $sort_by=null,
    	VO\StringVO $direction=null,
        VO\StringVO $search=null,
    	VO\StringVO $sampling_method=null
    ){
    	$request = new Request(
            new GuzzleClient,
            $this->credentials,
            VO\HTTP\Url::fromNative($this->base_url.'/quality_verifier/occupations/list'),
            new VO\HTTP\Method('POST')
        );
        
        $header_parameters = array('Authorization' => $token->__toEncodedString());
        $request_parameters = array(
        	'verifier_id' => $verifier_id->__toString()
        );
        if(!is_null($current_page)){
            $request_parameters['current_page'] = $current_page->__toInteger();
        }
        if(!is_null($per_page)){
            $request_parameters['per_page'] = $per_page->__toInteger();
        }
        if(!is_null($sort_by)){
            $request_parameters['sort_by'] = $sort_by->__toString();
        }
        if(!is_null($direction)){
            $request_parameters['direction'] = $direction->__toString();
        }
        if(!is_null($search)){
            $request_parameters['search'] = $search->__toString();
        }
        if(!is_null($sampling_method)){
            $request_parameters['sampling_method'] = $sampling_method->__toString();
        }
        $response = $request->send($request_parameters, $header_parameters);
        $data = $response->get_data();
        return $data;
    }

	/**
	 * @param VO\Token               $token
	 * @param VO\Integer|null        $current_page
	 * @param VO\Integer|null        $per_page
	 * @param VO\StringVO|null       $order_by_field
	 * @param VO\StringVO|null       $order_by_direction
	 * @param VO\StringVO|null       $search
	 * @param VO\MemberID|null       $assessor_id
	 * @param VO\OccupationID|null   $occupation_id
	 * @param VO\OrganisationID|null $organisation_id
	 * @param VO\Flag                $unique_learner
	 *
	 * @return \AcademyHQ\API\HTTP\Response\json
	 * @throws \AcademyHQ\API\HTTP\Response\Exception\ResponseException
	 */
	public function listLearners(
		VO\Token $token,
        VO\Integer $current_page = null,
        VO\Integer $per_page = null,
        VO\StringVO $order_by_field = null,
        VO\StringVO $order_by_direction = null,
        VO\StringVO $search = null,
{'fraction_non_alphanumeric': 0.13820570150922304, 'fraction_numerical': 6.987143655673561e-05, 'mean_word_length': 2.6690592155857473, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 88, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '522384', 'n_tokens_mistral': 4650, 'n_tokens_neox': 4383, 'n_words': 685}