CloudHsmClient.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace Aws\CloudHsm;
  3. use Aws\Api\ApiProvider;
  4. use Aws\Api\DocModel;
  5. use Aws\Api\Service;
  6. use Aws\AwsClient;
  7. /**
  8. * This client is used to interact with **AWS CloudHSM**.
  9. *
  10. * @method \Aws\Result addTagsToResource(array $args = [])
  11. * @method \GuzzleHttp\Promise\Promise addTagsToResourceAsync(array $args = [])
  12. * @method \Aws\Result createHapg(array $args = [])
  13. * @method \GuzzleHttp\Promise\Promise createHapgAsync(array $args = [])
  14. * @method \Aws\Result createHsm(array $args = [])
  15. * @method \GuzzleHttp\Promise\Promise createHsmAsync(array $args = [])
  16. * @method \Aws\Result createLunaClient(array $args = [])
  17. * @method \GuzzleHttp\Promise\Promise createLunaClientAsync(array $args = [])
  18. * @method \Aws\Result deleteHapg(array $args = [])
  19. * @method \GuzzleHttp\Promise\Promise deleteHapgAsync(array $args = [])
  20. * @method \Aws\Result deleteHsm(array $args = [])
  21. * @method \GuzzleHttp\Promise\Promise deleteHsmAsync(array $args = [])
  22. * @method \Aws\Result deleteLunaClient(array $args = [])
  23. * @method \GuzzleHttp\Promise\Promise deleteLunaClientAsync(array $args = [])
  24. * @method \Aws\Result describeHapg(array $args = [])
  25. * @method \GuzzleHttp\Promise\Promise describeHapgAsync(array $args = [])
  26. * @method \Aws\Result describeHsm(array $args = [])
  27. * @method \GuzzleHttp\Promise\Promise describeHsmAsync(array $args = [])
  28. * @method \Aws\Result describeLunaClient(array $args = [])
  29. * @method \GuzzleHttp\Promise\Promise describeLunaClientAsync(array $args = [])
  30. * @method \Aws\Result getConfig(array $args = [])
  31. * @method \GuzzleHttp\Promise\Promise getConfigAsync(array $args = [])
  32. * @method \Aws\Result listAvailableZones(array $args = [])
  33. * @method \GuzzleHttp\Promise\Promise listAvailableZonesAsync(array $args = [])
  34. * @method \Aws\Result listHapgs(array $args = [])
  35. * @method \GuzzleHttp\Promise\Promise listHapgsAsync(array $args = [])
  36. * @method \Aws\Result listHsms(array $args = [])
  37. * @method \GuzzleHttp\Promise\Promise listHsmsAsync(array $args = [])
  38. * @method \Aws\Result listLunaClients(array $args = [])
  39. * @method \GuzzleHttp\Promise\Promise listLunaClientsAsync(array $args = [])
  40. * @method \Aws\Result listTagsForResource(array $args = [])
  41. * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
  42. * @method \Aws\Result modifyHapg(array $args = [])
  43. * @method \GuzzleHttp\Promise\Promise modifyHapgAsync(array $args = [])
  44. * @method \Aws\Result modifyHsm(array $args = [])
  45. * @method \GuzzleHttp\Promise\Promise modifyHsmAsync(array $args = [])
  46. * @method \Aws\Result modifyLunaClient(array $args = [])
  47. * @method \GuzzleHttp\Promise\Promise modifyLunaClientAsync(array $args = [])
  48. * @method \Aws\Result removeTagsFromResource(array $args = [])
  49. * @method \GuzzleHttp\Promise\Promise removeTagsFromResourceAsync(array $args = [])
  50. */
  51. class CloudHsmClient extends AwsClient
  52. {
  53. public function __call($name, array $args)
  54. {
  55. // Overcomes a naming collision with `AwsClient::getConfig`.
  56. if (lcfirst($name) === 'getConfigFiles') {
  57. $name = 'GetConfig';
  58. } elseif (lcfirst($name) === 'getConfigFilesAsync') {
  59. $name = 'GetConfigAsync';
  60. }
  61. return parent::__call($name, $args);
  62. }
  63. /**
  64. * @internal
  65. * @codeCoverageIgnore
  66. */
  67. public static function applyDocFilters(array $api, array $docs)
  68. {
  69. // Overcomes a naming collision with `AwsClient::getConfig`.
  70. $api['operations']['GetConfigFiles'] = $api['operations']['GetConfig'];
  71. $docs['operations']['GetConfigFiles'] = $docs['operations']['GetConfig'];
  72. unset($api['operations']['GetConfig'], $docs['operations']['GetConfig']);
  73. ksort($api['operations']);
  74. return [
  75. new Service($api, ApiProvider::defaultProvider()),
  76. new DocModel($docs)
  77. ];
  78. }
  79. }