GetDatabaseStatusResult.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_cms.proto
  4. namespace Ydb\Cms;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Generated from protobuf message <code>Ydb.Cms.GetDatabaseStatusResult</code>
  10. */
  11. class GetDatabaseStatusResult extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Full path to database's home dir.
  15. *
  16. * Generated from protobuf field <code>string path = 1;</code>
  17. */
  18. protected $path = '';
  19. /**
  20. * Current database state.
  21. *
  22. * Generated from protobuf field <code>.Ydb.Cms.GetDatabaseStatusResult.State state = 2;</code>
  23. */
  24. protected $state = 0;
  25. /**
  26. * Database resources allocated by CMS.
  27. *
  28. * Generated from protobuf field <code>.Ydb.Cms.Resources allocated_resources = 4;</code>
  29. */
  30. protected $allocated_resources = null;
  31. /**
  32. * Externally allocated database resources registered in CMS.
  33. *
  34. * Generated from protobuf field <code>repeated .Ydb.Cms.AllocatedComputationalUnit registered_resources = 5;</code>
  35. */
  36. private $registered_resources;
  37. /**
  38. * Current database generation. Incremented at each successful
  39. * alter request.
  40. *
  41. * Generated from protobuf field <code>uint64 generation = 6;</code>
  42. */
  43. protected $generation = 0;
  44. /**
  45. * Current quotas for schema operations
  46. *
  47. * Generated from protobuf field <code>.Ydb.Cms.SchemaOperationQuotas schema_operation_quotas = 9;</code>
  48. */
  49. protected $schema_operation_quotas = null;
  50. /**
  51. * Current quotas for the database
  52. *
  53. * Generated from protobuf field <code>.Ydb.Cms.DatabaseQuotas database_quotas = 10;</code>
  54. */
  55. protected $database_quotas = null;
  56. protected $resources_kind;
  57. /**
  58. * Constructor.
  59. *
  60. * @param array $data {
  61. * Optional. Data for populating the Message object.
  62. *
  63. * @type string $path
  64. * Full path to database's home dir.
  65. * @type int $state
  66. * Current database state.
  67. * @type \Ydb\Cms\Resources $required_resources
  68. * Database resources requested for allocation.
  69. * @type \Ydb\Cms\Resources $required_shared_resources
  70. * @type \Ydb\Cms\ServerlessResources $serverless_resources
  71. * @type \Ydb\Cms\Resources $allocated_resources
  72. * Database resources allocated by CMS.
  73. * @type array<\Ydb\Cms\AllocatedComputationalUnit>|\Google\Protobuf\Internal\RepeatedField $registered_resources
  74. * Externally allocated database resources registered in CMS.
  75. * @type int|string $generation
  76. * Current database generation. Incremented at each successful
  77. * alter request.
  78. * @type \Ydb\Cms\SchemaOperationQuotas $schema_operation_quotas
  79. * Current quotas for schema operations
  80. * @type \Ydb\Cms\DatabaseQuotas $database_quotas
  81. * Current quotas for the database
  82. * }
  83. */
  84. public function __construct($data = NULL) {
  85. \GPBMetadata\Protos\YdbCms::initOnce();
  86. parent::__construct($data);
  87. }
  88. /**
  89. * Full path to database's home dir.
  90. *
  91. * Generated from protobuf field <code>string path = 1;</code>
  92. * @return string
  93. */
  94. public function getPath()
  95. {
  96. return $this->path;
  97. }
  98. /**
  99. * Full path to database's home dir.
  100. *
  101. * Generated from protobuf field <code>string path = 1;</code>
  102. * @param string $var
  103. * @return $this
  104. */
  105. public function setPath($var)
  106. {
  107. GPBUtil::checkString($var, True);
  108. $this->path = $var;
  109. return $this;
  110. }
  111. /**
  112. * Current database state.
  113. *
  114. * Generated from protobuf field <code>.Ydb.Cms.GetDatabaseStatusResult.State state = 2;</code>
  115. * @return int
  116. */
  117. public function getState()
  118. {
  119. return $this->state;
  120. }
  121. /**
  122. * Current database state.
  123. *
  124. * Generated from protobuf field <code>.Ydb.Cms.GetDatabaseStatusResult.State state = 2;</code>
  125. * @param int $var
  126. * @return $this
  127. */
  128. public function setState($var)
  129. {
  130. GPBUtil::checkEnum($var, \Ydb\Cms\GetDatabaseStatusResult\State::class);
  131. $this->state = $var;
  132. return $this;
  133. }
  134. /**
  135. * Database resources requested for allocation.
  136. *
  137. * Generated from protobuf field <code>.Ydb.Cms.Resources required_resources = 3;</code>
  138. * @return \Ydb\Cms\Resources|null
  139. */
  140. public function getRequiredResources()
  141. {
  142. return $this->readOneof(3);
  143. }
  144. public function hasRequiredResources()
  145. {
  146. return $this->hasOneof(3);
  147. }
  148. /**
  149. * Database resources requested for allocation.
  150. *
  151. * Generated from protobuf field <code>.Ydb.Cms.Resources required_resources = 3;</code>
  152. * @param \Ydb\Cms\Resources $var
  153. * @return $this
  154. */
  155. public function setRequiredResources($var)
  156. {
  157. GPBUtil::checkMessage($var, \Ydb\Cms\Resources::class);
  158. $this->writeOneof(3, $var);
  159. return $this;
  160. }
  161. /**
  162. * Generated from protobuf field <code>.Ydb.Cms.Resources required_shared_resources = 7;</code>
  163. * @return \Ydb\Cms\Resources|null
  164. */
  165. public function getRequiredSharedResources()
  166. {
  167. return $this->readOneof(7);
  168. }
  169. public function hasRequiredSharedResources()
  170. {
  171. return $this->hasOneof(7);
  172. }
  173. /**
  174. * Generated from protobuf field <code>.Ydb.Cms.Resources required_shared_resources = 7;</code>
  175. * @param \Ydb\Cms\Resources $var
  176. * @return $this
  177. */
  178. public function setRequiredSharedResources($var)
  179. {
  180. GPBUtil::checkMessage($var, \Ydb\Cms\Resources::class);
  181. $this->writeOneof(7, $var);
  182. return $this;
  183. }
  184. /**
  185. * Generated from protobuf field <code>.Ydb.Cms.ServerlessResources serverless_resources = 8;</code>
  186. * @return \Ydb\Cms\ServerlessResources|null
  187. */
  188. public function getServerlessResources()
  189. {
  190. return $this->readOneof(8);
  191. }
  192. public function hasServerlessResources()
  193. {
  194. return $this->hasOneof(8);
  195. }
  196. /**
  197. * Generated from protobuf field <code>.Ydb.Cms.ServerlessResources serverless_resources = 8;</code>
  198. * @param \Ydb\Cms\ServerlessResources $var
  199. * @return $this
  200. */
  201. public function setServerlessResources($var)
  202. {
  203. GPBUtil::checkMessage($var, \Ydb\Cms\ServerlessResources::class);
  204. $this->writeOneof(8, $var);
  205. return $this;
  206. }
  207. /**
  208. * Database resources allocated by CMS.
  209. *
  210. * Generated from protobuf field <code>.Ydb.Cms.Resources allocated_resources = 4;</code>
  211. * @return \Ydb\Cms\Resources|null
  212. */
  213. public function getAllocatedResources()
  214. {
  215. return $this->allocated_resources;
  216. }
  217. public function hasAllocatedResources()
  218. {
  219. return isset($this->allocated_resources);
  220. }
  221. public function clearAllocatedResources()
  222. {
  223. unset($this->allocated_resources);
  224. }
  225. /**
  226. * Database resources allocated by CMS.
  227. *
  228. * Generated from protobuf field <code>.Ydb.Cms.Resources allocated_resources = 4;</code>
  229. * @param \Ydb\Cms\Resources $var
  230. * @return $this
  231. */
  232. public function setAllocatedResources($var)
  233. {
  234. GPBUtil::checkMessage($var, \Ydb\Cms\Resources::class);
  235. $this->allocated_resources = $var;
  236. return $this;
  237. }
  238. /**
  239. * Externally allocated database resources registered in CMS.
  240. *
  241. * Generated from protobuf field <code>repeated .Ydb.Cms.AllocatedComputationalUnit registered_resources = 5;</code>
  242. * @return \Google\Protobuf\Internal\RepeatedField
  243. */
  244. public function getRegisteredResources()
  245. {
  246. return $this->registered_resources;
  247. }
  248. /**
  249. * Externally allocated database resources registered in CMS.
  250. *
  251. * Generated from protobuf field <code>repeated .Ydb.Cms.AllocatedComputationalUnit registered_resources = 5;</code>
  252. * @param array<\Ydb\Cms\AllocatedComputationalUnit>|\Google\Protobuf\Internal\RepeatedField $var
  253. * @return $this
  254. */
  255. public function setRegisteredResources($var)
  256. {
  257. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Cms\AllocatedComputationalUnit::class);
  258. $this->registered_resources = $arr;
  259. return $this;
  260. }
  261. /**
  262. * Current database generation. Incremented at each successful
  263. * alter request.
  264. *
  265. * Generated from protobuf field <code>uint64 generation = 6;</code>
  266. * @return int|string
  267. */
  268. public function getGeneration()
  269. {
  270. return $this->generation;
  271. }
  272. /**
  273. * Current database generation. Incremented at each successful
  274. * alter request.
  275. *
  276. * Generated from protobuf field <code>uint64 generation = 6;</code>
  277. * @param int|string $var
  278. * @return $this
  279. */
  280. public function setGeneration($var)
  281. {
  282. GPBUtil::checkUint64($var);
  283. $this->generation = $var;
  284. return $this;
  285. }
  286. /**
  287. * Current quotas for schema operations
  288. *
  289. * Generated from protobuf field <code>.Ydb.Cms.SchemaOperationQuotas schema_operation_quotas = 9;</code>
  290. * @return \Ydb\Cms\SchemaOperationQuotas|null
  291. */
  292. public function getSchemaOperationQuotas()
  293. {
  294. return $this->schema_operation_quotas;
  295. }
  296. public function hasSchemaOperationQuotas()
  297. {
  298. return isset($this->schema_operation_quotas);
  299. }
  300. public function clearSchemaOperationQuotas()
  301. {
  302. unset($this->schema_operation_quotas);
  303. }
  304. /**
  305. * Current quotas for schema operations
  306. *
  307. * Generated from protobuf field <code>.Ydb.Cms.SchemaOperationQuotas schema_operation_quotas = 9;</code>
  308. * @param \Ydb\Cms\SchemaOperationQuotas $var
  309. * @return $this
  310. */
  311. public function setSchemaOperationQuotas($var)
  312. {
  313. GPBUtil::checkMessage($var, \Ydb\Cms\SchemaOperationQuotas::class);
  314. $this->schema_operation_quotas = $var;
  315. return $this;
  316. }
  317. /**
  318. * Current quotas for the database
  319. *
  320. * Generated from protobuf field <code>.Ydb.Cms.DatabaseQuotas database_quotas = 10;</code>
  321. * @return \Ydb\Cms\DatabaseQuotas|null
  322. */
  323. public function getDatabaseQuotas()
  324. {
  325. return $this->database_quotas;
  326. }
  327. public function hasDatabaseQuotas()
  328. {
  329. return isset($this->database_quotas);
  330. }
  331. public function clearDatabaseQuotas()
  332. {
  333. unset($this->database_quotas);
  334. }
  335. /**
  336. * Current quotas for the database
  337. *
  338. * Generated from protobuf field <code>.Ydb.Cms.DatabaseQuotas database_quotas = 10;</code>
  339. * @param \Ydb\Cms\DatabaseQuotas $var
  340. * @return $this
  341. */
  342. public function setDatabaseQuotas($var)
  343. {
  344. GPBUtil::checkMessage($var, \Ydb\Cms\DatabaseQuotas::class);
  345. $this->database_quotas = $var;
  346. return $this;
  347. }
  348. /**
  349. * @return string
  350. */
  351. public function getResourcesKind()
  352. {
  353. return $this->whichOneof("resources_kind");
  354. }
  355. }