<?php
namespace Fifa\ConnectId\Sdk\Environment;

use Fifa\ConnectId\Sdk\Api\Resource;
use Fifa\ConnectServiceBus\Sdk\Authentication\Model\ClientCredentials;
use Fifa\ConnectServiceBus\Sdk\Environment\EnvironmentInterface as ConnectServiceBusEnvironmentInterface;

/**
 * Interface EnvironmentInterface
 * @package Fifa\ConnectId\Sdk\Environment
 */
interface EnvironmentInterface
{
    /**
     * Returns Api Resource for hashing service
     *
     * @param ClientCredentials $clientCredentials
     * @return Resource\HashApi
     */
    public function getHashingApiResource(ClientCredentials $clientCredentials): Resource\HashApi;

    /**
     * Returns Api Resource for person service
     *
     * @param ClientCredentials $clientCredentials
     * @return Resource\PersonApi
     */
    public function getPersonApiResource(ClientCredentials $clientCredentials): Resource\PersonApi;

    /**
     * Returns Api Resource for organisation service
     *
     * @param ClientCredentials $clientCredentials
     * @return Resource\OrganisationApi
     */
    public function getOrganisationApiResource(ClientCredentials $clientCredentials): Resource\OrganisationApi;

    /**
     * Returns Api Resource for Facility service
     *
     * @param ClientCredentials $clientCredentials
     * @return Resource\FacilityApi
     */
    public function getFacilityApiResource(ClientCredentials $clientCredentials): Resource\FacilityApi;

    /**
     * Returns Api Resource for data holder service
     *
     * @param ClientCredentials $clientCredentials
     * @return Resource\DataHolderApi
     */
    public function getDataHolderApiResource(ClientCredentials $clientCredentials): Resource\DataHolderApi;

    /**
     * String representation of the object
     *
     * @return string
     */
    public function __toString();

    /**
     * Getter for IdDirectoryUrl
     *
     * @return string
     */
    public function getIdDirectoryUrl(): string;

    /**
     * Getter for HashingServiceUrl
     *
     * @return string
     */
    public function getHashingServiceUrl(): string;

    /**
     * Getter for Tenant
     * @return string
     */
    public function getTenant(): string;

    /**
     * Getter for service bus environment
     *
     * @return ConnectServiceBusEnvironmentInterface
     */
    public function getServiceBusEnvironment(): ConnectServiceBusEnvironmentInterface;

    /**
     * Setter for Curl timeout (CURLOPT_TIMEOUT)
     *
     * @param int $timeoutInSeconds
     * @return EnvironmentInterface
     */
    public function setCurlTimeout(int $timeoutInSeconds): EnvironmentInterface;

    /**
     * Setter for Curl connection timeout (CURLOPT_CONNECTTIMEOUT)
     *
     * @param $timeoutInSeconds
     * @return EnvironmentInterface
     */
    public function setCurlConnectionTimeout($timeoutInSeconds): EnvironmentInterface;
}