| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- // This file is auto-generated, don't edit it. Thanks.
- namespace AlibabaCloud\SDK\OpenPlatform\V20191219;
- use AlibabaCloud\Endpoint\Endpoint;
- use AlibabaCloud\SDK\OpenPlatform\V20191219\Models\AuthorizeFileUploadRequest;
- use AlibabaCloud\SDK\OpenPlatform\V20191219\Models\AuthorizeFileUploadResponse;
- use AlibabaCloud\Tea\Rpc\Rpc;
- use AlibabaCloud\Tea\Tea;
- use AlibabaCloud\Tea\Utils\Utils;
- use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions;
- class OpenPlatform extends Rpc
- {
- public function __construct($config)
- {
- parent::__construct($config);
- $this->_endpointRule = '';
- $this->checkConfig($config);
- $this->_endpoint = $this->getEndpoint('openplatform', $this->_regionId, $this->_endpointRule, $this->_network, $this->_suffix, $this->_endpointMap, $this->_endpoint);
- }
- /**
- * @param AuthorizeFileUploadRequest $request
- * @param RuntimeOptions $runtime
- *
- * @return AuthorizeFileUploadResponse
- */
- public function authorizeFileUploadWithOptions($request, $runtime)
- {
- Utils::validateModel($request);
- return AuthorizeFileUploadResponse::fromMap($this->doRequest('AuthorizeFileUpload', 'HTTPS', 'GET', '2019-12-19', 'AK', Tea::merge($request), null, $runtime));
- }
- /**
- * @param AuthorizeFileUploadRequest $request
- *
- * @return AuthorizeFileUploadResponse
- */
- public function authorizeFileUpload($request)
- {
- $runtime = new RuntimeOptions([]);
- return $this->authorizeFileUploadWithOptions($request, $runtime);
- }
- /**
- * @param string $productId
- * @param string $regionId
- * @param string $endpointRule
- * @param string $network
- * @param string $suffix
- * @param string[] $endpointMap
- * @param string $endpoint
- *
- * @return string
- */
- public function getEndpoint($productId, $regionId, $endpointRule, $network, $suffix, $endpointMap, $endpoint)
- {
- if (!Utils::empty_($endpoint)) {
- return $endpoint;
- }
- if (!Utils::isUnset($endpointMap) && !Utils::empty_(@$endpointMap[$regionId])) {
- return @$endpointMap[$regionId];
- }
- return Endpoint::getEndpointRules($productId, $regionId, $endpointRule, $network, $suffix);
- }
- }
|