LocationServiceRequest.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace AlibabaCloud\Client\Regions;
  3. use AlibabaCloud\Client\Request\Request;
  4. use AlibabaCloud\Client\Request\RpcRequest;
  5. use AlibabaCloud\Client\Exception\ClientException;
  6. /**
  7. * Class LocationServiceRequest
  8. *
  9. * @package AlibabaCloud\Client\Regions
  10. */
  11. class LocationServiceRequest extends RpcRequest
  12. {
  13. /**
  14. * LocationServiceRequest constructor.
  15. *
  16. * @param Request $request
  17. * @param string $domain
  18. *
  19. * @throws ClientException
  20. */
  21. public function __construct(Request $request, $domain)
  22. {
  23. parent::__construct();
  24. $this->product('Location');
  25. $this->version('2015-06-12');
  26. $this->action('DescribeEndpoints');
  27. $this->regionId('cn-hangzhou');
  28. $this->format('JSON');
  29. $this->options['query']['Id'] = $request->realRegionId();
  30. $this->options['query']['ServiceCode'] = $request->serviceCode;
  31. $this->options['query']['Type'] = $request->endpointType;
  32. $this->client($request->client);
  33. $this->host($domain);
  34. if (isset($request->options['timeout'])) {
  35. $this->timeout($request->options['timeout']);
  36. }
  37. if (isset($request->options['connect_timeout'])) {
  38. $this->connectTimeout($request->options['connect_timeout']);
  39. }
  40. }
  41. }