<?php
/**
 * PersonApi
 * PHP version 5
 *
 * @category Class
 * @package  Fifa\ConnectId\Sdk\Api
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * FIFA Connect ID - ID Directory V6
 *
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: v6
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 *
 */

/**
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */

namespace Fifa\ConnectId\Sdk\Api\Resource;

use \Fifa\ConnectId\Sdk\Api\ApiClient;
use \Fifa\ConnectId\Sdk\Api\ApiException;
use \Fifa\ConnectId\Sdk\Api\Configuration;
use \Fifa\ConnectId\Sdk\Api\ObjectSerializer;

/**
 * PersonApi Class Doc Comment
 *
 * @category Class
 * @package  Fifa\ConnectId\Sdk\Api
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class PersonApi
{
    /**
     * API Client
     *
     * @var \Fifa\ConnectId\Sdk\Api\ApiClient instance of the ApiClient
     */
    protected $apiClient;

    /**
     * Constructor
     *
     * @param \Fifa\ConnectId\Sdk\Api\ApiClient|null $apiClient The api client to use
     */
    public function __construct(\Fifa\ConnectId\Sdk\Api\ApiClient $apiClient = null)
    {
        if ($apiClient === null) {
            $apiClient = new ApiClient();
        }

        $this->apiClient = $apiClient;
    }

    /**
     * Get API client
     *
     * @return \Fifa\ConnectId\Sdk\Api\ApiClient get the API client
     */
    public function getApiClient()
    {
        return $this->apiClient;
    }

    /**
     * Set the API client
     *
     * @param \Fifa\ConnectId\Sdk\Api\ApiClient $apiClient set the API client
     *
     * @return PersonApi
     */
    public function setApiClient(\Fifa\ConnectId\Sdk\Api\ApiClient $apiClient)
    {
        $this->apiClient = $apiClient;
        return $this;
    }

    /**
     * Operation personAddRegistrationsByForce
     *
     * Adds new person registrations.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\AddRegistrationsRequestType $body  (required)
     * @param bool $force Ignores FIFA registration rules violation check (optional, default to false)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\PersonType
     */
    public function personAddRegistrationsByForce($body, $force = null, $x_actor_details = null)
    {
        list($response) = $this->personAddRegistrationsByForceWithHttpInfo($body, $force, $x_actor_details);
        return $response;
    }

    /**
     * Operation personAddRegistrationsByForceWithHttpInfo
     *
     * Adds new person registrations.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\AddRegistrationsRequestType $body  (required)
     * @param bool $force Ignores FIFA registration rules violation check (optional, default to false)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\PersonType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personAddRegistrationsByForceWithHttpInfo($body, $force = null, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling personAddRegistrationsByForce');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/addregistrations";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // query params
        if ($force !== null) {
            $queryParams['force'] = $this->apiClient->getSerializer()->toQueryValue($force);
        }
        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\PersonType',
                '/api/v6/person/addregistrations'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 201:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personBulkDeactivateRegistrations
     *
     * Deactivates given set of registrations.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\BulkDeactivateRegistrationsRequestType $body Request contains a list of pairs: Person FIFA ID with Person Registrations that should be deactivated (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\BulkDeactivateRegistrationsResponseType
     */
    public function personBulkDeactivateRegistrations($body, $x_actor_details = null)
    {
        list($response) = $this->personBulkDeactivateRegistrationsWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation personBulkDeactivateRegistrationsWithHttpInfo
     *
     * Deactivates given set of registrations.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\BulkDeactivateRegistrationsRequestType $body Request contains a list of pairs: Person FIFA ID with Person Registrations that should be deactivated (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\BulkDeactivateRegistrationsResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personBulkDeactivateRegistrationsWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling personBulkDeactivateRegistrations');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/bulkdeactivateregistrations";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\BulkDeactivateRegistrationsResponseType',
                '/api/v6/person/bulkdeactivateregistrations'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\BulkDeactivateRegistrationsResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BulkDeactivateRegistrationsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personForceRegister
     *
     * Registers a new person even if possible duplicates are found.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\RegisterPersonRequestType $body Person data with name hashes (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType
     */
    public function personForceRegister($body, $x_actor_details = null)
    {
        list($response) = $this->personForceRegisterWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation personForceRegisterWithHttpInfo
     *
     * Registers a new person even if possible duplicates are found.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\RegisterPersonRequestType $body Person data with name hashes (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personForceRegisterWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling personForceRegister');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/forceregister";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType',
                '/api/v6/person/forceregister'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 201:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personGetByPersonfifaid
     *
     * Gets person data associated with the specified FIFA Unique Identifier.
     *
     * @param string $person_fifa_id FIFA Unique Identifier (required)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\PersonType
     */
    public function personGetByPersonfifaid($person_fifa_id)
    {
        list($response) = $this->personGetByPersonfifaidWithHttpInfo($person_fifa_id);
        return $response;
    }

    /**
     * Operation personGetByPersonfifaidWithHttpInfo
     *
     * Gets person data associated with the specified FIFA Unique Identifier.
     *
     * @param string $person_fifa_id FIFA Unique Identifier (required)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\PersonType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personGetByPersonfifaidWithHttpInfo($person_fifa_id)
    {
        // verify the required parameter 'person_fifa_id' is set
        if ($person_fifa_id === null) {
            throw new \InvalidArgumentException('Missing the required parameter $person_fifa_id when calling personGetByPersonfifaid');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/get";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);

        // query params
        if ($person_fifa_id !== null) {
            $queryParams['personFifaId'] = $this->apiClient->getSerializer()->toQueryValue($person_fifa_id);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'GET',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\PersonType',
                '/api/v6/person/get'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 301:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personGetDuplicates
     *
     * Gets a list of people this person may be duplicated with.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesRequestType $body Person data with name hashes (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesResponseType
     */
    public function personGetDuplicates($body, $x_actor_details = null)
    {
        list($response) = $this->personGetDuplicatesWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation personGetDuplicatesWithHttpInfo
     *
     * Gets a list of people this person may be duplicated with.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesRequestType $body Person data with name hashes (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personGetDuplicatesWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling personGetDuplicates');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/getduplicates";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesResponseType',
                '/api/v6/person/getduplicates'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personGetDuplicatesByFIFAId
     *
     * Gets a list of people this person may be duplicated with.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesByFIFAIdRequestType $body Request with person FIFA Unique Identifier and trusted organisations&#39; FIFA Unique Identifiers. (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesOfRegisteredPersonResponseType
     */
    public function personGetDuplicatesByFIFAId($body, $x_actor_details = null)
    {
        list($response) = $this->personGetDuplicatesByFIFAIdWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation personGetDuplicatesByFIFAIdWithHttpInfo
     *
     * Gets a list of people this person may be duplicated with.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesByFIFAIdRequestType $body Request with person FIFA Unique Identifier and trusted organisations&#39; FIFA Unique Identifiers. (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesOfRegisteredPersonResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personGetDuplicatesByFIFAIdWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling personGetDuplicatesByFIFAId');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/getduplicatesbyfifaid";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesOfRegisteredPersonResponseType',
                '/api/v6/person/getduplicatesbyfifaid'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesOfRegisteredPersonResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesOfRegisteredPersonResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personGetMergedSecondaryFifaIdsByPersonfifaid
     *
     * 
     *
     * @param string $person_fifa_id  (required)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return string[]
     */
    public function personGetMergedSecondaryFifaIdsByPersonfifaid($person_fifa_id)
    {
        list($response) = $this->personGetMergedSecondaryFifaIdsByPersonfifaidWithHttpInfo($person_fifa_id);
        return $response;
    }

    /**
     * Operation personGetMergedSecondaryFifaIdsByPersonfifaidWithHttpInfo
     *
     * 
     *
     * @param string $person_fifa_id  (required)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of string[], HTTP status code, HTTP response headers (array of strings)
     */
    public function personGetMergedSecondaryFifaIdsByPersonfifaidWithHttpInfo($person_fifa_id)
    {
        // verify the required parameter 'person_fifa_id' is set
        if ($person_fifa_id === null) {
            throw new \InvalidArgumentException('Missing the required parameter $person_fifa_id when calling personGetMergedSecondaryFifaIdsByPersonfifaid');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/getmergedsecondaryfifaids";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);

        // query params
        if ($person_fifa_id !== null) {
            $queryParams['personFifaId'] = $this->apiClient->getSerializer()->toQueryValue($person_fifa_id);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'GET',
                $queryParams,
                $httpBody,
                $headerParams,
                'string[]',
                '/api/v6/person/getmergedsecondaryfifaids'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, 'string[]', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string[]', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personGetPrimaryDataProviderRegistrationByPersonfifaid
     *
     * Gets registration belonging to the primary data provider
     *
     * @param string $person_fifa_id FIFA Unique Identifier (required)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\RegistrationType
     */
    public function personGetPrimaryDataProviderRegistrationByPersonfifaid($person_fifa_id)
    {
        list($response) = $this->personGetPrimaryDataProviderRegistrationByPersonfifaidWithHttpInfo($person_fifa_id);
        return $response;
    }

    /**
     * Operation personGetPrimaryDataProviderRegistrationByPersonfifaidWithHttpInfo
     *
     * Gets registration belonging to the primary data provider
     *
     * @param string $person_fifa_id FIFA Unique Identifier (required)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\RegistrationType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personGetPrimaryDataProviderRegistrationByPersonfifaidWithHttpInfo($person_fifa_id)
    {
        // verify the required parameter 'person_fifa_id' is set
        if ($person_fifa_id === null) {
            throw new \InvalidArgumentException('Missing the required parameter $person_fifa_id when calling personGetPrimaryDataProviderRegistrationByPersonfifaid');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/getprimarydataproviderregistration";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);

        // query params
        if ($person_fifa_id !== null) {
            $queryParams['personFifaId'] = $this->apiClient->getSerializer()->toQueryValue($person_fifa_id);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'GET',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\RegistrationType',
                '/api/v6/person/getprimarydataproviderregistration'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\RegistrationType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\RegistrationType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 301:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personMerge
     *
     * Merges two persons. Returns the primary person.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\MergePersonsRequestType $body Request with secondary and primary persons FIFA Unique Identifiers. (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\PersonType
     */
    public function personMerge($body, $x_actor_details = null)
    {
        list($response) = $this->personMergeWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation personMergeWithHttpInfo
     *
     * Merges two persons. Returns the primary person.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\MergePersonsRequestType $body Request with secondary and primary persons FIFA Unique Identifiers. (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\PersonType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personMergeWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling personMerge');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/merge";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\PersonType',
                '/api/v6/person/merge'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 409:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\ConflictResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personRegister
     *
     * Registers a new person and assigns FIFA Unique Identifier. If duplicates are found the person is not registered.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\RegisterPersonRequestType $body Person data with name hashes (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType
     */
    public function personRegister($body, $x_actor_details = null)
    {
        list($response) = $this->personRegisterWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation personRegisterWithHttpInfo
     *
     * Registers a new person and assigns FIFA Unique Identifier. If duplicates are found the person is not registered.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\RegisterPersonRequestType $body Person data with name hashes (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personRegisterWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling personRegister');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/register";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType',
                '/api/v6/person/register'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 201:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 409:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personUnmerge
     *
     * Reverts merge operation. Returns the secondary person which will be active again when unmerge operations is completed.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\UnmergePersonsRequestType $body Request with secondary and primary persons FIFA Unique Identifiers. (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\PersonType
     */
    public function personUnmerge($body, $x_actor_details = null)
    {
        list($response) = $this->personUnmergeWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation personUnmergeWithHttpInfo
     *
     * Reverts merge operation. Returns the secondary person which will be active again when unmerge operations is completed.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\UnmergePersonsRequestType $body Request with secondary and primary persons FIFA Unique Identifiers. (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\PersonType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personUnmergeWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling personUnmerge');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/unmerge";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\PersonType',
                '/api/v6/person/unmerge'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 409:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\ConflictResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personUpdatePersonByForce
     *
     * Updates person data.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\UpdatePersonRequestType $body Request with person FIFA Unique Identifier and data to be updated. (required)
     * @param bool $force Ignores FIFA registration rules violation check (optional, default to false)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\PersonType
     */
    public function personUpdatePersonByForce($body, $force = null, $x_actor_details = null)
    {
        list($response) = $this->personUpdatePersonByForceWithHttpInfo($body, $force, $x_actor_details);
        return $response;
    }

    /**
     * Operation personUpdatePersonByForceWithHttpInfo
     *
     * Updates person data.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\UpdatePersonRequestType $body Request with person FIFA Unique Identifier and data to be updated. (required)
     * @param bool $force Ignores FIFA registration rules violation check (optional, default to false)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\PersonType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personUpdatePersonByForceWithHttpInfo($body, $force = null, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling personUpdatePersonByForce');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/updateperson";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // query params
        if ($force !== null) {
            $queryParams['force'] = $this->apiClient->getSerializer()->toQueryValue($force);
        }
        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\PersonType',
                '/api/v6/person/updateperson'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 409:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\GetDuplicatesOfRegisteredPersonResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation personUpdateRegistrationsByForce
     *
     * Updates specified person registrations.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\UpdateRegistrationsRequestType $body  (required)
     * @param bool $force Ignores FIFA registration rules violation check (optional, default to false)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\PersonType
     */
    public function personUpdateRegistrationsByForce($body, $force = null, $x_actor_details = null)
    {
        list($response) = $this->personUpdateRegistrationsByForceWithHttpInfo($body, $force, $x_actor_details);
        return $response;
    }

    /**
     * Operation personUpdateRegistrationsByForceWithHttpInfo
     *
     * Updates specified person registrations.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\UpdateRegistrationsRequestType $body  (required)
     * @param bool $force Ignores FIFA registration rules violation check (optional, default to false)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\PersonType, HTTP status code, HTTP response headers (array of strings)
     */
    public function personUpdateRegistrationsByForceWithHttpInfo($body, $force = null, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling personUpdateRegistrationsByForce');
        }
        // parse inputs
        $resourcePath = "/api/v6/person/updateregistrations";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // query params
        if ($force !== null) {
            $queryParams['force'] = $this->apiClient->getSerializer()->toQueryValue($force);
        }
        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\PersonType',
                '/api/v6/person/updateregistrations'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\PersonType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }
}

