CmsServiceClient.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?php
  2. // GENERATED CODE -- DO NOT EDIT!
  3. namespace Ydb\Cms\V1;
  4. /**
  5. * CMS stands for Cluster Management System. CmsService provides some
  6. * functionality for managing cluster, i.e. managing YDB Database
  7. * instances for example.
  8. *
  9. */
  10. class CmsServiceClient extends \Grpc\BaseStub {
  11. /**
  12. * @param string $hostname hostname
  13. * @param array $opts channel options
  14. * @param \Grpc\Channel $channel (optional) re-use channel object
  15. */
  16. public function __construct($hostname, $opts, $channel = null) {
  17. parent::__construct($hostname, $opts, $channel);
  18. }
  19. /**
  20. * Create a new database.
  21. * @param \Ydb\Cms\CreateDatabaseRequest $argument input argument
  22. * @param array $metadata metadata
  23. * @param array $options call options
  24. * @return \Grpc\UnaryCall
  25. */
  26. public function CreateDatabase(\Ydb\Cms\CreateDatabaseRequest $argument,
  27. $metadata = [], $options = []) {
  28. return $this->_simpleRequest('/Ydb.Cms.V1.CmsService/CreateDatabase',
  29. $argument,
  30. ['\Ydb\Cms\CreateDatabaseResponse', 'decode'],
  31. $metadata, $options);
  32. }
  33. /**
  34. * Get current database's status.
  35. * @param \Ydb\Cms\GetDatabaseStatusRequest $argument input argument
  36. * @param array $metadata metadata
  37. * @param array $options call options
  38. * @return \Grpc\UnaryCall
  39. */
  40. public function GetDatabaseStatus(\Ydb\Cms\GetDatabaseStatusRequest $argument,
  41. $metadata = [], $options = []) {
  42. return $this->_simpleRequest('/Ydb.Cms.V1.CmsService/GetDatabaseStatus',
  43. $argument,
  44. ['\Ydb\Cms\GetDatabaseStatusResponse', 'decode'],
  45. $metadata, $options);
  46. }
  47. /**
  48. * Alter database resources.
  49. * @param \Ydb\Cms\AlterDatabaseRequest $argument input argument
  50. * @param array $metadata metadata
  51. * @param array $options call options
  52. * @return \Grpc\UnaryCall
  53. */
  54. public function AlterDatabase(\Ydb\Cms\AlterDatabaseRequest $argument,
  55. $metadata = [], $options = []) {
  56. return $this->_simpleRequest('/Ydb.Cms.V1.CmsService/AlterDatabase',
  57. $argument,
  58. ['\Ydb\Cms\AlterDatabaseResponse', 'decode'],
  59. $metadata, $options);
  60. }
  61. /**
  62. * List all databases.
  63. * @param \Ydb\Cms\ListDatabasesRequest $argument input argument
  64. * @param array $metadata metadata
  65. * @param array $options call options
  66. * @return \Grpc\UnaryCall
  67. */
  68. public function ListDatabases(\Ydb\Cms\ListDatabasesRequest $argument,
  69. $metadata = [], $options = []) {
  70. return $this->_simpleRequest('/Ydb.Cms.V1.CmsService/ListDatabases',
  71. $argument,
  72. ['\Ydb\Cms\ListDatabasesResponse', 'decode'],
  73. $metadata, $options);
  74. }
  75. /**
  76. * Remove database.
  77. * @param \Ydb\Cms\RemoveDatabaseRequest $argument input argument
  78. * @param array $metadata metadata
  79. * @param array $options call options
  80. * @return \Grpc\UnaryCall
  81. */
  82. public function RemoveDatabase(\Ydb\Cms\RemoveDatabaseRequest $argument,
  83. $metadata = [], $options = []) {
  84. return $this->_simpleRequest('/Ydb.Cms.V1.CmsService/RemoveDatabase',
  85. $argument,
  86. ['\Ydb\Cms\RemoveDatabaseResponse', 'decode'],
  87. $metadata, $options);
  88. }
  89. /**
  90. * Describe supported database options.
  91. * @param \Ydb\Cms\DescribeDatabaseOptionsRequest $argument input argument
  92. * @param array $metadata metadata
  93. * @param array $options call options
  94. * @return \Grpc\UnaryCall
  95. */
  96. public function DescribeDatabaseOptions(\Ydb\Cms\DescribeDatabaseOptionsRequest $argument,
  97. $metadata = [], $options = []) {
  98. return $this->_simpleRequest('/Ydb.Cms.V1.CmsService/DescribeDatabaseOptions',
  99. $argument,
  100. ['\Ydb\Cms\DescribeDatabaseOptionsResponse', 'decode'],
  101. $metadata, $options);
  102. }
  103. }