in php/src/OpenApiClient.php [205:263]
public function __construct($config)
{
if (is_null($config)) {
throw new ClientException([
'code' => 'ParameterMissing',
'message' => '\'config\' can not be unset',
]);
}
if ((!is_null($config->accessKeyId) && $config->accessKeyId != '') && (!is_null($config->accessKeySecret) && $config->accessKeySecret != '')) {
if (!is_null($config->securityToken) && $config->securityToken != '') {
$config->type = 'sts';
} else {
$config->type = 'access_key';
}
$credentialConfig = new Config([
'accessKeyId' => $config->accessKeyId,
'type' => $config->type,
'accessKeySecret' => $config->accessKeySecret,
]);
$credentialConfig->securityToken = $config->securityToken;
$this->_credential = new Credential($credentialConfig);
} else if (!is_null($config->bearerToken) && $config->bearerToken != '') {
$cc = new Config([
'type' => 'bearer',
'bearerToken' => $config->bearerToken,
]);
$this->_credential = new Credential($cc);
} else if (!is_null($config->credential)) {
$this->_credential = $config->credential;
}
$this->_endpoint = $config->endpoint;
$this->_endpointType = $config->endpointType;
$this->_network = $config->network;
$this->_suffix = $config->suffix;
$this->_protocol = $config->protocol;
$this->_method = $config->method;
$this->_regionId = $config->regionId;
$this->_userAgent = $config->userAgent;
$this->_readTimeout = $config->readTimeout;
$this->_connectTimeout = $config->connectTimeout;
$this->_httpProxy = $config->httpProxy;
$this->_httpsProxy = $config->httpsProxy;
$this->_noProxy = $config->noProxy;
$this->_socks5Proxy = $config->socks5Proxy;
$this->_socks5NetWork = $config->socks5NetWork;
$this->_maxIdleConns = $config->maxIdleConns;
$this->_signatureVersion = $config->signatureVersion;
$this->_signatureAlgorithm = $config->signatureAlgorithm;
$this->_globalParameters = $config->globalParameters;
$this->_key = $config->key;
$this->_cert = $config->cert;
$this->_ca = $config->ca;
$this->_disableHttp2 = $config->disableHttp2;
$this->_retryOptions = $config->retryOptions;
$this->_tlsMinVersion = $config->tlsMinVersion;
}