<?php
/**
 * Ias
 *
 * @category Jdcloud
 * @package  Jdcloud\Ias
 * @author   Jdcloud <jdcloud-api@jd.com>
 * @license  Apache-2.0 http://www.apache.org/licenses/LICENSE-2.0
 * @link     https://www.jdcloud.com/help/faq
 */

namespace Jdcloud\Ias;

use Jdcloud\JdCloudClient;
use Jdcloud\Api\Service;
use Jdcloud\Api\DocModel;
use Jdcloud\Api\ApiProvider;
use Jdcloud\PresignUrlMiddleware;

/**
 * Client used to interact with ias.
 *
 * @method \Jdcloud\Result apps(array $args = [])
 * @method \GuzzleHttp\Promise\Promise appsAsync(array $args = [])
 * @method \Jdcloud\Result appDetail(array $args = [])
 * @method \GuzzleHttp\Promise\Promise appDetailAsync(array $args = [])
 * @method \Jdcloud\Result state(array $args = [])
 * @method \GuzzleHttp\Promise\Promise stateAsync(array $args = [])
 * @method \Jdcloud\Result createApp(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createAppAsync(array $args = [])
 * @method \Jdcloud\Result getApp(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getAppAsync(array $args = [])
 * @method \Jdcloud\Result updateApp(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateAppAsync(array $args = [])
 * @method \Jdcloud\Result deleteApp(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteAppAsync(array $args = [])
 * @method \Jdcloud\Result getApps(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getAppsAsync(array $args = [])
 */
class IasClient extends JdCloudClient
{
    public function __construct(array $args)
    {
        $args['with_resolved'] = function (array $args) {
            $this->getHandlerList()->appendInit(
                PresignUrlMiddleware::wrap(
                    $this,
                    $args['endpoint_provider'],
                    [
                        'operations' => [
                        ],
                        'service' => 'ias',
                        'presign_param' => 'PresignedUrl',
                    ]
                ),
                'ias'
            );
        };

        parent::__construct($args);
    }
}